diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/README.md b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/README.md
new file mode 100644
index 000000000000..64bb1e5bb4f0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/README.md
@@ -0,0 +1,332 @@
+
+
+# snannsumpw
+
+> Calculate the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var snannsumpw = require( '@stdlib/blas/ext/base/snannsumpw' );
+```
+
+#### snannsumpw( N, x, strideX, out, strideOut )
+
+Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+var out = new Float32Array( 2 );
+
+var v = snannsumpw( x.length, x, 1, out, 1 );
+// returns [ 1.0, 3 ]
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **x**: input [`Float32Array`][@stdlib/array/float32].
+- **strideX**: stride length for `x`.
+- **out**: output [`Float32Array`][@stdlib/array/float32] whose first element is the sum and whose second element is the number of non-NaN elements.
+- **strideOut**: stride length for `out`.
+
+The `N` and stride parameters determine which elements are accessed at runtime. For example, to compute the sum of every other element in the strided array:
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var x = new Float32Array( [ 1.0, 2.0, NaN, -7.0, NaN, 3.0, 4.0, 2.0 ] );
+var out = new Float32Array( 2 );
+
+var v = snannsumpw( 4, x, 2, out, 1 );
+// returns [ 5.0, 2 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var x0 = new Float32Array( [ 2.0, 1.0, NaN, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
+var x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+var out0 = new Float32Array( 4 );
+var out1 = new Float32Array( out0.buffer, out0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
+
+var v = snannsumpw( 4, x1, 2, out1, 1 );
+// returns [ 5.0, 4 ]
+```
+
+#### snannsumpw.ndarray( N, x, strideX, offsetX, out, strideOut, offsetOut )
+
+Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation and alternative indexing semantics.
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+var out = new Float32Array( 2 );
+
+var v = snannsumpw.ndarray( x.length, x, 1, 0, out, 1, 0 );
+// returns [ 1.0, 3 ]
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `x`.
+- **offsetOut**: starting index for `out`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to calculate the sum of every other element starting from the second element:
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var x = new Float32Array( [ 2.0, 1.0, NaN, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
+var out = new Float32Array( 4 );
+
+var v = snannsumpw.ndarray( 4, x, 2, 1, out, 2, 1 );
+// returns [ 0.0, 5.0, 0.0, 4 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- If `N <= 0`, both functions return a sum equal to `0.0`.
+- In general, pairwise summation is more numerically stable than ordinary recursive summation (i.e., "simple" summation), with slightly worse performance. While not the most numerically stable summation technique (e.g., compensated summation techniques such as the Kahan–Babuška-Neumaier algorithm are generally more numerically stable), pairwise summation strikes a reasonable balance between numerical stability and performance. If either numerical stability or performance is more desirable for your use case, consider alternative summation techniques.
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Float32Array = require( '@stdlib/array/float32' );
+var snannsumpw = require( '@stdlib/blas/ext/base/snannsumpw' );
+
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return discreteUniform( 0, 100 );
+ }
+ return NaN;
+}
+
+var x = filledarrayBy( 10, 'float32', rand );
+console.log( x );
+
+var out = new Float32Array( 2 );
+snannsumpw( x.length, x, 1, out, 1 );
+console.log( out );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/ext/base/snannsumpw.h"
+```
+
+#### stdlib_strided_snannsumpw( N, \*X, strideX, \*n )
+
+Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+
+```c
+#include "stdlib/blas/base/shared.h"
+
+const float x[] = { 1.0f, 2.0f, 0.0f/0.0f, 4.0f };
+CBLAS_INT n = 0;
+
+float v = stdlib_strided_snannsumpw( 4, x, 1, &n );
+// returns 7.0f
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **X**: `[in] float*` input array.
+- **strideX**: `[in] CBLAS_INT` stride length.
+- **n**: `[out] CBLAS_INT*` pointer for storing the number of non-NaN elements.
+
+```c
+float stdlib_strided_snannsumpw( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, CBLAS_INT *n );
+```
+
+#### stdlib_strided_snannsumpw_ndarray( N, \*X, strideX, offsetX, \*n )
+
+Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation and alternative indexing semantics.
+
+```c
+#include "stdlib/blas/base/shared.h"
+
+const float x[] = { 1.0f, 2.0f, 0.0f/0.0f, 4.0f };
+CBLAS_INT n = 0;
+
+float v = stdlib_strided_snannsumpw_ndarray( 4, x, 1, 0, &n );
+// returns 7.0f
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **X**: `[in] float*` input array.
+- **strideX**: `[in] CBLAS_INT` stride length.
+- **offsetX**: `[in] CBLAS_INT` starting index.
+- **n**: `[out] CBLAS_INT*` pointer for storing the number of non-NaN elements.
+
+```c
+float stdlib_strided_snannsumpw_ndarray( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, CBLAS_INT *n );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/blas/ext/base/snannsumpw.h"
+#include "stdlib/blase/base/shared.h"
+#include
+
+int main( void ) {
+ // Create a strided array:
+ const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 0.0f/0.0f, 0.0f/0.0f };
+
+ // Specify the number of elements:
+ const int N = 5;
+
+ // Specify the stride length:
+ const int strideX = 2;
+
+ // Initialize a variable for storing the number of non-NaN elements:
+ CBLAS_INT n = 0;
+
+ // Compute the sum:
+ float v = stdlib_strided_snannsumpw( N, x, strideX, &n );
+
+ // Print the result:
+ printf( "sum: %f\n", v );
+ printf( "n: %"CBLAS_IFMT"\n", n );
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+## References
+
+- Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050][@higham:1993a].
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@stdlib/array/float32]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/float32
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+[@higham:1993a]: https://doi.org/10.1137/0914050
+
+
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.js
new file mode 100644
index 000000000000..f8d5a0ee48e6
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.js
@@ -0,0 +1,108 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Float32Array = require( '@stdlib/array/float32' );
+var pkg = require( './../package.json' ).name;
+var snannsumpw = require( './../lib/snannsumpw.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Returns a random number.
+*
+* @private
+* @returns {number} random number
+*/
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return uniform( -10.0, 10.0 );
+ }
+ return NaN;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var out;
+ var x;
+
+ x = filledarrayBy( len, 'float32', rand );
+ out = new Float32Array( 2 );
+ return benchmark;
+
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ snannsumpw( x.length, x, 1, out, 1 );
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..a25116441154
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.native.js
@@ -0,0 +1,117 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Float32Array = require( '@stdlib/array/float32' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var snannsumpw = tryRequire( resolve( __dirname, './../lib/snannsumpw.native.js' ) );
+var opts = {
+ 'skip': ( snannsumpw instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Returns a random number.
+*
+* @private
+* @returns {number} random number
+*/
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return uniform( -10.0, 10.0 );
+ }
+ return NaN;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var out;
+ var x;
+
+ x = filledarrayBy( len, 'float32', rand );
+ out = new Float32Array( 2 );
+ return benchmark;
+
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ snannsumpw( x.length, x, 1, out, 1 );
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+'::native:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..f552167b8fee
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.js
@@ -0,0 +1,108 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Float32Array = require( '@stdlib/array/float32' );
+var pkg = require( './../package.json' ).name;
+var snannsumpw = require( './../lib/ndarray.js' );
+
+
+// FUNCTIONS //
+
+/**
+* Returns a random number.
+*
+* @private
+* @returns {number} random number
+*/
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return uniform( -10.0, 10.0 );
+ }
+ return NaN;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var out;
+ var x;
+
+ x = filledarrayBy( len, 'float32', rand );
+ out = new Float32Array( 2 );
+ return benchmark;
+
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+':ndarray:len='+len, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..3f017c749a39
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,117 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/base/uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Float32Array = require( '@stdlib/array/float32' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var snannsumpw = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( snannsumpw instanceof Error )
+};
+
+
+// FUNCTIONS //
+
+/**
+* Returns a random number.
+*
+* @private
+* @returns {number} random number
+*/
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return uniform( -10.0, 10.0 );
+ }
+ return NaN;
+}
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var out;
+ var x;
+
+ x = filledarrayBy( len, 'float32', rand );
+ out = new Float32Array( 2 );
+ return benchmark;
+
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( out[ i%2 ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+ }
+}
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var len;
+ var min;
+ var max;
+ var f;
+ var i;
+
+ min = 1; // 10^min
+ max = 6; // 10^max
+
+ for ( i = min; i <= max; i++ ) {
+ len = pow( 10, i );
+ f = createBenchmark( len );
+ bench( pkg+'::native:ndarray:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/Makefile b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/Makefile
new file mode 100644
index 000000000000..cce2c865d7ad
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 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.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..a4be49e8987d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/benchmark/c/benchmark.length.c
@@ -0,0 +1,210 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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/snannsumpw.h"
+#include "stdlib/blas/base/shared.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "snannsumpw"
+#define ITERATIONS 1000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* Prints the TAP version.
+*/
+static void print_version( void ) {
+ printf( "TAP version 13\n" );
+}
+
+/**
+* Prints the TAP summary.
+*
+* @param total total number of tests
+* @param passing total number of passing tests
+*/
+static void print_summary( int total, int passing ) {
+ printf( "#\n" );
+ printf( "1..%d\n", total ); // TAP plan
+ printf( "# total %d\n", total );
+ printf( "# pass %d\n", passing );
+ printf( "#\n" );
+ printf( "# ok\n" );
+}
+
+/**
+* Prints benchmarks results.
+*
+* @param iterations number of iterations
+* @param elapsed elapsed time in seconds
+*/
+static void print_results( int iterations, double elapsed ) {
+ double rate = (double)iterations / elapsed;
+ printf( " ---\n" );
+ printf( " iterations: %d\n", iterations );
+ printf( " elapsed: %0.9f\n", elapsed );
+ printf( " rate: %0.9f\n", rate );
+ printf( " ...\n" );
+}
+
+/**
+* Returns a clock time.
+*
+* @return clock time
+*/
+static double tic( void ) {
+ struct timeval now;
+ gettimeofday( &now, NULL );
+ return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
+}
+
+/**
+* Generates a random number on the interval [0,1).
+*
+* @return random number
+*/
+static float rand_float( void ) {
+ int r = rand();
+ return (float)r / ( (float)RAND_MAX + 1.0f );
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark1( int iterations, int len ) {
+ double elapsed;
+ float x[ len ];
+ CBLAS_INT n;
+ float v;
+ double t;
+ int i;
+
+ for ( i = 0; i < len; i++ ) {
+ if ( rand_float() < 0.2f ) {
+ x[ i ] = 0.0f / 0.0f; // NaN
+ } else {
+ x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f;
+ }
+ }
+ v = 0.0f;
+ n = 0;
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ v = stdlib_strided_snannsumpw( len, x, 1, &n );
+ if ( v != v || n < 0 ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( v != v || n < 0 ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+static double benchmark2( int iterations, int len ) {
+ double elapsed;
+ float x[ len ];
+ CBLAS_INT n;
+ float v;
+ double t;
+ int i;
+
+ for ( i = 0; i < len; i++ ) {
+ if ( rand_float() < 0.2f ) {
+ x[ i ] = 0.0f / 0.0f; // NaN
+ } else {
+ x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f;
+ }
+ }
+ v = 0.0f;
+ n = 0;
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ v = stdlib_strided_snannsumpw_ndarray( len, x, 1, 0, &n );
+ if ( v != v || n < 0 ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( v != v || n < 0 ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Main execution sequence.
+*/
+int main( void ) {
+ double elapsed;
+ int count;
+ int iter;
+ int len;
+ int i;
+ int j;
+
+ // Use the current time to seed the random number generator:
+ srand( time( NULL ) );
+
+ print_version();
+ count = 0;
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:len=%d\n", NAME, len );
+ elapsed = benchmark1( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ for ( i = MIN; i <= MAX; i++ ) {
+ len = pow( 10, i );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:ndarray:len=%d\n", NAME, len );
+ elapsed = benchmark2( iter, len );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ print_summary( count, count );
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/binding.gyp b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/binding.gyp
new file mode 100644
index 000000000000..68a1ca11d160
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/binding.gyp
@@ -0,0 +1,170 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2025 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.
+
+# A `.gyp` file for building a Node.js native add-on.
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # List of files to include in this file:
+ 'includes': [
+ './include.gypi',
+ ],
+
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Target name should match the add-on export name:
+ 'addon_target_name%': 'addon',
+
+ # Set variables based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+ {
+ # Define the object file suffix:
+ 'obj': 'obj',
+ },
+ {
+ # Define the object file suffix:
+ 'obj': 'o',
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end variables
+
+ # Define compile targets:
+ 'targets': [
+
+ # Target to generate an add-on:
+ {
+ # The target name should match the add-on export name:
+ 'target_name': '<(addon_target_name)',
+
+ # Define dependencies:
+ 'dependencies': [],
+
+ # Define directories which contain relevant include headers:
+ 'include_dirs': [
+ # Local include directory:
+ '<@(include_dirs)',
+ ],
+
+ # List of source files:
+ 'sources': [
+ '<@(src_files)',
+ ],
+
+ # Settings which should be applied when a target's object files are used as linker input:
+ 'link_settings': {
+ # Define libraries:
+ 'libraries': [
+ '<@(libraries)',
+ ],
+
+ # Define library directories:
+ 'library_dirs': [
+ '<@(library_dirs)',
+ ],
+ },
+
+ # C/C++ compiler flags:
+ 'cflags': [
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Aggressive optimization:
+ '-O3',
+ ],
+
+ # C specific compiler flags:
+ 'cflags_c': [
+ # Specify the C standard to which a program is expected to conform:
+ '-std=c99',
+ ],
+
+ # C++ specific compiler flags:
+ 'cflags_cpp': [
+ # Specify the C++ standard to which a program is expected to conform:
+ '-std=c++11',
+ ],
+
+ # Linker flags:
+ 'ldflags': [],
+
+ # Apply conditions based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="mac"',
+ {
+ # Linker flags:
+ 'ldflags': [
+ '-undefined dynamic_lookup',
+ '-Wl,-no-pie',
+ '-Wl,-search_paths_first',
+ ],
+ },
+ ], # end condition (OS=="mac")
+ [
+ 'OS!="win"',
+ {
+ # C/C++ flags:
+ 'cflags': [
+ # Generate platform-independent code:
+ '-fPIC',
+ ],
+ },
+ ], # end condition (OS!="win")
+ ], # end conditions
+ }, # end target <(addon_target_name)
+
+ # Target to copy a generated add-on to a standard location:
+ {
+ 'target_name': 'copy_addon',
+
+ # Declare that the output of this target is not linked:
+ 'type': 'none',
+
+ # Define dependencies:
+ 'dependencies': [
+ # Require that the add-on be generated before building this target:
+ '<(addon_target_name)',
+ ],
+
+ # Define a list of actions:
+ 'actions': [
+ {
+ 'action_name': 'copy_addon',
+ 'message': 'Copying addon...',
+
+ # Explicitly list the inputs in the command-line invocation below:
+ 'inputs': [],
+
+ # Declare the expected outputs:
+ 'outputs': [
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+
+ # Define the command-line invocation:
+ 'action': [
+ 'cp',
+ '<(PRODUCT_DIR)/<(addon_target_name).node',
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+ },
+ ], # end actions
+ }, # end target copy_addon
+ ], # end targets
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/repl.txt
new file mode 100644
index 000000000000..bbde62181c13
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/repl.txt
@@ -0,0 +1,113 @@
+
+{{alias}}( N, x, strideX, out, strideOut )
+ Computes the sum of single-precision floating-point strided array elements,
+ ignoring `NaN` values and using pairwise summation.
+
+ The `N` and stride parameters determine which elements are accessed at
+ runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use a typed
+ array view.
+
+ If `N <= 0`, the function returns a sum equal to `0.0`.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ x: Float32Array
+ Input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ out: Float32Array
+ Output array.
+
+ strideOut: integer
+ Stride length for `out`.
+
+ Returns
+ -------
+ out: Float32Array
+ Output array whose first element is the sum and whose second element is
+ the number of non-NaN elements.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, NaN, 2.0 ] );
+ > var out = new {{alias:@stdlib/array/float32}}( 2 );
+ > {{alias}}( x.length, x, 1, out, 1 )
+ [ 1.0, 3 ]
+
+ // Using `N` and stride parameters:
+ > x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 1.0, -5.0, 2.0, -1.0, NaN, NaN ] );
+ > out = new {{alias:@stdlib/array/float32}}( 2 );
+ > {{alias}}( 4, x, 2, out, 1 )
+ [ 1.0, 3 ]
+
+ // Using view offsets:
+ > var x0 = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );
+ > var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
+ > out = new {{alias:@stdlib/array/float32}}( 2 );
+ > {{alias}}( 4, x1, 2, out, 1 )
+ [ 1.0, 3 ]
+
+
+{{alias}}.ndarray( N, x, strideX, offsetX, out, strideOut, offsetOut )
+ Computes the sum of single-precision floating-point strided array elements,
+ ignoring `NaN` values and using pairwise summation and alternative indexing
+ semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ x: Float32Array
+ Input array.
+
+ strideX: integer
+ Stride length for `x`.
+
+ offsetX: integer
+ Starting index for `x`.
+
+ out: Float32Array
+ Output array.
+
+ strideOut: integer
+ Stride length for `out`.
+
+ offsetOut: integer
+ Starting index for `out`.
+
+ Returns
+ -------
+ out: Float32Array
+ Output array whose first element is the sum and whose second element is
+ the number of non-NaN elements.
+
+ Examples
+ --------
+ // Standard Usage:
+ > var x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, NaN, 2.0 ] );
+ > var out = new {{alias:@stdlib/array/float32}}( 2 );
+ > {{alias}}.ndarray( x.length, x, 1, 0, out, 1, 0 )
+ [ 1.0, 3 ]
+
+ // Using offset parameter:
+ > x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, 2.0, 5.0, 1.0, NaN, NaN ] );
+ > out = new {{alias:@stdlib/array/float32}}( 2 );
+ > {{alias}}.ndarray( 4, x, 2, 1, out, 1, 0 )
+ [ 1.0, 3 ]
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/index.d.ts
new file mode 100644
index 000000000000..891a94422b3c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/index.d.ts
@@ -0,0 +1,103 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+// TypeScript Version: 4.1
+
+/**
+* Interface describing `snannsumpw`.
+*/
+interface Routine {
+ /**
+ * Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+ *
+ * @param N - number of indexed elements
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param out - output array whose first element is the sum and whose second element is the number of non-NaN elements
+ * @param strideOut - stride length for `out`
+ * @returns output array
+ *
+ * @example
+ * var Float32Array = require( '@stdlib/array/float32' );
+ *
+ * var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+ * var out = new Float32Array( 2 );
+ *
+ * var v = snannsumpw( x.length, x, 1, out, 1 );
+ * // returns [ 1.0, 3 ]
+ */
+ ( N: number, x: Float32Array, strideX: number, out: Float32Array, strideOut: number ): Float32Array;
+
+ /**
+ * Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation and alternative indexing semantics.
+ *
+ * @param N - number of indexed elements
+ * @param x - input array
+ * @param strideX - stride length for `x`
+ * @param offsetX - starting index for `x`
+ * @param out - output array whose first element is the sum and whose second element is the number of non-NaN elements
+ * @param strideOut - stride length for `out`
+ * @param offsetOut - starting index for `out`
+ * @returns output array
+ *
+ * @example
+ * var Float32Array = require( '@stdlib/array/float32' );
+ *
+ * var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+ * var out = new Float32Array( 2 );
+ *
+ * var v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+ * // returns [ 1.0, 3 ]
+ */
+ ndarray( N: number, x: Float32Array, strideX: number, offsetX: number, out: Float32Array, strideOut: number, offsetOut: number ): Float32Array;
+}
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* @param N - number of indexed elements
+* @param x - input array
+* @param strideX - stride length for `x`
+* @param out - output array whose first element is the sum and whose second element is the number of non-NaN elements
+* @param strideOut - stride length for `out`
+* @returns output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( x.length, x, 1, out, 1 );
+* // returns [ 1.0, 3 ]
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+* // returns [ 1.0, 3 ]
+*/
+declare var snannsumpw: Routine;
+
+
+// EXPORTS //
+
+export = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/test.ts b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/test.ts
new file mode 100644
index 000000000000..ec8bd6e2c530
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/docs/types/test.ts
@@ -0,0 +1,248 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+import snannsumpw = require( './index' );
+
+
+// TESTS //
+
+// The function returns a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw( x.length, x, 1, out, 1 ); // $ExpectType Float32Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw( '10', x, 1, out, 1 ); // $ExpectError
+ snannsumpw( true, x, 1, out, 1 ); // $ExpectError
+ snannsumpw( false, x, 1, out, 1 ); // $ExpectError
+ snannsumpw( null, x, 1, out, 1 ); // $ExpectError
+ snannsumpw( undefined, x, 1, out, 1 ); // $ExpectError
+ snannsumpw( [], x, 1, out, 1 ); // $ExpectError
+ snannsumpw( {}, x, 1, out, 1 ); // $ExpectError
+ snannsumpw( ( x: number ): number => x, x, 1, out, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw( x.length, 10, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, '10', 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, true, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, false, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, null, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, undefined, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, [ '1' ], 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, {}, 1, out, 1 ); // $ExpectError
+ snannsumpw( x.length, ( x: number ): number => x, 1, out, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw( x.length, x, '10', out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, true, out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, false, out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, null, out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, undefined, out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, [], out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, {}, out, 1 ); // $ExpectError
+ snannsumpw( x.length, x, ( x: number ): number => x, out, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+
+ snannsumpw( x.length, x, 1, 10, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, '10', 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, true, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, false, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, null, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, undefined, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, [ '1' ], 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, {}, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw( x.length, x, 1, out, '10' ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, true ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, false ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, null ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, undefined ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, [] ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, {} ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw(); // $ExpectError
+ snannsumpw( x.length ); // $ExpectError
+ snannsumpw( x.length, x ); // $ExpectError
+ snannsumpw( x.length, x, 1 ); // $ExpectError
+ snannsumpw( x.length, x, 1, out ); // $ExpectError
+ snannsumpw( x.length, x, 1, out, 1, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, 0 ); // $ExpectType Float32Array
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( '10', x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( true, x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( false, x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( null, x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( undefined, x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( [], x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( {}, x, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( ( x: number ): number => x, x, 1, 0, out, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, 10, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, '10', 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, true, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, false, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, null, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, undefined, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, [ '1' ], 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, {}, 1, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, ( x: number ): number => x, 1, 0, out, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, x, '10', 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, true, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, false, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, null, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, undefined, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, [], 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, {}, 0, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, ( x: number ): number => x, 0, out, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, x, 1, '10', out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, true, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, false, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, null, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, undefined, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, [], out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, {}, out, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, ( x: number ): number => x, out, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+
+ snannsumpw.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, '10', 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, false, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, null, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, undefined, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, [ '1' ], 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, {}, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, x, 1, 0, out, '10', 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, true, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, false, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, null, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, undefined, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, [], 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, {}, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, ( x: number ): number => x, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, '10' ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, true ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, false ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, null ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, undefined ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, [] ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, {} ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Float32Array( 10 );
+ const out = new Float32Array( 2 );
+
+ snannsumpw.ndarray(); // $ExpectError
+ snannsumpw.ndarray( x.length ); // $ExpectError
+ snannsumpw.ndarray( x.length, x ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1 ); // $ExpectError
+ snannsumpw.ndarray( x.length, x, 1, 0, out, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/Makefile b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/Makefile
new file mode 100644
index 000000000000..25ced822f96a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 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.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := example.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled examples.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/example.c b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/example.c
new file mode 100644
index 000000000000..5ac181ee5807
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/c/example.c
@@ -0,0 +1,42 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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/snannsumpw.h"
+#include "stdlib/blas/base/shared.h"
+#include
+
+int main( void ) {
+ // Create a strided array:
+ const float x[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 0.0f/0.0f, 0.0f/0.0f };
+
+ // Specify the number of elements:
+ const int N = 5;
+
+ // Specify the stride length:
+ const int strideX = 2;
+
+ // Initialize a variable for storing the number of non-NaN elements:
+ CBLAS_INT n = 0;
+
+ // Compute the sum:
+ float v = stdlib_strided_snannsumpw( N, x, strideX, &n );
+
+ // Print the result:
+ printf( "sum: %f\n", v );
+ printf( "n: %"CBLAS_IFMT"\n", n );
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/index.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/index.js
new file mode 100644
index 000000000000..eb85fdf2f03a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/examples/index.js
@@ -0,0 +1,39 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var bernoulli = require( '@stdlib/random/base/bernoulli' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Float32Array = require( '@stdlib/array/float32' );
+var snannsumpw = require( './../lib' );
+
+function rand() {
+ if ( bernoulli( 0.5 ) < 1 ) {
+ return discreteUniform( 0, 100 );
+ }
+ return NaN;
+}
+
+var x = filledarrayBy( 10, 'float32', rand );
+console.log( x );
+
+var out = new Float32Array( 2 );
+snannsumpw( x.length, x, 1, out, 1 );
+console.log( out );
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/include.gypi b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/include.gypi
new file mode 100644
index 000000000000..ecfaf82a3279
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/include.gypi
@@ -0,0 +1,53 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2025 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.
+
+# A GYP include file for building a Node.js native add-on.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ '[ 1.0, 3 ]
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+* var snannsumpw = require( '@stdlib/blas/ext/base/snannsumpw' );
+*
+* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw.ndarray( 5, x, 2, 1, out, 1, 0 );
+* // returns [ 5.0, 4 ]
+*/
+
+// MODULES //
+
+var join = require( 'path' ).join;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isError = require( '@stdlib/assert/is-error' );
+var main = require( './main.js' );
+
+
+// MAIN //
+
+var snannsumpw;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+ snannsumpw = main;
+} else {
+ snannsumpw = tmp;
+}
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
+
+// exports: { "ndarray": "snannsumpw.ndarray" }
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/main.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/main.js
new file mode 100644
index 000000000000..959c7b8fbdd4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/main.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var snannsumpw = require( './snannsumpw.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( snannsumpw, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/native.js
new file mode 100644
index 000000000000..7a285fd37063
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/native.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var snannsumpw = require( './snannsumpw.native.js' );
+var ndarray = require( './ndarray.native.js' );
+
+
+// MAIN //
+
+setReadOnly( snannsumpw, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.js
new file mode 100644
index 000000000000..e2a74196db08
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.js
@@ -0,0 +1,78 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
+var sumpw = require( './sumpw.js' );
+
+
+// MAIN //
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* ## Method
+*
+* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
+*
+* ## References
+*
+* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Float32Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {Float32Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {NonNegativeInteger} offsetOut - starting index for `out`
+* @returns {Float32Array} output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( 5, x, 2, 1, out, 1, 0 );
+* // returns [ 5.0, 4 ]
+*/
+function snannsumpw( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
+ var io = offsetOut;
+
+ // Initialize output values:
+ out[ io ] = float64ToFloat32( -0.0 ); // note: initialize to negative zero to allow preservation of negative zero for the edge case of an input array containing only negative zeros
+ out[ io+strideOut ] = float64ToFloat32( 0 );
+
+ // Perform pairwise summation:
+ sumpw( N, x, strideX, offsetX, out, strideOut, io );
+
+ // If all elements were `NaN`, the default sum is positive zero...
+ if ( out[ io+strideOut ] === 0 ) {
+ out[ io ] = float64ToFloat32( 0.0 );
+ }
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.native.js
new file mode 100644
index 000000000000..703e741c14aa
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/ndarray.native.js
@@ -0,0 +1,57 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Float32Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {Float32Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @param {NonNegativeInteger} offsetOut - starting index for `out`
+* @returns {Float32Array} output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( 5, x, 2, 1, out, 1, 0 );
+* // returns [ 5.0, 4 ]
+*/
+function snannsumpw( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
+ addon.ndarray( N, x, strideX, offsetX, out, strideOut, offsetOut );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.js
new file mode 100644
index 000000000000..c2a49089c7c3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.js
@@ -0,0 +1,63 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* ## Method
+*
+* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
+*
+* ## References
+*
+* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Float32Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {Float32Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @returns {Float32Array} output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( x.length, x, 1, out, 1 );
+* // returns [ 1.0, 3 ]
+*/
+function snannsumpw( N, x, strideX, out, strideOut ) {
+ return ndarray( N, x, strideX, stride2offset( N, strideX ), out, strideOut, stride2offset( 2, strideOut ) ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.native.js
new file mode 100644
index 000000000000..d029373a9edf
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/snannsumpw.native.js
@@ -0,0 +1,55 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Float32Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {Float32Array} out - output array
+* @param {integer} strideOut - stride length for `out`
+* @returns {Float32Array} output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 1.0, -2.0, NaN, 2.0 ] );
+* var out = new Float32Array( 2 );
+*
+* var v = snannsumpw( x.length, x, 1, out, 1 );
+* // returns [ 1.0, 3 ]
+*/
+function snannsumpw( N, x, strideX, out, strideOut ) {
+ addon( N, x, strideX, out, strideOut );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = snannsumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/sumpw.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/sumpw.js
new file mode 100644
index 000000000000..640e9de39fd8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/lib/sumpw.js
@@ -0,0 +1,249 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var floor = require( '@stdlib/math/base/special/floor' );
+
+
+// VARIABLES //
+
+// Blocksize for pairwise summation (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.):
+var BLOCKSIZE = 128;
+
+
+// MAIN //
+
+/**
+* Computes the sum of a single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* ## Method
+*
+* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
+*
+* ## References
+*
+* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
+*
+* @private
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Float32Array} x - input array
+* @param {integer} strideX - stride length for `x`
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {Float32Array} out - two-element output array whose first element is the accumulated sum and whose second element is the accumulated number of summed values
+* @param {integer} strideOut - stride length for `out`
+* @param {NonNegativeInteger} offsetOut - starting index for `out`
+* @returns {Float32Array} output array
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var x = new Float32Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0, NaN, NaN ] );
+* var out = new Float32Array( [ 0.0, 0 ] );
+*
+* var v = sumpw( 5.0, x, 2, 1, out, 1, 0 );
+* // returns [ 5.0, 4 ]
+*/
+function sumpw( N, x, strideX, offsetX, out, strideOut, offsetOut ) { // eslint-disable-line max-statements
+ var ix;
+ var io;
+ var s0;
+ var s1;
+ var s2;
+ var s3;
+ var s4;
+ var s5;
+ var s6;
+ var s7;
+ var t0;
+ var t1;
+ var t2;
+ var t3;
+ var M;
+ var s;
+ var n;
+ var v;
+ var i;
+
+ if ( N <= 0 ) {
+ return out;
+ }
+ io = offsetOut;
+ ix = offsetX;
+ if ( strideX === 0 ) {
+ if ( isnanf( x[ ix ] ) ) {
+ return out;
+ }
+ out[ io ] += float64ToFloat32( float64ToFloat32( x[ ix ] ) * N );
+ out[ io+strideOut ] += N;
+ return out;
+ }
+ // Find the first non-NaN element...
+ for ( i = 0; i < N; i++ ) {
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ break;
+ }
+ ix += strideX;
+ }
+ // If every element was NaN, we are done...
+ if ( i === N ) {
+ return out;
+ }
+ n = 1;
+ s = float64ToFloat32( v );
+ ix += strideX;
+ i += 1;
+
+ // In order to preserve the sign of zero which can be lost during pairwise summation below, find the first non-zero element...
+ if ( s === 0.0 ) {
+ for ( ; i < N; i++ ) {
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ if ( v !== 0.0 ) {
+ break;
+ }
+ s += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ }
+ }
+ // If every subsequent element was either NaN or zero, we are done...
+ if ( i === N ) {
+ out[ io ] += float64ToFloat32( s );
+ out[ io+strideOut ] += n;
+ return out;
+ }
+ // If we are here, then we found a non-zero element and we no longer have to be concerned about preserving zero's sign...
+
+ if ( (N-i) < 8 ) {
+ // Use simple summation...
+ for ( ; i < N; i++ ) {
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ }
+ out[ io ] += float64ToFloat32( s );
+ out[ io+strideOut ] += n;
+ return out;
+ }
+ if ( (N-i) <= BLOCKSIZE ) {
+ // Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...
+ s0 = -0.0; // note: negative zero in order to ensure sign preservation if all elements are negative zero
+ s1 = -0.0;
+ s2 = -0.0;
+ s3 = -0.0;
+ s4 = -0.0;
+ s5 = -0.0;
+ s6 = -0.0;
+ s7 = -0.0;
+
+ M = (N-i) % 8;
+ for ( ; i < N-M; i += 8 ) {
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s0 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s1 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s2 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s3 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s4 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s5 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s6 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ v = x[ ix ];
+ if ( isnanf( v ) === false ) {
+ s7 += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ }
+ // Pairwise sum the accumulators:
+ t0 = float64ToFloat32( s0 ) + float64ToFloat32( s1 );
+ t1 = float64ToFloat32( s2 ) + float64ToFloat32( s3 );
+ t2 = float64ToFloat32( s4 ) + float64ToFloat32( s5 );
+ t3 = float64ToFloat32( s6 ) + float64ToFloat32( s7 );
+ s += float64ToFloat32( float64ToFloat32( t0 + t1 ) + float64ToFloat32( t2 + t3 ) ); // eslint-disable-line max-len
+
+ // Clean-up loop...
+ for ( ; i < N; i++ ) {
+ v = float64ToFloat32( x[ ix ] );
+ if ( isnanf( v ) === false ) {
+ s += float64ToFloat32( v );
+ n += 1;
+ }
+ ix += strideX;
+ }
+ out[ io ] += float64ToFloat32( s );
+ out[ io+strideOut ] += n;
+ return out;
+ }
+ out[ io ] += float64ToFloat32( s );
+ out[ io+strideOut ] += n;
+
+ // Recurse by dividing by two, but avoiding non-multiples of unroll factor...
+ n = floor( (N-i)/2 );
+ n -= n % 8;
+ sumpw( n, x, strideX, ix, out, strideOut, io );
+ sumpw( N-i-n, x, strideX, ix+(n*strideX), out, strideOut, io );
+ return out;
+}
+
+
+// EXPORTS //
+
+module.exports = sumpw;
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/manifest.json b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/manifest.json
new file mode 100644
index 000000000000..28bed73f5cb9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/manifest.json
@@ -0,0 +1,81 @@
+{
+ "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/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "examples",
+ "src": [
+ "./src/main.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/math/base/assert/is-nanf",
+ "@stdlib/blas/base/shared",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/package.json b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/package.json
new file mode 100644
index 000000000000..2d6bf77c2297
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "@stdlib/blas/ext/base/snannsumpw",
+ "version": "0.0.0",
+ "description": "Calculate the sum of single-precision floating-point strided array elements, ignoring NaN values and using pairwise summation.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "browser": "./lib/main.js",
+ "gypfile": true,
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "include": "./include",
+ "lib": "./lib",
+ "src": "./src",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "statistics",
+ "stats",
+ "mathematics",
+ "math",
+ "blas",
+ "extended",
+ "sum",
+ "total",
+ "summation",
+ "pairwise",
+ "pw",
+ "strided",
+ "strided array",
+ "typed",
+ "array",
+ "float32",
+ "single",
+ "float32array"
+ ],
+ "__stdlib__": {}
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/Makefile b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/Makefile
new file mode 100644
index 000000000000..7733b6180cb4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/Makefile
@@ -0,0 +1,70 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 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.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+
+# RULES #
+
+#/
+# Removes generated files for building an add-on.
+#
+# @example
+# make clean-addon
+#/
+clean-addon:
+ $(QUIET) -rm -f *.o *.node
+
+.PHONY: clean-addon
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean: clean-addon
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/addon.c
new file mode 100644
index 000000000000..804c85ed7cd2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/addon.c
@@ -0,0 +1,76 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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/snannsumpw.h"
+#include "stdlib/blas/base/shared.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/strided/base/stride2offset.h"
+#include
+#include
+
+/**
+* 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, 5 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
+ STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 4 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Out, 2, strideOut, argv, 3 );
+
+ int64_t io = stdlib_strided_stride2offset( 2, strideOut );
+ CBLAS_INT n;
+ Out[ io ] = API_SUFFIX(stdlib_strided_snannsumpw)( N, X, strideX, &n );
+ Out[ io + strideOut ] = (float)n;
+
+ return NULL;
+}
+
+/**
+* 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_method( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
+ STDLIB_NAPI_ARGV_INT64( env, strideOut, argv, 5 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetOut, argv, 6 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, N, strideX, argv, 1 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Out, 2, strideOut, argv, 4 );
+
+ CBLAS_INT n;
+ Out[ offsetOut ] = API_SUFFIX(stdlib_strided_snannsumpw_ndarray)( N, X, strideX, offsetX, &n );
+ Out[ offsetOut+strideOut ] = (float)n;
+
+ return NULL;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/main.c
new file mode 100644
index 000000000000..7eb5c94bbe5a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/src/main.c
@@ -0,0 +1,260 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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/snannsumpw.h"
+#include "stdlib/strided/base/stride2offset.h"
+#include "stdlib/math/base/assert/is_nanf.h"
+#include "stdlib/blas/base/shared.h"
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* @param N number of indexed elements
+* @param X input array
+* @param strideX stride length
+* @param offsetX starting index
+* @param sum pointer for storing the sum
+* @param n pointer for storing the number of non-NaN elements
+*/
+static void sumpw( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *sum, CBLAS_INT *n ) {
+ CBLAS_INT ix;
+ CBLAS_INT M;
+ CBLAS_INT m;
+ CBLAS_INT i;
+ float s0;
+ float s1;
+ float s2;
+ float s3;
+ float s4;
+ float s5;
+ float s6;
+ float s7;
+ float s;
+ float v;
+
+ if ( N <= 0 ) {
+ return;
+ }
+ ix = offsetX;
+ if ( strideX == 0 ) {
+ if ( stdlib_base_is_nanf( X[ ix ] ) ) {
+ return;
+ }
+ *sum = X[ ix ] * N;
+ *n += N;
+ return;
+ }
+ // Find the first non-NaN element...
+ for ( i = 0; i < N; i++ ) {
+ v = X[ ix ];
+ if ( !stdlib_base_is_nanf( v ) ) {
+ break;
+ }
+ ix += strideX;
+ }
+ // If every element was NaN, we are done...
+ if ( i == N ) {
+ return;
+ }
+ *n += 1;
+ s = v;
+ ix += strideX;
+ i += 1;
+
+ // In order to preserve the sign of zero which can be lost during pairwise summation below, find the first non-zero element...
+ if ( s == 0.0f ) {
+ for ( ; i < N; i++ ) {
+ v = X[ ix ];
+ if ( !stdlib_base_is_nanf( v ) ) {
+ if ( v != 0.0f ) {
+ break;
+ }
+ s += v;
+ *n += 1;
+ }
+ ix += strideX;
+ }
+ }
+ // If every subsequent element was either NaN or zero, we are done...
+ if ( i == N ) {
+ *sum += s;
+ return;
+ }
+ // If we are here, then we found a non-zero element and we no longer have to be concerned about preserving zero's sign...
+
+ if ( (N-i) < 8 ) {
+ // Use simple summation...
+ for ( ; i < N; i++ ) {
+ v = X[ ix ];
+ if ( v == v ) {
+ s += v;
+ *n += 1;
+ }
+ ix += strideX;
+ }
+ *sum += s;
+ return;
+ }
+ // Blocksize for pairwise summation: 128 (NOTE: decreasing the blocksize decreases rounding error as more pairs are summed, but also decreases performance. Because the inner loop is unrolled eight times, the blocksize is effectively `16`.)
+ if ( (N-i) <= 128 ) {
+ // Sum a block with 8 accumulators (by loop unrolling, we lower the effective blocksize to 16)...
+ s0 = 0.0f;
+ s1 = 0.0f;
+ s2 = 0.0f;
+ s3 = 0.0f;
+ s4 = 0.0f;
+ s5 = 0.0f;
+ s6 = 0.0f;
+ s7 = 0.0f;
+
+ M = (N-i) % 8;
+ for ( ; i < N-M; i += 8 ) {
+ v = X[ ix ];
+ if ( v == v ) {
+ s0 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s1 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s2 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s3 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s4 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s5 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s6 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ v = X[ ix ];
+ if ( v == v ) {
+ s7 += v;
+ *n += 1;
+ }
+ ix += strideX;
+ }
+ // Pairwise sum the accumulators:
+ s += ( (s0+s1) + (s2+s3) ) + ( (s4+s5) + (s6+s7) );
+
+ // Clean-up loop...
+ for ( ; i < N; i++ ) {
+ v = X[ ix ];
+ if ( v == v ) {
+ s += v;
+ *n += 1;
+ }
+ ix += strideX;
+ }
+ *sum += s;
+ return;
+ }
+ *sum += s;
+
+ // Recurse by dividing by two, but avoiding non-multiples of unroll factor...
+ m = (N-i) / 2;
+ m -= m % 8;
+ sumpw( m, X, strideX, ix, sum, n );
+ sumpw( N-i-m, X, strideX, ix+(m*strideX), sum, n );
+ return;
+}
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation.
+*
+* ## Method
+*
+* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
+*
+* ## References
+*
+* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
+*
+* @param N number of indexed elements
+* @param X input array
+* @param strideX stride length
+* @param n pointer for storing the number of non-NaN elements
+* @return output value
+*/
+float API_SUFFIX(stdlib_strided_snannsumpw)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, CBLAS_INT *n ) {
+ CBLAS_INT ox;
+
+ *n = 0;
+ ox = stdlib_strided_stride2offset( N, strideX );
+ return API_SUFFIX(stdlib_strided_snannsumpw_ndarray)( N, X, strideX, ox, n );
+}
+
+/**
+* Computes the sum of single-precision floating-point strided array elements, ignoring `NaN` values and using pairwise summation and alternative indexing semantics.
+*
+* ## Method
+*
+* - This implementation uses pairwise summation, which accrues rounding error `O(log2 N)` instead of `O(N)`. The recursion depth is also `O(log2 N)`.
+*
+* ## References
+*
+* - Higham, Nicholas J. 1993. "The Accuracy of Floating Point Summation." _SIAM Journal on Scientific Computing_ 14 (4): 783–99. doi:[10.1137/0914050](https://doi.org/10.1137/0914050).
+*
+* @param N number of indexed elements
+* @param X input array
+* @param strideX stride length
+* @param offsetX starting index
+* @param n pointer for storing the number of non-NaN elements
+* @return output value
+*/
+float API_SUFFIX(stdlib_strided_snannsumpw_ndarray)( const CBLAS_INT N, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, CBLAS_INT *n ) {
+ float sum;
+ float *sp = ∑
+
+ // Initialize output values:
+ *sp = -0.0; // note: initialize to negative zero to allow preservation of negative zero for the edge case of an input array containing only negative zeros
+ *n = 0;
+
+ // Perform pairwise summation:
+ sumpw( N, X, strideX, offsetX, sp, n );
+
+ // If all elements were `NaN`, the default sum is positive zero...
+ if ( *n == 0 ) {
+ *sp = 0.0;
+ }
+ return *sp;
+}
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.js
new file mode 100644
index 000000000000..806056b68c3d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var snannsumpw = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': IS_BROWSER
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof snannsumpw, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof snannsumpw.ndarray, 'function', 'method is a function' );
+ t.end();
+});
+
+tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) {
+ var snannsumpw = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( snannsumpw, mock, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return mock;
+ }
+
+ function mock() {
+ // Mock...
+ }
+});
+
+tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) {
+ var snannsumpw;
+ var main;
+
+ main = require( './../lib/snannsumpw.js' );
+
+ snannsumpw = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( snannsumpw, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.js
new file mode 100644
index 000000000000..60e51ed348f7
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.js
@@ -0,0 +1,320 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var isSameFloat32Array = require( '@stdlib/assert/is-same-float32array' );
+var snannsumpw = require( './../lib/ndarray.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof snannsumpw, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 7', function test( t ) {
+ t.strictEqual( snannsumpw.length, 7, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the sum of strided array elements (ignoring NaN values)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+ var i;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 0.0, NaN, 3.0, 0.0, -3.0, 3.0, NaN ] ); // eslint-disable-line max-len
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 3.0, 9.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 3.0, 6.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ -4.0, NaN, -4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -8.0, 2.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, 1.0e38, 1.0, -1.0e38 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 4.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( 1000 );
+ for ( i = 0; i < x.length; i++ ) {
+ x[ i ] = 2.0;
+ }
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 2000.0, 1000.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function preserves the sign of zero', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ -0.0, -0.0, -0.0, -0.0, -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -0.0, 5.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ -0.0, -0.0, 0.0, -0.0, -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 5.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ 0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -0.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 0, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( -1, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter equal to `1`, the function returns the first indexed element', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 1, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 1.0, 1.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a `stride` parameter', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 1.0, // 0
+ 2.0,
+ 2.0, // 1
+ -7.0,
+ -2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 2.0,
+ NaN, // 4
+ NaN
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, 0, out, 2, 0 );
+
+ expected = new Float32Array( [ 5.0, 0.0, 4.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative `stride` parameter', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ NaN, // 4
+ NaN,
+ 1.0, // 3
+ 2.0,
+ 2.0, // 2
+ -7.0,
+ -2.0, // 1
+ 3.0,
+ 4.0, // 0
+ 2.0
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, -2, 8, out, -2, 2 );
+
+ expected = new Float32Array( [ 4.0, 0.0, 5.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided a `stride` parameter equal to `0`, the function returns the sum of the first element repeated N times', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 0, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 5.0, 5.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `offset` parameters', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 2.0,
+ 1.0, // 0
+ 2.0,
+ -2.0, // 1
+ -2.0,
+ 2.0, // 2
+ 3.0,
+ 4.0, // 3
+ NaN,
+ NaN // 4
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, 1, out, 2, 1 );
+
+ expected = new Float32Array( [ 0.0, 5.0, 0.0, 4.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.native.js
new file mode 100644
index 000000000000..52798aed98c3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.ndarray.native.js
@@ -0,0 +1,329 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var isSameFloat32Array = require( '@stdlib/assert/is-same-float32array' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var snannsumpw = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( snannsumpw instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof snannsumpw, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 7', opts, function test( t ) {
+ t.strictEqual( snannsumpw.length, 7, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the sum of strided array elements (ignoring NaN values)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+ var i;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 0.0, NaN, 3.0, 0.0, -3.0, 3.0, NaN ] ); // eslint-disable-line max-len
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 3.0, 9.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 3.0, 6.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ -4.0, NaN, -4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -8.0, 2.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, 1.0e38, 1.0, -1.0e38 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 4.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( 1000 );
+ for ( i = 0; i < x.length; i++ ) {
+ x[ i ] = 2.0;
+ }
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 2000.0, 1000.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function preserves the sign of zero', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ -0.0, -0.0, -0.0, -0.0, -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -0.0, 5.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ -0.0, -0.0, 0.0, -0.0, -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 5.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ 0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ x = new Float32Array( [ -0.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ -0.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `0.0`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 0, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( -1, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.strictEqual( isSameFloat32Array( v, expected ), true, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter equal to `1`, the function returns the first indexed element', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 1, x, 1, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 1.0, 1.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a `stride` parameter', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 1.0, // 0
+ 2.0,
+ 2.0, // 1
+ -7.0,
+ -2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 2.0,
+ NaN, // 4
+ NaN
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, 0, out, 2, 0 );
+
+ expected = new Float32Array( [ 5.0, 0.0, 4.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports a negative `stride` parameter', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ NaN, // 4
+ NaN,
+ 1.0, // 3
+ 2.0,
+ 2.0, // 2
+ -7.0,
+ -2.0, // 1
+ 3.0,
+ 4.0, // 0
+ 2.0
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, -2, 8, out, -2, 2 );
+
+ expected = new Float32Array( [ 4.0, 0.0, 5.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided a `stride` parameter equal to `0`, the function returns the sum of the first element repeated N times', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 0, 0, out, 1, 0 );
+
+ expected = new Float32Array( [ 5.0, 5.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `offset` parameters', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 2.0,
+ 1.0, // 0
+ 2.0,
+ -2.0, // 1
+ -2.0,
+ 2.0, // 2
+ 3.0,
+ 4.0, // 3
+ NaN,
+ NaN // 4
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, 1, out, 2, 1 );
+
+ expected = new Float32Array( [ 0.0, 5.0, 0.0, 4.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.js
new file mode 100644
index 000000000000..c8a8397b808d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.js
@@ -0,0 +1,284 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var snannsumpw = require( './../lib/snannsumpw.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof snannsumpw, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 5', function test( t ) {
+ t.strictEqual( snannsumpw.length, 5, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the sum of strided array elements (ignoring NaN values)', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+ var i;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 0.0, NaN, 3.0, 0.0, -3.0, 3.0, NaN ] ); // eslint-disable-line max-len
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 3.0, 9.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 3.0, 6.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ -4.0, NaN, -4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ -8.0, 2.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( v[ 0 ], 0.0, 'returns expected value' );
+ t.strictEqual( v[ 1 ], 0.0, 'returns expected value' );
+
+ x = new Float32Array( [ NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( v[ 0 ], 0.0, 'returns expected value' );
+ t.strictEqual( v[ 1 ], 0.0, 'returns expected value' );
+
+ x = new Float32Array( [ 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, 1.0e38, 1.0, -1.0e38 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 4.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( 1000 );
+ for ( i = 0; i < x.length; i++ ) {
+ x[ i ] = 2.0;
+ }
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 2000.0, 1000.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns a sum equal to `0.0`', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 0, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( -1, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter equal to `1`, the function returns a sum equal to the first element', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 1, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 1.0, 1.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `stride` parameters', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 1.0, // 0
+ 2.0,
+ 2.0, // 1
+ -7.0,
+ -2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 2.0,
+ NaN, // 4
+ NaN
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, out, 2 );
+
+ expected = new Float32Array( [ 5.0, 0.0, 4.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports negative `stride` parameters', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ NaN, // 4
+ NaN,
+ 1.0, // 3
+ 2.0,
+ 2.0, // 2
+ -7.0,
+ -2.0, // 1
+ 3.0,
+ 4.0, // 0
+ 2.0
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, -2, out, -2 );
+
+ expected = new Float32Array( [ 4.0, 0.0, 5.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided a `stride` parameter equal to `0`, the function returns the sum of the first element repeated N times', function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 0, out, 1 );
+
+ expected = new Float32Array( [ 5.0, 5.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports view offsets', function test( t ) {
+ var expected0;
+ var expected1;
+ var out0;
+ var out1;
+ var x0;
+ var x1;
+ var v;
+
+ x0 = new Float32Array([
+ 2.0,
+ 1.0, // 0
+ 2.0,
+ -2.0, // 1
+ -2.0,
+ 2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 6.0,
+ NaN, // 4
+ NaN
+ ]);
+ out0 = new Float32Array( 4 );
+
+ x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+ out1 = new Float32Array( out0.buffer, out0.BYTES_PER_ELEMENT*2 ); // start at the 3rd element
+
+ v = snannsumpw( 5, x1, 2, out1, 1 );
+
+ expected0 = new Float32Array( [ 0.0, 0.0, 5.0, 4.0 ] );
+ expected1 = new Float32Array( [ 5.0, 4.0 ] );
+
+ t.deepEqual( out0, expected0, 'returns expected value' );
+ t.deepEqual( v, expected1, 'returns expected value' );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.native.js b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.native.js
new file mode 100644
index 000000000000..04f25bd96ffd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/ext/base/snannsumpw/test/test.snannsumpw.native.js
@@ -0,0 +1,293 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var snannsumpw = tryRequire( resolve( __dirname, './../lib/snannsumpw.native.js' ) );
+var opts = {
+ 'skip': ( snannsumpw instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof snannsumpw, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 5', opts, function test( t ) {
+ t.strictEqual( snannsumpw.length, 5, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function calculates the sum of strided array elements (ignoring NaN values)', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+ var i;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 0.0, NaN, 3.0, 0.0, -3.0, 3.0, NaN ] ); // eslint-disable-line max-len
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 3.0, 9.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, NaN, 5.0, 0.0, 3.0, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 3.0, 6.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ -4.0, NaN, -4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ -8.0, 2.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ NaN, NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( v[ 0 ], 0.0, 'returns expected value' );
+ t.strictEqual( v[ 1 ], 0.0, 'returns expected value' );
+
+ x = new Float32Array( [ NaN ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ t.strictEqual( v, out, 'returns expected value' );
+ t.strictEqual( v[ 0 ], 0.0, 'returns expected value' );
+ t.strictEqual( v[ 1 ], 0.0, 'returns expected value' );
+
+ x = new Float32Array( [ 4.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 4.0, 1.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( [ 1.0, 1.0e38, 1.0, -1.0e38 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 4.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ x = new Float32Array( 1000 );
+ for ( i = 0; i < x.length; i++ ) {
+ x[ i ] = 2.0;
+ }
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 2000.0, 1000.0 ] );
+ t.strictEqual( v, out, 'returns expected value' );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns a sum equal to `0.0`', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 0, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( -1, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 0.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter equal to `1`, the function returns a sum equal to the first element', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( 1, x, 1, out, 1 );
+
+ expected = new Float32Array( [ 1.0, 1.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports `stride` parameters', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ 1.0, // 0
+ 2.0,
+ 2.0, // 1
+ -7.0,
+ -2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 2.0,
+ NaN, // 4
+ NaN
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, 2, out, 2 );
+
+ expected = new Float32Array( [ 5.0, 0.0, 4.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports negative `stride` parameters', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array([
+ NaN, // 4
+ NaN,
+ 1.0, // 3
+ 2.0,
+ 2.0, // 2
+ -7.0,
+ -2.0, // 1
+ 3.0,
+ 4.0, // 0
+ 2.0
+ ]);
+ out = new Float32Array( 4 );
+
+ v = snannsumpw( 5, x, -2, out, -2 );
+
+ expected = new Float32Array( [ 4.0, 0.0, 5.0, 0.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided a `stride` parameter equal to `0`, the function returns the sum of the first element repeated N times', opts, function test( t ) {
+ var expected;
+ var out;
+ var x;
+ var v;
+
+ x = new Float32Array( [ 1.0, -2.0, -4.0, 5.0, 3.0 ] );
+
+ out = new Float32Array( 2 );
+ v = snannsumpw( x.length, x, 0, out, 1 );
+
+ expected = new Float32Array( [ 5.0, 5.0 ] );
+ t.deepEqual( v, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports view offsets', opts, function test( t ) {
+ var expected0;
+ var expected1;
+ var out0;
+ var out1;
+ var x0;
+ var x1;
+ var v;
+
+ x0 = new Float32Array([
+ 2.0,
+ 1.0, // 0
+ 2.0,
+ -2.0, // 1
+ -2.0,
+ 2.0, // 2
+ 3.0,
+ 4.0, // 3
+ 6.0,
+ NaN, // 4
+ NaN
+ ]);
+ out0 = new Float32Array( 4 );
+
+ x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+ out1 = new Float32Array( out0.buffer, out0.BYTES_PER_ELEMENT*2 ); // start at the 3rd element
+
+ v = snannsumpw( 5, x1, 2, out1, 1 );
+
+ expected0 = new Float32Array( [ 0.0, 0.0, 5.0, 4.0 ] );
+ expected1 = new Float32Array( [ 5.0, 4.0 ] );
+
+ t.deepEqual( out0, expected0, 'returns expected value' );
+ t.deepEqual( v, expected1, 'returns expected value' );
+
+ t.end();
+});