Skip to content

Commit

Permalink
fix: resolve bugs in addon.c files
Browse files Browse the repository at this point in the history
  • Loading branch information
Planeshifter committed Sep 21, 2024
1 parent 7d3199f commit e4de24f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/ext/base/dapx/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @param info callback data
* @return Node-API value
*/
static napi_value node_dapx( napi_env env, napi_callback_info info ) {
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dependencies": [
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-float",
"@stdlib/napi/argv-double",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-strided-float64array",
"@stdlib/math/base/special/abs"
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "stdlib/blas/ext/base/dcusumkbn2.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_float.h"
#include "stdlib/napi/argv_double.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float64array.h"
#include <node_api.h>
Expand All @@ -34,7 +34,7 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 6 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, sum, argv, 1 );
STDLIB_NAPI_ARGV_DOUBLE( env, sum, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/dnannsumpw/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* @param info callback data
* @return Node-API value
*/
napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 )
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 5 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 4 );
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/dsapxsum/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, N, argv, 1 );
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );

napi_value v;
status = napi_create_double( env, stdlib_strided_dsapxsum( N, alpha, X, stride ), &v );
napi_status status = napi_create_double( env, stdlib_strided_dsapxsum( N, alpha, X, stride ), &v );
assert( status == napi_ok );
return v;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/sdsapxsum/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, N, argv, 1 );
STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );

napi_value v;
status = napi_create_double( env, (double)stdlib_strided_sdsapxsum( N, alpha, X, stride ), &v );
napi_status status = napi_create_double( env, (double)stdlib_strided_sdsapxsum( N, alpha, X, stride ), &v );
assert( status == napi_ok );
return v;
}
Expand Down

1 comment on commit e4de24f

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/dapx $\color{green}432/432$
$\color{green}+100.00\%$
$\color{green}42/42$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}432/432$
$\color{green}+100.00\%$
blas/ext/base/dcusumkbn2 $\color{green}483/483$
$\color{green}+100.00\%$
$\color{green}35/35$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}483/483$
$\color{green}+100.00\%$
blas/ext/base/dnannsumpw $\color{green}611/611$
$\color{green}+100.00\%$
$\color{green}39/39$
$\color{green}+100.00\%$
$\color{green}5/5$
$\color{green}+100.00\%$
$\color{green}611/611$
$\color{green}+100.00\%$
blas/ext/base/dsapxsum $\color{green}354/354$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}354/354$
$\color{green}+100.00\%$
blas/ext/base/sdsapxsum $\color{green}353/353$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}353/353$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.