Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Apr 18, 2024
1 parent 1d656a3 commit e484f66
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Adarsh Palaskar <adarshpalaskar99@gmail.com>
Aditya Sapra <adityaework@gmail.com>
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
Aleksandr <112382387+alextes90@users.noreply.github.com>
Ali Salesi <ali_sal1381@yahoo.com>
Aman Bhansali <bhansali.1@iitj.ac.in>
Amit Jimiwal <amitjimiwal45@gmail.com>
Expand Down Expand Up @@ -69,8 +70,10 @@ Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
Shivam <11shivam00@gmail.com>
Shraddheya Shendre <shendreshraddheya@gmail.com>
Shubh Mehta <93862397+Shubh942@users.noreply.github.com>
Shubham Mishra <shubh622005@gmail.com>
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com>
Spandan Barve <contact@marsian.dev>
Stephannie Jiménez Gacha <steff456@hotmail.com>
Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com>
Expand All @@ -83,4 +86,5 @@ Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
naveen <stupiddint@gmail.com>
nishant-s7 <97207366+nishant-s7@users.noreply.github.com>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
rainn <88160429+AmCodesLame@users.noreply.github.com>
rei2hu <reimu@reimu.ws>
18 changes: 12 additions & 6 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -105,7 +106,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -164,7 +166,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -221,7 +224,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -279,7 +283,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -338,7 +343,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float32array"
"@stdlib/napi-argv-strided-float32array",
"@stdlib/napi-create-double"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@stdlib/napi-argv": "^0.2.1",
"@stdlib/napi-argv-int64": "^0.2.1",
"@stdlib/napi-argv-strided-float32array": "^0.2.1",
"@stdlib/napi-create-double": "github:stdlib-js/napi-create-double#main",
"@stdlib/napi-export": "^0.2.1",
"@stdlib/number-float64-base-to-float32": "^0.2.1",
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1",
Expand Down
9 changes: 2 additions & 7 deletions src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float32array.h"
#include <node_api.h>
#include <assert.h>
#include "stdlib/napi/create_double.h"

/**
* Receives JavaScript callback invocation data.
Expand All @@ -37,11 +36,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );

napi_value v;
napi_status status = napi_create_double( env, (double)c_sasum( N, X, strideX ), &v );
assert( status == napi_ok );

STDLIB_NAPI_CREATE_DOUBLE( env, (double)c_sasum( N, X, strideX ), v );
return v;
}

Expand Down

0 comments on commit e484f66

Please sign in to comment.