Skip to content

Commit 3086942

Browse files
committed
Auto-generated commit
1 parent 2ce80b1 commit 3086942

File tree

11 files changed

+102
-137
lines changed

11 files changed

+102
-137
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ indent_style = tab
8686
[*.{f,f.txt}]
8787
indent_style = space
8888
indent_size = 2
89-
insert_final_newline = false
9089

9190
# Set properties for shell files:
9291
[*.{sh,sh.txt}]

.github/.keepalive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-02-03T01:17:35.433Z

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2024-12-23)
7+
## Unreleased (2025-02-03)
88

99
<section class="commits">
1010

1111
### Commits
1212

1313
<details>
1414

15+
- [`6d3a881`](https://github.com/stdlib-js/stdlib/commit/6d3a881e8df45f6c90f52af25666142603f59ca5) - **refactor:** update `stats/base/dsvariance` native addon from C++ to C [(#4868)](https://github.com/stdlib-js/stdlib/pull/4868) _(by Prashant Kumar Yadav)_
1516
- [`62364f6`](https://github.com/stdlib-js/stdlib/commit/62364f62ea823a3b52c2ad25660ecd80c71f8f36) - **style:** fix C comment alignment _(by Philipp Burckhardt)_
1617
- [`9e689ff`](https://github.com/stdlib-js/stdlib/commit/9e689ffcb7c6223afc521f1e574b42f10921cf5e) - **chore:** fix indentation in manifest.json files _(by Philipp Burckhardt)_
1718
- [`272ae7a`](https://github.com/stdlib-js/stdlib/commit/272ae7ac5c576c68cfab1b6e304c86407faa20cd) - **docs:** remove comment _(by Athan Reines)_
@@ -27,10 +28,11 @@
2728

2829
### Contributors
2930

30-
A total of 2 people contributed to this release. Thank you to the following contributors:
31+
A total of 3 people contributed to this release. Thank you to the following contributors:
3132

3233
- Athan Reines
3334
- Philipp Burckhardt
35+
- Prashant Kumar Yadav
3436

3537
</section>
3638

CONTRIBUTORS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Daniel Killenberger <[email protected]>
2727
Daniel Yu <[email protected]>
2828
Debashis Maharana <[email protected]>
2929
Desh Deepak Kant <[email protected]>
30+
31+
Dhruv Arvind Singh <[email protected]>
3032
Divyansh Seth <[email protected]>
3133
Dominic Lim <[email protected]>
3234
Dominik Moritz <[email protected]>
@@ -49,6 +51,7 @@ Joey Reed <[email protected]>
4951
Jordan Gallivan <[email protected]>
5052
Joris Labie <[email protected]>
5153
Justin Dennison <[email protected]>
54+
Karan Anand <[email protected]>
5255
Karthik Prakash <[email protected]>
5356
Kohantika Nath <[email protected]>
5457
Krishnendu Das <[email protected]>
@@ -117,7 +120,7 @@ UtkershBasnet <[email protected]>
117120
Vaibhav Patel <[email protected]>
118121
Varad Gupta <[email protected]>
119122
Vinit Pandit <[email protected]>
120-
Vivek maurya <[email protected].com>
123+
Vivek Maurya <vm8118134@gmail.com>
121124
Xiaochuan Ye <[email protected]>
122125
Yaswanth Kosuru <[email protected]>
123126
Yernar Yergaziyev <[email protected]>

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Copyright (c) 2016-2024 The Stdlib Authors.
1+
Copyright (c) 2016-2025 The Stdlib Authors.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ See [LICENSE][stdlib-license].
306306

307307
## Copyright
308308

309-
Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
309+
Copyright &copy; 2016-2025. The Stdlib [Authors][stdlib-authors].
310310

311311
</section>
312312

include.gypi

Lines changed: 1 addition & 1 deletion
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

manifest.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,45 @@
2424
],
2525
"confs": [
2626
{
27+
"task": "build",
28+
"src": [
29+
"./src/dsvariance.c"
30+
],
31+
"include": [
32+
"./include"
33+
],
34+
"libraries": [
35+
"-lm"
36+
],
37+
"libpath": [],
38+
"dependencies": [
39+
"@stdlib/stats-base-dsvariancepn",
40+
"@stdlib/napi-export",
41+
"@stdlib/napi-argv",
42+
"@stdlib/napi-argv-int64",
43+
"@stdlib/napi-argv-float",
44+
"@stdlib/napi-argv-strided-float32array",
45+
"@stdlib/napi-create-double"
46+
]
47+
},
48+
{
49+
"task": "benchmark",
50+
"src": [
51+
"./src/dsvariance.c"
52+
],
53+
"include": [
54+
"./include"
55+
],
56+
"libraries": [
57+
"-lm"
58+
],
59+
"libpath": [],
60+
"dependencies": [
61+
"@stdlib/stats-base-dsvariancepn"
62+
]
63+
},
64+
{
65+
"task": "examples",
2766
"src": [
2867
"./src/dsvariance.c"
2968
],

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
"@stdlib/math-base-special-floor": "^0.2.3",
5555
"@stdlib/math-base-special-pow": "^0.3.0",
5656
"@stdlib/math-base-special-round": "^0.3.0",
57+
"@stdlib/napi-argv": "^0.2.2",
58+
"@stdlib/napi-argv-float": "^0.2.2",
59+
"@stdlib/napi-argv-int64": "^0.2.2",
60+
"@stdlib/napi-argv-strided-float32array": "^0.2.2",
61+
"@stdlib/napi-create-double": "^0.0.2",
62+
"@stdlib/napi-export": "^0.2.2",
5763
"@stdlib/random-base-randu": "^0.2.1",
5864
"proxyquire": "^2.0.0",
5965
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",

src/addon.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2025 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/dsvariance.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_float.h"
24+
#include "stdlib/napi/argv_strided_float32array.h"
25+
#include "stdlib/napi/create_double.h"
26+
#include <node_api.h>
27+
28+
/**
29+
* Receives JavaScript callback invocation data.
30+
*
31+
* @param env environment under which the function is invoked
32+
* @param info callback data
33+
* @return Node-API value
34+
*/
35+
static napi_value addon( napi_env env, napi_callback_info info ) {
36+
STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
37+
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
38+
STDLIB_NAPI_ARGV_FLOAT( env, correction, argv, 1 );
39+
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
40+
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 );
41+
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dsvariance( N, correction, X, stride ), v );
42+
return v;
43+
}
44+
45+
STDLIB_NAPI_MODULE_EXPORT_FCN( addon )

0 commit comments

Comments
 (0)