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 22, 2024
1 parent cf3e686 commit 82040e7
Show file tree
Hide file tree
Showing 10 changed files with 175 additions and 242 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,9 @@ A total of 17 people contributed to this release. Thank you to the following con

<details>

- [`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)_
- [`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)_
- [`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)_
- [`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)_
- [`9a70521`](https://github.com/stdlib-js/stdlib/commit/9a70521fa60f2f847cdec20bad13e8ec5a33f24b) - **docs:** update namespace ToCs _(by Athan Reines)_
- [`f13ddb2`](https://github.com/stdlib-js/stdlib/commit/f13ddb2eb01e5520b6fa98634bbf9de76793036f) - **style:** use spaces for alignment in C comments _(by Philipp Burckhardt)_
Expand Down
4 changes: 0 additions & 4 deletions base/dists/kumaraswamy/median/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ for ( i = 0; i < 10; i++ ) {

<!-- /.examples -->


<!-- C interface documentation. -->

* * *
Expand Down Expand Up @@ -240,10 +239,8 @@ int main( void ) {

</section>


<!-- /.c -->


<!-- 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. -->

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

<!-- /.references -->


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

<section class="related">
Expand Down
2 changes: 1 addition & 1 deletion base/dnanmin/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
44 changes: 43 additions & 1 deletion base/dnanmin/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,46 @@
],
"confs": [
{
"task": "build",
"src": [
"./src/dnanmin.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/assert/is-negative-zero",
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-strided-float64array",
"@stdlib/napi/create-double"
]
},
{
"task": "benchmark",
"src": [
"./src/dnanmin.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/math/base/assert/is-negative-zero"
]
},
{
"task": "examples",
"src": [
"./src/dnanmin.c"
],
Expand Down
43 changes: 43 additions & 0 deletions base/dnanmin/src/addon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @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/dnanmin.h"
#include "stdlib/napi/export.h"
#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>

/**
* 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, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, stride, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dnanmin( N, X, stride ), v );
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
117 changes: 0 additions & 117 deletions base/dnanmin/src/addon.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion base/dnanminabs/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
42 changes: 41 additions & 1 deletion base/dnanminabs/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,44 @@
],
"confs": [
{
"task": "build",
"src": [
"./src/dnanminabs.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan",
"@stdlib/napi/export",
"@stdlib/napi/argv",
"@stdlib/napi/argv-int64",
"@stdlib/napi/argv-strided-float64array",
"@stdlib/napi/create-double"
]
},
{
"task": "benchmark",
"src": [
"./src/dnanminabs.c"
],
"include": [
"./include"
],
"libraries": [
"-lm"
],
"libpath": [],
"dependencies": [
"@stdlib/math/base/assert/is-nan"
]
},
{
"task": "examples",
"src": [
"./src/dnanminabs.c"
],
Expand Down
43 changes: 43 additions & 0 deletions base/dnanminabs/src/addon.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* @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/dnanminabs.h"
#include "stdlib/napi/export.h"
#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>

/**
* 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, 3 );
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, stride, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, stride, argv, 1 );
STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_strided_dnanminabs( N, X, stride ), v );
return v;
}

STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
Loading

0 comments on commit 82040e7

Please sign in to comment.