Skip to content

Commit 82040e7

Browse files
committed
Auto-generated commit
1 parent cf3e686 commit 82040e7

File tree

10 files changed

+175
-242
lines changed

10 files changed

+175
-242
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,9 @@ A total of 17 people contributed to this release. Thank you to the following con
29122912

29132913
<details>
29142914

2915+
- [`a0eb37f`](https://github.com/stdlib-js/stdlib/commit/a0eb37f8a76369a7b0f6bec74affdf65d8a33b0c) - **refactor:** update `stats/base/dnanminabs` native addon from C++ to C [(#4126)](https://github.com/stdlib-js/stdlib/pull/4126) _(by Vivek maurya)_
2916+
- [`398c071`](https://github.com/stdlib-js/stdlib/commit/398c071feccc410c317eba90ee89ecc04bec63c9) - **refactor:** update `stats/base/dnanmin` native addon from C++ to C [(#4125)](https://github.com/stdlib-js/stdlib/pull/4125) _(by Vivek maurya)_
2917+
- [`5b71452`](https://github.com/stdlib-js/stdlib/commit/5b71452bd40811341a2e4eaab018c3cc17c5feac) - **docs:** update related packages sections [(#4135)](https://github.com/stdlib-js/stdlib/pull/4135) _(by stdlib-bot, Athan Reines)_
29152918
- [`6becb40`](https://github.com/stdlib-js/stdlib/commit/6becb40bd2ece89d04d455a8f77d0bdd73fc5095) - **docs:** update namespace TypeScript declarations [(#4136)](https://github.com/stdlib-js/stdlib/pull/4136) _(by stdlib-bot, Philipp Burckhardt)_
29162919
- [`9a70521`](https://github.com/stdlib-js/stdlib/commit/9a70521fa60f2f847cdec20bad13e8ec5a33f24b) - **docs:** update namespace ToCs _(by Athan Reines)_
29172920
- [`f13ddb2`](https://github.com/stdlib-js/stdlib/commit/f13ddb2eb01e5520b6fa98634bbf9de76793036f) - **style:** use spaces for alignment in C comments _(by Philipp Burckhardt)_

base/dists/kumaraswamy/median/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ for ( i = 0; i < 10; i++ ) {
143143

144144
<!-- /.examples -->
145145

146-
147146
<!-- C interface documentation. -->
148147

149148
* * *
@@ -240,10 +239,8 @@ int main( void ) {
240239

241240
</section>
242241

243-
244242
<!-- /.c -->
245243

246-
247244
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
248245

249246
<section class="references">
@@ -252,7 +249,6 @@ int main( void ) {
252249

253250
<!-- /.references -->
254251

255-
256252
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
257253

258254
<section class="related">

base/dnanmin/include.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Source files:
3838
'src_files': [
39-
'<(src_dir)/addon.cpp',
39+
'<(src_dir)/addon.c',
4040
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
4141
],
4242

base/dnanmin/manifest.json

+43-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2-
"options": {},
2+
"options": {
3+
"task": "build"
4+
},
35
"fields": [
46
{
57
"field": "src",
@@ -24,6 +26,46 @@
2426
],
2527
"confs": [
2628
{
29+
"task": "build",
30+
"src": [
31+
"./src/dnanmin.c"
32+
],
33+
"include": [
34+
"./include"
35+
],
36+
"libraries": [
37+
"-lm"
38+
],
39+
"libpath": [],
40+
"dependencies": [
41+
"@stdlib/math/base/assert/is-nan",
42+
"@stdlib/math/base/assert/is-negative-zero",
43+
"@stdlib/napi/export",
44+
"@stdlib/napi/argv",
45+
"@stdlib/napi/argv-int64",
46+
"@stdlib/napi/argv-strided-float64array",
47+
"@stdlib/napi/create-double"
48+
]
49+
},
50+
{
51+
"task": "benchmark",
52+
"src": [
53+
"./src/dnanmin.c"
54+
],
55+
"include": [
56+
"./include"
57+
],
58+
"libraries": [
59+
"-lm"
60+
],
61+
"libpath": [],
62+
"dependencies": [
63+
"@stdlib/math/base/assert/is-nan",
64+
"@stdlib/math/base/assert/is-negative-zero"
65+
]
66+
},
67+
{
68+
"task": "examples",
2769
"src": [
2870
"./src/dnanmin.c"
2971
],

base/dnanmin/src/addon.c

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#include "stdlib/stats/base/dnanmin.h"
20+
#include "stdlib/napi/export.h"
21+
#include "stdlib/napi/argv.h"
22+
#include "stdlib/napi/argv_int64.h"
23+
#include "stdlib/napi/argv_strided_float64array.h"
24+
#include "stdlib/napi/create_double.h"
25+
#include <node_api.h>
26+
27+
/**
28+
* Receives JavaScript callback invocation data.
29+
*
30+
* @param env environment under which the function is invoked
31+
* @param info callback data
32+
* @return Node-API value
33+
*/
34+
static napi_value addon( napi_env env, napi_callback_info info ) {
35+
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
36+
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
37+
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
38+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, stride, argv, 1 );
39+
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dnanmin( N, X, stride ), v );
40+
return v;
41+
}
42+
43+
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )

base/dnanmin/src/addon.cpp

-117
This file was deleted.

base/dnanminabs/include.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Source files:
3838
'src_files': [
39-
'<(src_dir)/addon.cpp',
39+
'<(src_dir)/addon.c',
4040
'<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
4141
],
4242

base/dnanminabs/manifest.json

+41-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2-
"options": {},
2+
"options": {
3+
"task": "build"
4+
},
35
"fields": [
46
{
57
"field": "src",
@@ -24,6 +26,44 @@
2426
],
2527
"confs": [
2628
{
29+
"task": "build",
30+
"src": [
31+
"./src/dnanminabs.c"
32+
],
33+
"include": [
34+
"./include"
35+
],
36+
"libraries": [
37+
"-lm"
38+
],
39+
"libpath": [],
40+
"dependencies": [
41+
"@stdlib/math/base/assert/is-nan",
42+
"@stdlib/napi/export",
43+
"@stdlib/napi/argv",
44+
"@stdlib/napi/argv-int64",
45+
"@stdlib/napi/argv-strided-float64array",
46+
"@stdlib/napi/create-double"
47+
]
48+
},
49+
{
50+
"task": "benchmark",
51+
"src": [
52+
"./src/dnanminabs.c"
53+
],
54+
"include": [
55+
"./include"
56+
],
57+
"libraries": [
58+
"-lm"
59+
],
60+
"libpath": [],
61+
"dependencies": [
62+
"@stdlib/math/base/assert/is-nan"
63+
]
64+
},
65+
{
66+
"task": "examples",
2767
"src": [
2868
"./src/dnanminabs.c"
2969
],

base/dnanminabs/src/addon.c

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2024 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
#include "stdlib/stats/base/dnanminabs.h"
20+
#include "stdlib/napi/export.h"
21+
#include "stdlib/napi/argv.h"
22+
#include "stdlib/napi/argv_int64.h"
23+
#include "stdlib/napi/argv_strided_float64array.h"
24+
#include "stdlib/napi/create_double.h"
25+
#include <node_api.h>
26+
27+
/**
28+
* Receives JavaScript callback invocation data.
29+
*
30+
* @param env environment under which the function is invoked
31+
* @param info callback data
32+
* @return Node-API value
33+
*/
34+
static napi_value addon( napi_env env, napi_callback_info info ) {
35+
STDLIB_NAPI_ARGV( env, info, argv, argc, 3 );
36+
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
37+
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
38+
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, stride, argv, 1 );
39+
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dnanminabs( N, X, stride ), v );
40+
return v;
41+
}
42+
43+
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )

0 commit comments

Comments
 (0)