diff --git a/lib/node_modules/@stdlib/blas/base/zscal/README.md b/lib/node_modules/@stdlib/blas/base/zscal/README.md
new file mode 100644
index 000000000000..f27ef7888305
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/README.md
@@ -0,0 +1,346 @@
+
+
+# zscal
+
+> Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+
+
+
+## Usage
+
+```javascript
+var zscal = require( '@stdlib/blas/base/zscal' );
+```
+
+#### zscal( N, za, zx, strideX )
+
+Scales values from `zx` by `za`.
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var real = require( '@stdlib/complex/real' );
+var imag = require( '@stdlib/complex/imag' );
+
+var zx = new Complex128Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
+var za = new Complex128( 2.0, 0.0 );
+
+zscal( 3, za, zx, 1 );
+
+var z = zx.get( 0 );
+// returns
+
+var re = real( z );
+// returns 2.0
+
+var im = imag( z );
+// returns 2.0
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **za**: scalar [`Complex128`][@stdlib/complex/float64/ctor] constant.
+- **zx**: input [`Complex128Array`][@stdlib/array/complex128].
+- **strideX**: index increment for `zx`.
+
+The `N` and stride parameters determine how values from `zx` are scaled by `za`. For example, to scale every other value in `zx` by `za`,
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var real = require( '@stdlib/complex/real' );
+var imag = require( '@stdlib/complex/imag' );
+
+var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var za = new Complex128( 2.0, 0.0 );
+
+zscal( 2, za, zx, 2 );
+
+var z = zx.get( 2 );
+// returns
+
+var re = real( z );
+// returns 10.0
+
+var im = imag( z );
+// returns 12.0
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var real = require( '@stdlib/complex/real' );
+var imag = require( '@stdlib/complex/imag' );
+
+// Initial array:
+var zx0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+// Define a scalar constant:
+var za = new Complex128( 2.0, 2.0 );
+
+// Create an offset view:
+var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+// Scales every other value from `zx1` by `za`...
+zscal( 3, za, zx1, 1 );
+
+var z = zx0.get( 1 );
+// returns
+
+var re = real( z );
+// returns -2.0
+
+var im = imag( z );
+// returns 14.0
+```
+
+#### zscal.ndarray( N, za, zx, strideX, offsetX )
+
+Scales values from `zx` by `za` using alternative indexing semantics.
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var real = require( '@stdlib/complex/real' );
+var imag = require( '@stdlib/complex/imag' );
+
+var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+var za = new Complex128( 2.0, 2.0 );
+
+zscal.ndarray( 3, za, zx, 1, 0 );
+
+var z = zx.get( 0 );
+// returns
+
+var re = real( z );
+// returns -2.0
+
+var im = imag( z );
+// returns 6.0
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `zx`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to scale every other value in the input strided array starting from the second element,
+
+```javascript
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var real = require( '@stdlib/complex/real' );
+var imag = require( '@stdlib/complex/imag' );
+
+var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var za = new Complex128( 2.0, 2.0 );
+
+zscal.ndarray( 2, za, zx, 2, 1 );
+
+var z = zx.get( 3 );
+// returns
+
+var re = real( z );
+// returns -2.0
+
+var im = imag( z );
+// returns 30.0
+```
+
+
+
+
+
+
+
+## Notes
+
+- If `N <= 0` or `strideX <= 0` , both functions return `zx` unchanged.
+- `zscal()` corresponds to the [BLAS][blas] level 1 function [`zscal`][zscal].
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var zscal = require( '@stdlib/blas/base/zscal' );
+
+function rand() {
+ return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
+}
+
+var zx = filledarrayBy( 10, 'complex128', rand );
+console.log( zx.toString() );
+
+var za = new Complex128( 2.0, 2.0 );
+console.log( za.toString() );
+
+// Scales elements from `zx` by `za`:
+zscal( zx.length, za, zx, 1 );
+console.log( zx.get( zx.length-1 ).toString() );
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/base/zscal.h"
+```
+
+#### c_zscal( N, za, \*ZX, strideX )
+
+Scales values from `ZX` by `za`.
+
+```c
+#include "stdlib/complex/float64/ctor.h"
+
+double zx[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+const stdlib_complex128_t za = stdlib_complex128( 2.0, 2.0 );
+
+c_zscal( 4, za, (void *)zx, 1 );
+```
+
+The function accepts the following arguments:
+
+- **N**: `[in] CBLAS_INT` number of indexed elements.
+- **za**: `[in] stdlib_complex128_t` scalar constant.
+- **ZX**: `[inout] void*` input array.
+- **strideX**: `[in] CBLAS_INT` index increment for `ZX`.
+
+```c
+void c_zscal( const CBLAS_INT N, const stdlib_complex128_t za, void *ZX, const CBLAS_INT strideX );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/complex/float64/ctor.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ double zx[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Create a complex scalar:
+ const stdlib_complex128_t ca = stdlib_complex128( 2.0, 2.0 );
+
+ // Specify the number of elements:
+ const int N = 4;
+
+ // Specify stride length:
+ const int strideX = 1;
+
+ // Scale the elements of the array:
+ c_zscal( N, za, (void *)zx, strideX );
+
+ // Print the result:
+ for ( int i = 0; i < N; i++ ) {
+ printf( "zx[ %i ] = %f + %fj\n", i, zx[ i*2 ], zx[ (i*2)+1 ] );
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[blas]: http://www.netlib.org/blas
+
+[zscal]: https://netlib.org/lapack/explore-html-3.6.1/d2/df9/group__complex16__blas__level1_gaceea1208dcd46b6e5468fbfb53b9281b.html
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+[@stdlib/array/complex128]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex128
+
+[@stdlib/complex/float64/ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/complex/float64/ctor
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js
new file mode 100644
index 000000000000..411fa52eaa30
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.js
@@ -0,0 +1,111 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var pkg = require( './../package.json' ).name;
+var zscal = require( './../lib/zscal.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zxbuf;
+ var za;
+ var zx;
+
+ zxbuf = uniform( len*2, -100.0, 100.0, options );
+ zx = new Complex128Array( zxbuf.buffer );
+
+ za = new Complex128( 1.0, 0.0 );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zscal( zx.length, za, zx, 1 );
+ if ( isnan( zxbuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( zxbuf[ i%(len*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/base/zscal/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..4c0b66f05081
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.native.js
@@ -0,0 +1,116 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var zscal = tryRequire( resolve( __dirname, './../lib/zscal.native.js' ) );
+var opts = {
+ 'skip': ( zscal instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zxbuf;
+ var za;
+ var zx;
+
+ zxbuf = uniform( len*2, -100.0, 100.0, options );
+ zx = new Complex128Array( zxbuf.buffer );
+
+ za = new Complex128( 1.0, 0.0 );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zscal( zx.length, za, zx, 1 );
+ if ( isnan( zxbuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( zxbuf[ i%(len*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/base/zscal/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..4784b36e9801
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.js
@@ -0,0 +1,111 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var pkg = require( './../package.json' ).name;
+var zscal = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zxbuf;
+ var za;
+ var zx;
+
+ zxbuf = uniform( len*2, -100.0, 100.0, options );
+ zx = new Complex128Array( zxbuf.buffer );
+
+ za = new Complex128( 1.0, 0.0 );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zscal( zx.length, za, zx, 1, 0 );
+ if ( isnan( zxbuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( zxbuf[ i%(len*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/base/zscal/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..5b78b2319e67
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,116 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var zscal = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( zscal instanceof Error )
+};
+var options = {
+ 'dtype': 'float64'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var zxbuf;
+ var za;
+ var zx;
+
+ zxbuf = uniform( len*2, -100.0, 100.0, options );
+ zx = new Complex128Array( zxbuf.buffer );
+
+ za = new Complex128( 1.0, 0.0 );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ zscal( zx.length, za, zx, 1, 0 );
+ if ( isnan( zxbuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnan( zxbuf[ i%(len*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/base/zscal/benchmark/c/Makefile b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/Makefile
new file mode 100644
index 000000000000..9f97140e7cb0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# 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/base/zscal/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..41a7b1ed2b58
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/c/benchmark.length.c
@@ -0,0 +1,156 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/**
+* Benchmark `zscal`.
+*/
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/complex/float64/ctor.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "zscal"
+#define ITERATIONS 10000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* Prints the TAP version.
+*/
+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
+*/
+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
+*/
+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
+*/
+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
+*/
+double rand_double( void ) {
+ int r = rand();
+ return (double)r / ( (double)RAND_MAX + 1.0 );
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param len array length
+* @return elapsed time in seconds
+*/
+double benchmark( int iterations, int len ) {
+ stdlib_complex128_t za;
+ double zx[ len*2 ];
+ double elapsed;
+ double t;
+ int i;
+
+ za = stdlib_complex128( rand_double()*1.0, rand_double()*0.0 );
+ for ( i = 0; i < len*2; i+=2 ) {
+ zx[ i ] = ( rand_double()*10000.0 ) - 5000.0;
+ zx[ i+1 ] = ( rand_double()*10000.0 ) - 5000.0;
+ }
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ c_zscal( len, za, (void *)zx, 1 );
+ if ( zx[ 0 ] != zx[ 0 ] ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( zx[ 0 ] != zx[ 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 = benchmark( 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/base/zscal/benchmark/fortran/Makefile b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/Makefile
new file mode 100644
index 000000000000..28b70ff7f607
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/Makefile
@@ -0,0 +1,141 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# 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 Fortran source files:
+ifdef FORTRAN_COMPILER
+ FC := $(FORTRAN_COMPILER)
+else
+ FC := gfortran
+endif
+
+# Define the command-line options when compiling Fortran files:
+FFLAGS ?= \
+ -std=f95 \
+ -ffree-form \
+ -O3 \
+ -Wall \
+ -Wextra \
+ -Wno-compare-reals \
+ -Wimplicit-interface \
+ -fno-underscoring \
+ -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 ?=
+
+# List of Fortran source files:
+SOURCE_FILES ?= ../../src/zscal.f
+
+# List of Fortran targets:
+f_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles Fortran source files.
+#
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} [FORTRAN_COMPILER] - Fortran compiler
+# @param {string} [FFLAGS] - Fortran compiler flags
+# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(f_targets)
+
+.PHONY: all
+
+#/
+# Compiles Fortran source files.
+#
+# @private
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} FC - Fortran compiler
+# @param {string} FFLAGS - Fortran compiler flags
+# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
+#/
+$(f_targets): %.out: %.f
+ $(QUIET) $(FC) $(FFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $<
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(f_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/base/zscal/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f
new file mode 100644
index 000000000000..be01acef38b8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/benchmark/fortran/benchmark.length.f
@@ -0,0 +1,222 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2024 The Stdlib Authors.
+!
+! Licensed under the Apache License, Version 2.0 (the "License");
+! you may not use this file except in compliance with the License.
+! You may obtain a copy of the License at
+!
+! http://www.apache.org/licenses/LICENSE-2.0
+!
+! Unless required by applicable law or agreed to in writing, software
+! distributed under the License is distributed on an "AS IS" BASIS,
+! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+! See the License for the specific language governing permissions and
+! limitations under the License.
+!<
+
+!> Benchmark `zscal`.
+!
+! ## Notes
+!
+! - Written in "free form" Fortran 95.
+!
+!<
+program bench
+ implicit none
+ ! ..
+ ! Local constants:
+ character(5), parameter :: name = 'zscal' ! if changed, be sure to adjust length
+ integer, parameter :: iterations = 10000000
+ integer, parameter :: repeats = 3
+ integer, parameter :: min = 1
+ integer, parameter :: max = 6
+ ! ..
+ ! Run the benchmarks:
+ call main()
+ ! ..
+ ! Functions:
+contains
+ ! ..
+ ! Prints the TAP version.
+ ! ..
+ subroutine print_version()
+ print '(A)', 'TAP version 13'
+ end subroutine print_version
+ ! ..
+ ! Prints the TAP summary.
+ !
+ ! @param {integer} total - total number of tests
+ ! @param {integer} passing - total number of passing tests
+ ! ..
+ subroutine print_summary( total, passing )
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: total, passing
+ ! ..
+ ! Local variables:
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim
+ ! ..
+ print '(A)', '#'
+ ! ..
+ write (str, '(I15)') total ! TAP plan
+ tmp = adjustl( str )
+ print '(A,A)', '1..', trim( tmp )
+ ! ..
+ print '(A,A)', '# total ', trim( tmp )
+ ! ..
+ write (str, '(I15)') passing
+ tmp = adjustl( str )
+ print '(A,A)', '# pass ', trim( tmp )
+ ! ..
+ print '(A)', '#'
+ print '(A)', '# ok'
+ end subroutine print_summary
+ ! ..
+ ! Prints benchmarks results.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {double} elapsed - elapsed time in seconds
+ ! ..
+ subroutine print_results( iterations, elapsed )
+ ! ..
+ ! Scalar arguments:
+ double precision, intent(in) :: elapsed
+ integer, intent(in) :: iterations
+ ! ..
+ ! Local variables:
+ double precision :: rate
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic dble, adjustl, trim
+ ! ..
+ rate = dble( iterations ) / elapsed
+ ! ..
+ print '(A)', ' ---'
+ ! ..
+ write (str, '(I15)') iterations
+ tmp = adjustl( str )
+ print '(A,A)', ' iterations: ', trim( tmp )
+ ! ..
+ write (str, '(f0.9)') elapsed
+ tmp = adjustl( str )
+ print '(A,A)', ' elapsed: ', trim( tmp )
+ ! ..
+ write( str, '(f0.9)') rate
+ tmp = adjustl( str )
+ print '(A,A)', ' rate: ', trim( tmp )
+ ! ..
+ print '(A)', ' ...'
+ end subroutine print_results
+ ! ..
+ ! Runs a benchmark.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {integer} len - array length
+ ! @return {double} elapsed time in seconds
+ ! ..
+ double precision function benchmark( iterations, len )
+ ! ..
+ ! External functions:
+ interface
+ subroutine zscal( N, za, zx, strideX )
+ complex(kind=kind(0.0d0)) :: za, zx(*)
+ integer :: strideX, N
+ end subroutine zscal
+ end interface
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: iterations, len
+ ! ..
+ ! Local scalars:
+ double precision :: elapsed, r1, r2
+ real :: t1, t2
+ integer :: i
+ ! ..
+ ! Local array:
+ complex(kind=kind(0.0d0)), allocatable :: x(:)
+ ! ..
+ ! Local scalar:
+ complex(kind=kind(0.0d0)) :: za
+ ! ..
+ ! Intrinsic functions:
+ intrinsic random_number, cpu_time, cmplx
+ ! ..
+ ! Allocate array:
+ allocate( x(len) )
+ ! ..
+ call random_number( r1 )
+ call random_number( r2 )
+ za = cmplx( (r1*1.0d0), (r2*0.0d0), kind=kind(0.0d0) )
+ do i = 1, len
+ call random_number( r1 )
+ call random_number( r2 )
+ x( i ) = cmplx( (r1*10000.0d0)-5000.0d0, (r2*1000.0d0)-5000.0d0, kind=kind(0.0d0) )
+ end do
+ ! ..
+ call cpu_time( t1 )
+ ! ..
+ do i = 1, iterations
+ call zscal( len, za, x, 1 );
+ if ( x( 1 ) /= x( 1 ) ) then
+ print '(A)', 'should not return NaN'
+ exit
+ end if
+ end do
+ ! ..
+ call cpu_time( t2 )
+ ! ..
+ elapsed = t2 - t1
+ ! ..
+ if ( x( 1 ) /= x( 1 ) ) then
+ print '(A)', 'should not return NaN'
+ end if
+ ! ..
+ ! Deallocate array:
+ deallocate( x )
+ ! ..
+ benchmark = elapsed
+ return
+ end function benchmark
+ ! ..
+ ! Main execution sequence.
+ ! ..
+ subroutine main()
+ ! ..
+ ! Local variables:
+ integer :: count, iter, len, i, j
+ double precision :: elapsed
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim
+ ! ..
+ call print_version()
+ count = 0
+ do i = min, max
+ len = 10**i
+ iter = iterations / 10**(i-1)
+ do j = 1, repeats
+ count = count + 1
+ ! ..
+ write (str, '(I15)') len
+ tmp = adjustl( str )
+ print '(A,A,A,A)', '# fortran::', name, ':len=', trim( tmp )
+ ! ..
+ elapsed = benchmark( iter, len )
+ ! ..
+ call print_results( iter, elapsed )
+ ! ..
+ write (str, '(I15)') count
+ tmp = adjustl( str )
+ print '(A,A,A)', 'ok ', trim( tmp ), ' benchmark finished'
+ end do
+ end do
+ call print_summary( count, count )
+ end subroutine main
+end program bench
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/binding.gyp b/lib/node_modules/@stdlib/blas/base/zscal/binding.gyp
new file mode 100644
index 000000000000..02a2799da097
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/binding.gyp
@@ -0,0 +1,265 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# 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',
+
+ # Fortran compiler (to override -Dfortran_compiler=):
+ 'fortran_compiler%': 'gfortran',
+
+ # Fortran compiler flags:
+ 'fflags': [
+ # Specify the Fortran standard to which a program is expected to conform:
+ '-std=f95',
+
+ # Indicate that the layout is free-form source code:
+ '-ffree-form',
+
+ # Aggressive optimization:
+ '-O3',
+
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Warn if source code contains problematic language features:
+ '-Wextra',
+
+ # Warn if a procedure is called without an explicit interface:
+ '-Wimplicit-interface',
+
+ # Do not transform names of entities specified in Fortran source files by appending underscores (i.e., don't mangle names, thus allowing easier usage in C wrappers):
+ '-fno-underscoring',
+
+ # Warn if source code contains Fortran 95 extensions and C-language constructs:
+ '-pedantic',
+
+ # Compile but do not link (output is an object file):
+ '-c',
+ ],
+
+ # 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
+
+ # Define custom build actions for particular inputs:
+ 'rules': [
+ {
+ # Define a rule for processing Fortran files:
+ 'extension': 'f',
+
+ # Define the pathnames to be used as inputs when performing processing:
+ 'inputs': [
+ # Full path of the current input:
+ '<(RULE_INPUT_PATH)'
+ ],
+
+ # Define the outputs produced during processing:
+ 'outputs': [
+ # Store an output object file in a directory for placing intermediate results (only accessible within a single target):
+ '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).<(obj)'
+ ],
+
+ # Define the rule for compiling Fortran based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+
+ # Rule to compile Fortran on Windows:
+ {
+ 'rule_name': 'compile_fortran_windows',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Windows...',
+
+ 'process_outputs_as_sources': 0,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ },
+
+ # Rule to compile Fortran on non-Windows:
+ {
+ 'rule_name': 'compile_fortran_linux',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Linux...',
+
+ 'process_outputs_as_sources': 1,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '-fPIC', # generate platform-independent code
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end rule (extension=="f")
+ ], # end rules
+ }, # 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/base/zscal/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/zscal/docs/repl.txt
new file mode 100644
index 000000000000..a128f74da9fe
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/docs/repl.txt
@@ -0,0 +1,123 @@
+
+{{alias}}( N, za, zx, strideX )
+ Scales a double-precision complex floating-point vector by a double-
+ precision complex floating-point constant.
+
+ The `N` and stride parameters determine how values from `zx` are scaled by
+ `za`.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `N` or `strideX` is less than or equal to `0`, the function returns `zx`
+ unchanged.
+
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ za: Complex128
+ Complex constant.
+
+ zx: Complex128Array
+ Input array.
+
+ strideX: integer
+ Index increment for `zx`.
+
+ Returns
+ -------
+ zx: Complex128Array
+ Input array.
+
+ Examples
+ --------
+ // Standard usage:
+ > var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
+ > {{alias}}( 2, za, zx, 1 );
+ > var z = zx.get( 0 );
+ > var re = {{alias:@stdlib/complex/real}}( z )
+ -3.0
+ > var im = {{alias:@stdlib/complex/imag}}( z )
+ 4.0
+
+ // Advanced indexing:
+ > zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ > za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 1.0 );
+ > {{alias}}( 2, za, zx, 2 );
+ > z = zx.get( 0 );
+ > re = {{alias:@stdlib/complex/real}}( z )
+ -1.0
+ > im = {{alias:@stdlib/complex/imag}}( z )
+ 3.0
+
+ // Using typed array views:
+ > var zx0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ > var zx1 = new {{alias:@stdlib/array/complex128}}( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
+ > var za = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
+ > {{alias}}( 2, za, zx1, 1 );
+ > z = zx0.get( 1 );
+ > re = {{alias:@stdlib/complex/real}}( z )
+ -2.0
+ > im = {{alias:@stdlib/complex/imag}}( z )
+ 14.0
+
+
+{{alias}}.ndarray( N, za, zx, strideX, offsetX )
+ Scales a double-precision complex floating-point vector by a double-
+ precision complex floating-point constant using alternative indexing
+ semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameter supports indexing semantics based on a starting
+ index.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ za: Complex128
+ Complex constant.
+
+ zx: Complex128Array
+ Input array.
+
+ strideX: integer
+ Index increment for `zx`.
+
+ offsetX: integer
+ Starting index for `zx`.
+
+ Returns
+ -------
+ zx: Complex128Array
+ Input array.
+
+ Examples
+ --------
+ // Standard usage:
+ > var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var za = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
+ > {{alias}}.ndarray( 2, za, zx, 1, 0 );
+ > var z = zx.get( 0 );
+ > var re = {{alias:@stdlib/complex/real}}( z )
+ -2.0
+ > var im = {{alias:@stdlib/complex/imag}}( z )
+ 6.0
+
+ // Advanced indexing:
+ > zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ > za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
+ > {{alias}}.ndarray( 2, za, zx, 1, 2 );
+ > z = zx.get( 2 );
+ > re = {{alias:@stdlib/complex/real}}( z )
+ -7.0
+ > im = {{alias:@stdlib/complex/imag}}( z )
+ 16.0
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/zscal/docs/types/index.d.ts
new file mode 100644
index 000000000000..31280d0f711e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/docs/types/index.d.ts
@@ -0,0 +1,148 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Complex128Array } from '@stdlib/types/array';
+import { Complex128 } from '@stdlib/types/complex';
+
+/**
+* Interface describing `zscal`.
+*/
+interface Routine {
+ /**
+ * Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+ *
+ * @param N - number of indexed elements
+ * @param za - scalar constant
+ * @param zx - input array
+ * @param strideX - `zx` stride length
+ * @returns input array
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ * var Complex128 = require( '@stdlib/complex/float64/ctor' );
+ * var real = require( '@stdlib/complex/real' );
+ * var imag = require( '@stdlib/complex/imag' );
+ *
+ * var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ * var za = new Complex128( 2.0, 2.0 );
+ *
+ * zscal( 3, za, zx, 1 );
+ *
+ * var z = zx.get( 0 );
+ * // returns
+ *
+ * var re = real( z );
+ * // returns -2.0
+ *
+ * var im = imag( z );
+ * // returns 6.0
+ */
+ ( N: number, za: Complex128, zx: Complex128Array, strideX: number ): Complex128Array;
+
+ /**
+ * Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+ *
+ * @param N - number of indexed elements
+ * @param za - scalar constant
+ * @param zx - input array
+ * @param strideX - `zx` stride length
+ * @param offsetX - starting index for `zx`
+ * @returns input array
+ *
+ * @example
+ * var Complex128Array = require( '@stdlib/array/complex128' );
+ * var Complex128 = require( '@stdlib/complex/float64/ctor' );
+ * var real = require( '@stdlib/complex/real' );
+ * var imag = require( '@stdlib/complex/imag' );
+ *
+ * var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ * var za = new Complex128( 2.0, 2.0 );
+ *
+ * zscal.ndarray( 3, za, zx, 1, 0 );
+ *
+ * var z = zx.get( 0 );
+ * // returns
+ *
+ * var re = real( z );
+ * // returns -2.0
+ *
+ * var im = imag( z );
+ * // returns 6.0
+ */
+ ndarray( N: number, za: Complex128, zx: Complex128Array, strideX: number, offsetX: number ): Complex128Array;
+}
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param N - number of indexed elements
+* @param za - scalar constant
+* @param zx - input array
+* @param strideX - `zx` stride length
+* @returns input array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal( 3, za, zx, 1 );
+*
+* var z = zx.get( 1 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 14.0
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal.ndarray( 2, za, zx, 1, 1 );
+*
+* var z = zx.get( 1 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 14.0
+*/
+declare var zscal: Routine;
+
+
+// EXPORTS //
+
+export = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/zscal/docs/types/test.ts
new file mode 100644
index 000000000000..3a8aced11a20
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/docs/types/test.ts
@@ -0,0 +1,202 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import Complex128Array = require( '@stdlib/array/complex128' );
+import Complex128 = require( '@stdlib/complex/float64/ctor' );
+import zscal = require( './index' );
+
+
+// TESTS //
+
+// The function returns a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal( zx.length, za, zx, 1 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal( '10', za, zx, 1 ); // $EzxpectError
+ zscal( true, za, zx, 1 ); // $ExpectError
+ zscal( false, za, zx, 1 ); // $ExpectError
+ zscal( null, za, zx, 1 ); // $ExpectError
+ zscal( undefined, za, zx, 1 ); // $ExpectError
+ zscal( [], za, zx, 1 ); // $ExpectError
+ zscal( {}, za, zx, 1 ); // $ExpectError
+ zscal( ( zx: number ): number => zx, za, zx, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a complex number...
+{
+ const zx = new Complex128Array( 10 );
+
+ zscal( zx.length, 10, zx, 1 ); // $ExpectError
+ zscal( zx.length, '10', zx, 1 ); // $ExpectError
+ zscal( zx.length, true, zx, 1 ); // $ExpectError
+ zscal( zx.length, false, zx, 1 ); // $ExpectError
+ zscal( zx.length, null, zx, 1 ); // $ExpectError
+ zscal( zx.length, undefined, zx, 1 ); // $ExpectError
+ zscal( zx.length, [ '1' ], zx, 1 ); // $ExpectError
+ zscal( zx.length, {}, zx, 1 ); // $ExpectError
+ zscal( zx.length, ( zx: number ): number => zx, zx, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal( zx.length, za, 10, 1 ); // $ExpectError
+ zscal( zx.length, za, '10', 1 ); // $ExpectError
+ zscal( zx.length, za, true, 1 ); // $ExpectError
+ zscal( zx.length, za, false, 1 ); // $ExpectError
+ zscal( zx.length, za, null, 1 ); // $ExpectError
+ zscal( zx.length, za, undefined, 1 ); // $ExpectError
+ zscal( zx.length, za, [ '1' ], 1 ); // $ExpectError
+ zscal( zx.length, za, {}, 1 ); // $ExpectError
+ zscal( zx.length, za, ( zx: number ): number => zx, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal( zx.length, za, zx, '10' ); // $ExpectError
+ zscal( zx.length, za, zx, true ); // $ExpectError
+ zscal( zx.length, za, zx, false ); // $ExpectError
+ zscal( zx.length, za, zx, null ); // $ExpectError
+ zscal( zx.length, za, zx, undefined ); // $ExpectError
+ zscal( zx.length, za, zx, [] ); // $ExpectError
+ zscal( zx.length, za, zx, {} ); // $ExpectError
+ zscal( zx.length, za, zx, ( zx: number ): number => zx ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal(); // $ExpectError
+ zscal( zx.length ); // $ExpectError
+ zscal( zx.length, za ); // $ExpectError
+ zscal( zx.length, za, zx ); // $ExpectError
+ zscal( zx.length, za, zx, 1, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal.ndarray( zx.length, za, zx, 1, 0 ); // $ExpectType Complex128Array
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal.ndarray( '10', za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( true, za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( false, za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( null, za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( undefined, za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( [], za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( {}, za, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( ( zx: number ): number => zx, za, zx, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a complex number...
+{
+ const zx = new Complex128Array( 10 );
+
+ zscal.ndarray( zx.length, 10, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, '10', zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, true, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, false, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, null, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, undefined, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, [ '1' ], zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, {}, zx, 1, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, ( zx: number ): number => zx, zx, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a Complex128Array...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal( zx.length, za, 10, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, '10', 1, 0 ); // $ExpectError
+ zscal( zx.length, za, true, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, false, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, null, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, undefined, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, [ '1' ], 1, 0 ); // $ExpectError
+ zscal( zx.length, za, {}, 1, 0 ); // $ExpectError
+ zscal( zx.length, za, ( zx: number ): number => zx, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal.ndarray( zx.length, za, zx, '10', 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, true, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, false, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, null, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, undefined, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, [], 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, {}, 0 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, ( zx: number ): number => zx, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal.ndarray( zx.length, za, zx, 1, '10' ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, true ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, false ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, null ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, undefined ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, [] ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, {} ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, ( zx: number ): number => zx ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const zx = new Complex128Array( 10 );
+ const za = new Complex128( 2.0, 2.0 );
+
+ zscal.ndarray(); // $ExpectError
+ zscal.ndarray( zx.length ); // $ExpectError
+ zscal.ndarray( zx.length, za ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1 ); // $ExpectError
+ zscal.ndarray( zx.length, za, zx, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/examples/c/Makefile b/lib/node_modules/@stdlib/blas/base/zscal/examples/c/Makefile
new file mode 100644
index 000000000000..6aed70daf167
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# 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/base/zscal/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/zscal/examples/c/example.c
new file mode 100644
index 000000000000..3ff3c69a730c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/examples/c/example.c
@@ -0,0 +1,43 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/complex/float64/ctor.h"
+#include
+
+int main( void ) {
+ // Create a strided array of interleaved real and imaginary components:
+ double zx[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+
+ // Create a complex scalar:
+ const stdlib_complex128_t za = stdlib_complex128( 2.0, 2.0 );
+
+ // Specify the number of elements:
+ const int N = 4;
+
+ // Specify stride length:
+ const int strideX = 1;
+
+ // Scale the elements of the array:
+ c_zscal( N, za, (void *)zx, strideX );
+
+ // Print the result:
+ for ( int i = 0; i < N; i++ ) {
+ printf( "zx[ %i ] = %lf + %lfj\n", i, zx[ i*2 ], zx[ (i*2)+1 ] );
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/examples/index.js b/lib/node_modules/@stdlib/blas/base/zscal/examples/index.js
new file mode 100644
index 000000000000..9c138caf4327
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/examples/index.js
@@ -0,0 +1,38 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' );
+var filledarrayBy = require( '@stdlib/array/filled-by' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var zscal = require( '@stdlib/blas/base/zscal' );
+
+function rand() {
+ return new Complex128( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
+}
+
+var zx = filledarrayBy( 10, 'complex128', rand );
+console.log( zx.toString() );
+
+var za = new Complex128( 2.0, 2.0 );
+console.log( za.toString() );
+
+// Scale elements from `zx` by `za`:
+zscal( zx.length, za, zx, 1 );
+console.log( zx.get( zx.length-1 ).toString() );
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/include.gypi b/lib/node_modules/@stdlib/blas/base/zscal/include.gypi
new file mode 100644
index 000000000000..497aeca15320
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/include.gypi
@@ -0,0 +1,70 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A GYP include file for building a Node.js native add-on.
+#
+# Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+#
+# Variable nesting hacks:
+#
+# [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi
+# [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ 'variables': {
+ # Host BLAS library (to override -Dblas=):
+ 'blas%': '',
+
+ # Path to BLAS library (to override -Dblas_dir=):
+ 'blas_dir%': '',
+ }, # end variables
+
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ '<@(blas_dir)',
+ '
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+* var zscal = require( '@stdlib/blas/base/zscal' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal.ndarray( 3, za zx, 1, 0 );
+*
+* var z = zx.get( 0 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*/
+
+// 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 zscal;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+ zscal = main;
+} else {
+ zscal = tmp;
+}
+
+
+// EXPORTS //
+
+module.exports = zscal;
+
+// exports: { "ndarray": "zscal.ndarray" }
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/main.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/main.js
new file mode 100644
index 000000000000..e7e50f59e0d2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/main.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var zscal = require( './zscal.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( zscal, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/native.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/native.js
new file mode 100644
index 000000000000..2bd82a0f56a8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/native.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var zscal = require( './zscal.native.js' );
+var ndarray = require( './ndarray.native.js' );
+
+
+// MAIN //
+
+setReadOnly( zscal, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.js
new file mode 100644
index 000000000000..a1d87385f027
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.js
@@ -0,0 +1,76 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var cmul = require( '@stdlib/math/base/ops/cmul' );
+
+
+// MAIN //
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex128} za - constant
+* @param {Complex128Array} zx - input array
+* @param {integer} strideX - `zx` stride length
+* @param {NonNegativeInteger} offsetX - starting `zx` index
+* @returns {Complex128Array} input array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal( 3, za, zx, 1, 0 );
+*
+* var z = zx.get( 0 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*/
+function zscal( N, za, zx, strideX, offsetX ) {
+ var ix;
+ var i;
+
+ if ( N <= 0 || strideX <= 0 ) {
+ return zx;
+ }
+ ix = offsetX;
+ for ( i = 0; i < N; i++ ) {
+ zx.set( cmul( za, zx.get( ix ) ), ix );
+ ix += strideX;
+ }
+ return zx;
+}
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js
new file mode 100644
index 000000000000..7ca9e6514dfc
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/ndarray.native.js
@@ -0,0 +1,71 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex128} za - scalar constant
+* @param {Complex128Array} zx - input array
+* @param {integer} strideX - `zx` stride length
+* @param {NonNegativeInteger} offsetX - starting `zx` index
+* @returns {Complex128Array} input array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal( zx.length, za, zx, 1, 0 );
+*
+* var z = zx.get( 0 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*/
+function zscal( N, za, zx, strideX, offsetX ) {
+ var viewZX;
+ offsetX = minViewBufferIndex( N, strideX, offsetX );
+ viewZX = reinterpret( zx, offsetX );
+ addon( N, za, viewZX, strideX );
+ return zx;
+}
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.js
new file mode 100644
index 000000000000..fc064cb599fd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.js
@@ -0,0 +1,83 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var cmul = require( '@stdlib/math/base/ops/cmul' );
+
+
+// MAIN //
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex128} za - constant
+* @param {Complex128Array} zx - input array
+* @param {integer} strideX - `zx` stride length
+* @returns {Complex128Array} input array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal( 3, za, zx, 1 );
+*
+* var z = zx.get( 0 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*/
+function zscal( N, za, zx, strideX ) {
+ var ix;
+ var i;
+
+ if ( N <= 0 || strideX <= 0 ) {
+ return zx;
+ }
+ if ( strideX === 1 ) {
+ // Code for stride equal to `1`...
+ for ( i = 0; i < N; i++ ) {
+ zx.set( cmul( za, zx.get( i ) ), i );
+ }
+ return zx;
+ }
+ // Code for stride not equal to `1`...
+ ix = 0;
+ for ( i = 0; i < N; i++ ) {
+ zx.set( cmul( za, zx.get( ix ) ), ix );
+ ix += strideX;
+ }
+ return zx;
+}
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js
new file mode 100644
index 000000000000..2e587b941f78
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/lib/zscal.native.js
@@ -0,0 +1,67 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex128} za - scalar constant
+* @param {Complex128Array} zx - input array
+* @param {integer} strideX - `zx` stride length
+* @returns {Complex128Array} input array
+*
+* @example
+* var Complex128Array = require( '@stdlib/array/complex128' );
+* var Complex128 = require( '@stdlib/complex/float64/ctor' );
+* var real = require( '@stdlib/complex/real' );
+* var imag = require( '@stdlib/complex/imag' );
+*
+* var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var za = new Complex128( 2.0, 2.0 );
+*
+* zscal( zx.length, za, zx, 1 );
+*
+* var z = zx.get( 0 );
+* // returns
+*
+* var re = real( z );
+* // returns -2.0
+*
+* var im = imag( z );
+* // returns 6.0
+*/
+function zscal( N, za, zx, strideX ) {
+ var viewZX = reinterpret( zx, 0 );
+ addon( N, za, viewZX, strideX );
+ return zx;
+}
+
+
+// EXPORTS //
+
+module.exports = zscal;
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/manifest.json b/lib/node_modules/@stdlib/blas/base/zscal/manifest.json
new file mode 100644
index 000000000000..763eb581d9b4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/manifest.json
@@ -0,0 +1,444 @@
+{
+ "options": {
+ "task": "build",
+ "os": "linux",
+ "blas": "",
+ "wasm": false
+ },
+ "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",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.f",
+ "./src/zscal_f.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float32/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float32/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.f",
+ "./src/zscal_f.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/zscal_cblas.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-complex128array",
+ "@stdlib/napi/argv-complex128",
+ "@stdlib/complex/float64/ctor",
+ "@stdlib/math/base/ops/cmul"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "",
+ "blas": "",
+ "wasm": true,
+ "src": [
+ "./src/zscal.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/math/base/ops/cmul",
+ "@stdlib/complex/float64/ctor"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/package.json b/lib/node_modules/@stdlib/blas/base/zscal/package.json
new file mode 100644
index 000000000000..c7f829097ff5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "@stdlib/blas/base/zscal",
+ "version": "0.0.0",
+ "description": "Scale a double-precision complex floating-point vector by a double-precision complex floating-point constant.",
+ "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",
+ "mathematics",
+ "math",
+ "blas",
+ "level 1",
+ "linear",
+ "algebra",
+ "subroutines",
+ "zscal",
+ "scale",
+ "vector",
+ "typed",
+ "array",
+ "ndarray",
+ "complex",
+ "complex128",
+ "double",
+ "float64",
+ "float64array"
+ ],
+ "__stdlib__": {
+ "wasm": false
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/Makefile b/lib/node_modules/@stdlib/blas/base/zscal/src/Makefile
new file mode 100644
index 000000000000..bcf18aa46655
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/Makefile
@@ -0,0 +1,70 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2024 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# 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/base/zscal/src/addon.c b/lib/node_modules/@stdlib/blas/base/zscal/src/addon.c
new file mode 100644
index 000000000000..684dc692db65
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/addon.c
@@ -0,0 +1,45 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/napi/export.h"
+#include "stdlib/napi/argv.h"
+#include "stdlib/napi/argv_int64.h"
+#include "stdlib/napi/argv_complex128.h"
+#include "stdlib/napi/argv_strided_complex128array.h"
+#include
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @private
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 4 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 );
+ STDLIB_NAPI_ARGV_COMPLEX128( env, za, argv, 1 );
+ STDLIB_NAPI_ARGV_STRIDED_COMPLEX128ARRAY( env, ZX, N, strideX, argv, 2 );
+ c_zscal( N, za, (void *)ZX, strideX );
+ return NULL;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN( addon )
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.c b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.c
new file mode 100644
index 000000000000..cdc4144778d8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.c
@@ -0,0 +1,48 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/complex/float64/ctor.h"
+#include "stdlib/math/base/ops/cmul.h"
+#include
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param N number of indexed elements
+* @param za scalar constant
+* @param ZX input array
+* @param strideX ZX stride length
+*/
+void API_SUFFIX(c_zscal)( const CBLAS_INT N, const stdlib_complex128_t za, void *ZX, const CBLAS_INT strideX ) {
+ stdlib_complex128_t z;
+ CBLAS_INT i;
+
+ uint8_t *ip1 = (uint8_t *)ZX;
+ int64_t is1 = 16 * strideX;
+
+ if ( N <= 0 || strideX <= 0 ) {
+ return;
+ }
+ for ( i = 0; i < N; i++, ip1 += is1 ) {
+ z = *( (stdlib_complex128_t *)ip1 );
+ *( (stdlib_complex128_t *)ip1 ) = stdlib_base_cmul( za, z );
+ }
+ return;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f
new file mode 100644
index 000000000000..13a35c91b3ff
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal.f
@@ -0,0 +1,85 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2024 The Stdlib Authors.
+!
+! Licensed under the Apache License, Version 2.0 (the "License");
+! you may not use this file except in compliance with the License.
+! You may obtain a copy of the License at
+!
+! http://www.apache.org/licenses/LICENSE-2.0
+!
+! Unless required by applicable law or agreed to in writing, software
+! distributed under the License is distributed on an "AS IS" BASIS,
+! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+! See the License for the specific language governing permissions and
+! limitations under the License.
+!<
+
+!> Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+!
+! ## Notes
+!
+! * Modified version of reference BLAS level1 routine (version 3.9.0). Updated to "free form" Fortran 95.
+!
+! ## Authors
+!
+! * Univ. of Tennessee
+! * Univ. of California Berkeley
+! * Univ. of Colorado Denver
+! * NAG Ltd.
+!
+! ## History
+!
+! * Jack Dongarra, linpack, 3/11/78.
+!
+! - modified 3/93 to return if incx .le. 0.
+! - modified 12/3/93, array(1) declarations changed to array(*)
+!
+! ## License
+!
+! From :
+!
+! > The reference BLAS is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web. Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors.
+! >
+! > Like all software, it is copyrighted. It is not trademarked, but we do ask the following:
+! >
+! > * If you modify the source for these routines we ask that you change the name of the routine and comment the changes made to the original.
+! >
+! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support.
+!
+! @param {integer} N - number of indexed elements
+! @param {complex} za - scalar constant
+! @param {Array>} zx - input array
+! @param {integer} strideX - `zx` stride length
+!<
+subroutine zscal( N, za, zx, strideX )
+ implicit none
+ ! ..
+ ! Scalar arguments:
+ complex(kind=kind(0.0d0)) :: za
+ integer :: strideX, N
+ ! ..
+ ! Array arguments:
+ complex(kind=kind(0.0d0)) :: zx(*)
+ ! ..
+ ! Local scalars:
+ integer :: ix, i
+ ! ..
+ if ( N <= 0 .OR. strideX <= 0 ) then
+ return
+ end if
+ ! ..
+ if ( strideX == 1 ) then
+ do i = 1, N
+ zx(i) = za * zx(i)
+ end do
+ else
+ ix = 1
+ do i = 1, N
+ zx(ix) = za * zx(ix)
+ ix = ix + strideX
+ end do
+ end if
+ return
+end subroutine zscal
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_cblas.c b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_cblas.c
new file mode 100644
index 000000000000..69d78adaa641
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_cblas.c
@@ -0,0 +1,34 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/blas/base/zscal_cblas.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/complex/float64/ctor.h"
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param N number of indexed elements
+* @param za scalar constant
+* @param ZX input array
+* @param strideX ZX stride length
+*/
+void API_SUFFIX(c_zscal)( const CBLAS_INT N, const stdlib_complex128_t za, void *ZX, const CBLAS_INT strideX ) {
+ cblas_zscal( N, za, ZX, strideX );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_f.c b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_f.c
new file mode 100644
index 000000000000..03ce288927b9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/src/zscal_f.c
@@ -0,0 +1,34 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/zscal.h"
+#include "stdlib/blas/base/zscal_fortran.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/complex/float64/ctor.h"
+
+/**
+* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant.
+*
+* @param N number of indexed elements
+* @param za scalar constant
+* @param ZX input array
+* @param strideX ZX stride length
+*/
+void API_SUFFIX(c_zscal)( const CBLAS_INT N, const stdlib_complex128_t za, void *ZX, const CBLAS_INT strideX ) {
+ zscal( &N, &za, ZX, &strideX );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.js
new file mode 100644
index 000000000000..3758552bb3c0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var isBrowser = require( '@stdlib/assert/is-browser' );
+var zscal = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': isBrowser
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zscal, '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 zscal.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 zscal = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zscal, mock, 'returns native implementation' );
+ 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 zscal;
+ var main;
+
+ main = require( './../lib/zscal.js' );
+
+ zscal = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( zscal, main, 'returns JavaScript implementation' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js
new file mode 100644
index 000000000000..d720fee4c305
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.js
@@ -0,0 +1,319 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var Float64Array = require( '@stdlib/array/float64' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var zscal = require( './../lib/ndarray.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zscal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 5', function test( t ) {
+ t.strictEqual( zscal.length, 5, 'arity of 5' );
+ t.end();
+});
+
+tape( 'the function scales elements from `zx` by `za`', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0,
+ 2.0,
+ 3.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 4, za, zx, 1, 0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.19, // 1
+ -0.17, // 1
+ 0.2, // 2
+ -0.35, // 2
+ 0.35, // 3
+ 0.2, // 3
+ 0.14, // 4
+ 0.08, // 4
+ 2.0,
+ 3.0,
+ 2.0,
+ 3.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` stride', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1, // 1
+ 0.1, // 1
+ 3.0,
+ 6.0,
+ -0.6, // 2
+ 0.1, // 2
+ 4.0,
+ 7.0,
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 2.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 2, 0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.11, // 1
+ -0.03, // 1
+ 3.0,
+ 6.0,
+ -0.17, // 2
+ 0.46, // 2
+ 4.0,
+ 7.0,
+ -0.17, // 3
+ -0.19, // 3
+ 7.0,
+ 2.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 5.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` offset', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 4.0, // 1
+ 6.0, // 1
+ 0.1, // 2
+ -0.3, // 2
+ 7.0, // 3
+ 2.0 // 3
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 1, 3 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 5.8, // 1
+ -0.4, // 1
+ -0.17, // 2
+ -0.19, // 2
+ 4.2, // 3
+ -4.1 // 3
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 8.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', function test( t ) {
+ var out;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ out = zscal( 4, za, zx, 1, 0 );
+
+ t.strictEqual( out, zx, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( -1, za, zx, 1, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 0, za, zx, 1, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `strideX` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( 4, za, zx, -1, 3 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 4, za, zx, 0, 3 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports complex access patterns', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 4.0, // 1
+ 6.0, // 1
+ 0.1,
+ -0.3,
+ 7.0,
+ 2.0,
+ 2.0, // 2
+ 3.0 // 2
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 2, za, zx, 3, 3 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 5.8, // 1
+ -0.4, // 1
+ 0.1,
+ -0.3,
+ 7.0,
+ 2.0,
+ 2.9, // 2
+ -0.2 // 2
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 10.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js
new file mode 100644
index 000000000000..7a59816804f0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.ndarray.native.js
@@ -0,0 +1,328 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var Float64Array = require( '@stdlib/array/float64' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var zscal = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( zscal instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zscal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 5', opts, function test( t ) {
+ t.strictEqual( zscal.length, 5, 'arity of 5' );
+ t.end();
+});
+
+tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2, // 4
+ 2.0,
+ 3.0,
+ 2.0,
+ 3.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 4, za, zx, 1, 0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.19, // 1
+ -0.17, // 1
+ 0.2, // 2
+ -0.35, // 2
+ 0.35, // 3
+ 0.2, // 3
+ 0.14, // 4
+ 0.08, // 4
+ 2.0,
+ 3.0,
+ 2.0,
+ 3.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` stride', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1, // 1
+ 0.1, // 1
+ 3.0,
+ 6.0,
+ -0.6, // 2
+ 0.1, // 2
+ 4.0,
+ 7.0,
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 2.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 2, 0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.11, // 1
+ -0.03, // 1
+ 3.0,
+ 6.0,
+ -0.17, // 2
+ 0.46, // 2
+ 4.0,
+ 7.0,
+ -0.17, // 3
+ -0.19, // 3
+ 7.0,
+ 2.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 5.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` offset', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 4.0, // 1
+ 6.0, // 1
+ 0.1, // 2
+ -0.3, // 2
+ 7.0, // 3
+ 2.0 // 3
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 1, 3 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 5.8, // 1
+ -0.4, // 1
+ -0.17, // 2
+ -0.19, // 2
+ 4.2, // 3
+ -4.1 // 3
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 8.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', opts, function test( t ) {
+ var out;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ out = zscal( 4, za, zx, 1, 0 );
+
+ t.strictEqual( out, zx, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( -1, za, zx, 1, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 0, za, zx, 1, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `strideX` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( 4, za, zx, -1, 3 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 4, za, zx, 0, 3 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports complex access patterns', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 4.0, // 1
+ 6.0, // 1
+ 0.1,
+ -0.3,
+ 7.0,
+ 2.0,
+ 2.0, // 2
+ 3.0 // 2
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 2, za, zx, 3, 3 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ 0.1,
+ 3.0,
+ 6.0,
+ -0.6,
+ 0.1,
+ 5.8, // 1
+ -0.4, // 1
+ 0.1,
+ -0.3,
+ 7.0,
+ 2.0,
+ 2.9, // 2
+ -0.2 // 2
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 10.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js
new file mode 100644
index 000000000000..c1a906faea08
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.js
@@ -0,0 +1,254 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var Float64Array = require( '@stdlib/array/float64' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var zscal = require( './../lib/zscal.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zscal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 4', function test( t ) {
+ t.strictEqual( zscal.length, 4, 'arity of 4' );
+ t.end();
+});
+
+tape( 'the function scales elements from `zx` by `za`', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2 // 4
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 4, za, zx, 1 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.19, // 1
+ -0.17, // 1
+ 0.2, // 2
+ -0.35, // 2
+ 0.35, // 3
+ 0.2, // 3
+ 0.14, // 4
+ 0.08 // 4
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` stride', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1, // 1
+ 0.1, // 1
+ 3.0,
+ 6.0,
+ -0.6, // 2
+ 0.1, // 2
+ 4.0,
+ 7.0,
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 2.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 2 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.11, // 1
+ -0.03, // 1
+ 3.0,
+ 6.0,
+ -0.17, // 2
+ 0.46, // 2
+ 4.0,
+ 7.0,
+ -0.17, // 3
+ -0.19, // 3
+ 7.0,
+ 2.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 5.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', function test( t ) {
+ var out;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ out = zscal( 4, za, zx, 1 );
+
+ t.strictEqual( out, zx, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( -1, za, zx, 1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 0, za, zx, 1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `strideX` parameter less than or equal to `0`, the function returns the input array unchanged', function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( 4, za, zx, -1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 4, za, zx, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports view offsets', function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var zx0;
+ var zx1;
+ var za;
+ var k;
+
+ // Initial arrays...
+ zx0 = new Complex128Array( [
+ 0.1,
+ -0.3,
+ 8.0, // 1
+ 9.0, // 1
+ 0.5, // 2
+ -0.1, // 2
+ 2.0, // 3
+ 5.0, // 3
+ 2.0,
+ 3.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ // Create offset views...
+ zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element
+
+ zscal( 3, za, zx1, 1 );
+
+ viewX = new Float64Array( zx0.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ -0.3,
+ 9.5, // 1
+ -2.0, // 1
+ 0.13, // 2
+ -0.39, // 2
+ 4.3, // 3
+ 0.6, // 3
+ 2.0,
+ 3.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js
new file mode 100644
index 000000000000..0dc596643604
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/zscal/test/test.zscal.native.js
@@ -0,0 +1,263 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Complex128Array = require( '@stdlib/array/complex128' );
+var Complex128 = require( '@stdlib/complex/float64/ctor' );
+var Float64Array = require( '@stdlib/array/float64' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var zscal = tryRequire( resolve( __dirname, './../lib/zscal.native.js' ) );
+var opts = {
+ 'skip': ( zscal instanceof Error )
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof zscal, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 4', opts, function test( t ) {
+ t.strictEqual( zscal.length, 4, 'arity of 4' );
+ t.end();
+});
+
+tape( 'the function scales elements from `zx` by `za`', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.3, // 1
+ 0.1, // 1
+ 0.5, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.5, // 3
+ 0.0, // 4
+ 0.2 // 4
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 4, za, zx, 1 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.19, // 1
+ -0.17, // 1
+ 0.2, // 2
+ -0.35, // 2
+ 0.35, // 3
+ 0.2, // 3
+ 0.14, // 4
+ 0.08 // 4
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function supports a `zx` stride', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var za;
+ var zx;
+ var k;
+
+ zx = new Complex128Array( [
+ 0.1, // 1
+ 0.1, // 1
+ 3.0,
+ 6.0,
+ -0.6, // 2
+ 0.1, // 2
+ 4.0,
+ 7.0,
+ 0.1, // 3
+ -0.3, // 3
+ 7.0,
+ 2.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ zscal( 3, za, zx, 2 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [
+ 0.11, // 1
+ -0.03, // 1
+ 3.0,
+ 6.0,
+ -0.17, // 2
+ 0.46, // 2
+ 4.0,
+ 7.0,
+ -0.17, // 3
+ -0.19, // 3
+ 7.0,
+ 2.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 5.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'the function returns a reference to the input array', opts, function test( t ) {
+ var out;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ out = zscal( 4, za, zx, 1 );
+
+ t.strictEqual( out, zx, 'same reference' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( -1, za, zx, 1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 0, za, zx, 1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `strideX` parameter less than or equal to `0`, the function returns the input array unchanged', opts, function test( t ) {
+ var expected;
+ var viewX;
+ var za;
+ var zx;
+
+ zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ za = new Complex128( 2.0, 2.0 );
+
+ viewX = new Float64Array( zx.buffer );
+ expected = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+
+ zscal( 4, za, zx, -1 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ zscal( 4, za, zx, 0 );
+ t.deepEqual( viewX, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports view offsets', opts, function test( t ) {
+ var expected;
+ var delta;
+ var viewX;
+ var tol;
+ var zx0;
+ var zx1;
+ var za;
+ var k;
+
+ // Initial arrays...
+ zx0 = new Complex128Array( [
+ 0.1,
+ -0.3,
+ 8.0, // 1
+ 9.0, // 1
+ 0.5, // 2
+ -0.1, // 2
+ 2.0, // 3
+ 5.0, // 3
+ 2.0,
+ 3.0
+ ] );
+ za = new Complex128( 0.4, -0.7 );
+
+ // Create offset views...
+ zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // begin at 2nd element
+
+ zscal( 3, za, zx1, 1 );
+
+ viewX = new Float64Array( zx0.buffer );
+ expected = new Float64Array( [
+ 0.1,
+ -0.3,
+ 9.5, // 1
+ -2.0, // 1
+ 0.13, // 2
+ -0.39, // 2
+ 4.3, // 3
+ 0.6, // 3
+ 2.0,
+ 3.0
+ ] );
+ for ( k = 0; k < expected.length; k++ ) {
+ if ( viewX[ k ] === expected[ k ] ) {
+ t.strictEqual( viewX[ k ], expected[ k ], 'returns expected value' );
+ } else {
+ delta = abs( viewX[ k ] - expected[ k ] );
+ tol = 1.0 * EPS * abs( expected[ k ] );
+ t.ok( delta <= tol, 'within tolerance. x: '+viewX[ k ]+'. expected: '+expected[ k ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});