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 Dec 25, 2024
1 parent 4542766 commit 72a3a5c
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 132 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,7 @@ A total of 17 people contributed to this release. Thank you to the following con

<details>

- [`51565a4`](https://github.com/stdlib-js/stdlib/commit/51565a4e5125fb8e7bf2a640e1bcb1f3647e50e3) - **refactor:** update `stats/base/sstdevyc` native addon from C++ to C [(#4208)](https://github.com/stdlib-js/stdlib/pull/4208) _(by Vinit Pandit, Athan Reines)_
- [`1223597`](https://github.com/stdlib-js/stdlib/commit/1223597e150b36a74a6a9d7deb9a0804db51387c) - **refactor:** update `stats/base/svariance` native addon from C++ to C [(#4213)](https://github.com/stdlib-js/stdlib/pull/4213) _(by Vinit Pandit, Athan Reines)_
- [`40818ea`](https://github.com/stdlib-js/stdlib/commit/40818ea2b274cfbff6289c41539e4c58021b00a6) - **refactor:** update `stats/base/svariancetk` native addon from C++ to C [(#4209)](https://github.com/stdlib-js/stdlib/pull/4209) _(by Vinit Pandit, Athan Reines)_
- [`191c47d`](https://github.com/stdlib-js/stdlib/commit/191c47dbfe5a37c6aaab600d9834d4257dfa061f) - **refactor:** update `stats/base/sstdevwd` native addon from C++ to C [(#4207)](https://github.com/stdlib-js/stdlib/pull/4207) _(by Vinit Pandit, Athan Reines)_
Expand Down
2 changes: 1 addition & 1 deletion base/sstdevyc/include.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Source files:
'src_files': [
'<(src_dir)/addon.cpp',
'<(src_dir)/addon.c',
'<!@(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 ] ); }")',
],

Expand Down
43 changes: 42 additions & 1 deletion base/sstdevyc/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"options": {},
"options": {
"task": "build"
},
"fields": [
{
"field": "src",
Expand All @@ -24,6 +26,45 @@
],
"confs": [
{
"task": "build",
"src": [
"./src/sstdevyc.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/stats/base/svarianceyc",
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-strided-float32array",
"@stdlib/napi/create-double",
"@stdlib/napi/argv-float"
]
},
{
"task": "benchmark",
"src": [
"./src/sstdevyc.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/stats/base/svarianceyc"
]
},
{
"task": "examples",
"src": [
"./src/sstdevyc.c"
],
Expand Down
45 changes: 45 additions & 0 deletions base/sstdevyc/src/addon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* @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/stats/base/sstdevyc.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_int64.h"
#include "stdlib/napi/argv_strided_float32array.h"
#include "stdlib/napi/create_double.h"
#include "stdlib/napi/argv_float.h"
#include <node_api.h>

/**
* Receives JavaScript callback invocation data.
*
* @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, 4 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_FLOAT( env, correction, argv, 1 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, stride, argv, 2 )
STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_strided_sstdevyc( N, correction, X, stride ), v );
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
130 changes: 0 additions & 130 deletions base/sstdevyc/src/addon.cpp

This file was deleted.

0 comments on commit 72a3a5c

Please sign in to comment.