-
-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update
blas/ext/base/dsort2hp
to follow current project c…
…onventions PR-URL: #2302 Closes: #1495 Ref: #1152 --------- Signed-off-by: Philipp Burckhardt <[email protected]> Co-authored-by: Athan Reines <[email protected]> Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]>
- Loading branch information
1 parent
51608dc
commit e87d921
Showing
6 changed files
with
134 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 79 additions & 41 deletions
120
lib/node_modules/@stdlib/blas/ext/base/dsort2sh/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,81 @@ | ||
{ | ||
"options": {}, | ||
"fields": [ | ||
{ | ||
"field": "src", | ||
"resolve": true, | ||
"relative": true | ||
}, | ||
{ | ||
"field": "include", | ||
"resolve": true, | ||
"relative": true | ||
}, | ||
{ | ||
"field": "libraries", | ||
"resolve": false, | ||
"relative": false | ||
}, | ||
{ | ||
"field": "libpath", | ||
"resolve": true, | ||
"relative": false | ||
} | ||
], | ||
"confs": [ | ||
{ | ||
"src": [ | ||
"./src/dsort2sh.c" | ||
], | ||
"include": [ | ||
"./include" | ||
], | ||
"libraries": [ | ||
"-lm" | ||
], | ||
"libpath": [], | ||
"dependencies": [ | ||
"@stdlib/math/base/assert/is-nan", | ||
"@stdlib/math/base/assert/is-negative-zero" | ||
] | ||
} | ||
] | ||
"options": { | ||
"task": "build" | ||
}, | ||
"fields": [ | ||
{ | ||
"field": "src", | ||
"resolve": true, | ||
"relative": true | ||
}, | ||
{ | ||
"field": "include", | ||
"resolve": true, | ||
"relative": true | ||
}, | ||
{ | ||
"field": "libraries", | ||
"resolve": false, | ||
"relative": false | ||
}, | ||
{ | ||
"field": "libpath", | ||
"resolve": true, | ||
"relative": false | ||
} | ||
], | ||
"confs": [ | ||
{ | ||
"task": "build", | ||
"src": [ | ||
"./src/dsort2sh.c" | ||
], | ||
"include": [ | ||
"./include" | ||
], | ||
"libraries": [ | ||
"-lm" | ||
], | ||
"libpath": [], | ||
"dependencies": [ | ||
"@stdlib/napi/export", | ||
"@stdlib/math/base/assert/is-nan", | ||
"@stdlib/math/base/assert/is-negative-zero", | ||
"@stdlib/napi/argv", | ||
"@stdlib/napi/argv-int64", | ||
"@stdlib/napi/argv-double", | ||
"@stdlib/napi/argv-strided-float64array" | ||
] | ||
}, | ||
{ | ||
"task": "benchmark", | ||
"src": [ | ||
"./src/dsort2sh.c" | ||
], | ||
"include": [ | ||
"./include" | ||
], | ||
"libraries": [], | ||
"libpath": [], | ||
"dependencies": [ | ||
"@stdlib/math/base/assert/is-nan", | ||
"@stdlib/math/base/assert/is-negative-zero" | ||
] | ||
}, | ||
{ | ||
"task": "examples", | ||
"src": [ | ||
"./src/dsort2sh.c" | ||
], | ||
"include": [ | ||
"./include" | ||
], | ||
"libraries": [], | ||
"libpath": [], | ||
"dependencies": [ | ||
"@stdlib/math/base/assert/is-nan", | ||
"@stdlib/math/base/assert/is-negative-zero" | ||
] | ||
} | ||
] | ||
} |
49 changes: 49 additions & 0 deletions
49
lib/node_modules/@stdlib/blas/ext/base/dsort2sh/src/addon.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* @license Apache-2.0 | ||
* | ||
* Copyright (c) 2024 The Stdlib Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "stdlib/blas/ext/base/dsort2sh.h" | ||
#include "stdlib/napi/export.h" | ||
#include "stdlib/napi/argv.h" | ||
#include "stdlib/napi/argv_int64.h" | ||
#include "stdlib/napi/argv_double.h" | ||
#include "stdlib/napi/argv_strided_float64array.h" | ||
#include <node_api.h> | ||
|
||
/** | ||
* Receives JavaScript callback invocation data. | ||
* | ||
* @private | ||
* @param env environment under which the function is invoked | ||
* @param info callback data | ||
* @return Node-API value | ||
*/ | ||
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_DOUBLE( env, order, argv, 1 ); | ||
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, order, argv, 2 ); | ||
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 ); | ||
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, order, argv, 4 ); | ||
STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 5 ); | ||
|
||
c_dsort2sh( N, order, X, strideX, Y, strideY ); | ||
|
||
return NULL; | ||
} | ||
|
||
STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) |
Oops, something went wrong.
e87d921
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
The above coverage report was generated for the changes in this push.