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 09555b0 commit 89b859b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 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 <[email protected]>
Aditya Sapra <[email protected]>
AgPriyanshu18 <[email protected]>
Aleksandr <[email protected]>
Ali Salesi <[email protected]>
Aman Bhansali <[email protected]>
Amit Jimiwal <[email protected]>
Expand Down Expand Up @@ -69,8 +70,10 @@ Seyyed Parsa Neshaei <[email protected]>
Shashank Shekhar Singh <[email protected]>
Shivam <[email protected]>
Shraddheya Shendre <[email protected]>
Shubh Mehta <[email protected]>
Shubham Mishra <[email protected]>
Snehil Shah <[email protected]>
Soumajit Chatterjee <[email protected]>
Spandan Barve <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Suraj kumar <[email protected]>
Expand All @@ -83,4 +86,5 @@ Yernar Yergaziyev <[email protected]>
naveen <[email protected]>
nishant-s7 <[email protected]>
orimiles5 <[email protected]>
rainn <[email protected]>
rei2hu <[email protected]>
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-float64array"
"@stdlib/napi-argv-strided-float64array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -101,7 +102,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float64array"
"@stdlib/napi-argv-strided-float64array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -160,7 +162,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float64array"
"@stdlib/napi-argv-strided-float64array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -213,7 +216,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float64array"
"@stdlib/napi-argv-strided-float64array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -271,7 +275,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float64array"
"@stdlib/napi-argv-strided-float64array",
"@stdlib/napi-create-double"
]
},
{
Expand Down Expand Up @@ -328,7 +333,8 @@
"@stdlib/napi-export",
"@stdlib/napi-argv",
"@stdlib/napi-argv-int64",
"@stdlib/napi-argv-strided-float64array"
"@stdlib/napi-argv-strided-float64array",
"@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 @@ -45,6 +45,7 @@
"@stdlib/napi-argv": "^0.2.1",
"@stdlib/napi-argv-int64": "^0.2.1",
"@stdlib/napi-argv-strided-float64array": "^0.2.1",
"@stdlib/napi-create-double": "github:stdlib-js/napi-create-double#main",
"@stdlib/napi-export": "^0.2.1",
"@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.1",
"@stdlib/utils-library-manifest": "^0.2.1",
Expand Down
8 changes: 2 additions & 6 deletions src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float64array.h"
#include "stdlib/napi/create_double.h"
#include <node_api.h>
#include <assert.h>

/**
* Receives JavaScript callback invocation data.
Expand All @@ -39,11 +39,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 4 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 3 );

napi_value v;
napi_status status = napi_create_double( env, c_ddot( N, X, strideX, Y, strideY ), &v );
assert( status == napi_ok );

STDLIB_NAPI_CREATE_DOUBLE( env, c_ddot( N, X, strideX, Y, strideY ), v );
return v;
}

Expand Down

0 comments on commit 89b859b

Please sign in to comment.