diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/README.md b/lib/node_modules/@stdlib/blas/base/csrot-wasm/README.md
new file mode 100644
index 000000000000..e11556892aa2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/README.md
@@ -0,0 +1,471 @@
+
+
+# csrot
+
+> Apply a plane rotation.
+
+
+
+## Usage
+
+```javascript
+var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+```
+
+#### csrot.main( N, cx, strideX, cy, strideY, c, s )
+
+Applies a plane rotation.
+
+```javascript
+var Complex64Array = require( '@stdlib/array/complex64' );
+var realf = require( '@stdlib/complex/float32/real' );
+var imagf = require( '@stdlib/complex/float32/imag' );
+
+var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+
+var z = cy.get( 0 );
+// returns
+
+var re = realf( z );
+// returns ~-0.6
+
+var im = imagf( z );
+// returns ~-1.2
+
+z = cx.get( 0 );
+// returns
+
+re = realf( z );
+// returns ~0.8
+
+im = imagf( z );
+// returns ~1.6
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **cx**: first input [`Complex64Array`][@stdlib/array/complex64].
+- **strideX**: index increment for `cx`.
+- **cy**: second input [`Complex64Array`][@stdlib/array/complex64].
+- **strideY**: index increment for `cy`.
+- **c**: cosine of the angle of rotation.
+- **s**: sine of the angle of rotation.
+
+The `N` and stride parameters determine how values in the strided arrays are accessed at runtime. For example, to apply a plane rotation to every other element,
+
+```javascript
+var Complex64Array = require( '@stdlib/array/complex64' );
+var realf = require( '@stdlib/complex/float32/real' );
+var imagf = require( '@stdlib/complex/float32/imag' );
+
+var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+csrot.main( 2, cx, 2, cy, 2, 0.8, 0.6 );
+
+var z = cy.get( 0 );
+// returns
+
+var re = realf( z );
+// returns ~-0.6
+
+var im = imagf( z );
+// returns ~-1.2
+
+z = cx.get( 0 );
+// returns
+
+re = realf( z );
+// returns ~0.8
+
+im = imagf( z );
+// returns ~1.6
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Complex64Array = require( '@stdlib/array/complex64' );
+var realf = require( '@stdlib/complex/float32/real' );
+var imagf = require( '@stdlib/complex/float32/imag' );
+
+// Initial arrays...
+var cx0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var cy0 = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+// Create offset views...
+var cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+var cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
+
+csrot.main( 2, cx1, -2, cy1, 1, 0.8, 0.6 );
+
+var z = cy0.get( 2 );
+// returns
+
+var re = realf( z );
+// returns ~-4.2
+
+var im = imagf( z );
+// returns ~-4.8
+
+z = cx0.get( 3 );
+// returns
+
+re = realf( z );
+// returns ~5.6
+
+im = imagf( z );
+// returns ~6.4
+```
+
+#### csrot.ndarray( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s )
+
+Applies a plane rotation using alternative indexing semantics.
+
+```javascript
+var Complex64Array = require( '@stdlib/array/complex64' );
+var realf = require( '@stdlib/complex/float32/real' );
+var imagf = require( '@stdlib/complex/float32/imag' );
+
+var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+
+var z = cy.get( 0 );
+// returns
+
+var re = realf( z );
+// returns ~-0.6
+
+var im = imagf( z );
+// returns ~-1.2
+
+z = cx.get( 0 );
+// returns
+
+re = realf( z );
+// returns ~0.8
+
+im = imagf( z );
+// returns ~1.6
+```
+
+The function has the following additional parameters:
+
+- **offsetX**: starting index for `cx`.
+- **offsetY**: starting index for `cy`.
+
+While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to apply a plane rotation to every other element starting from the second element,
+
+```javascript
+var Complex64Array = require( '@stdlib/array/complex64' );
+var realf = require( '@stdlib/complex/float32/real' );
+var imagf = require( '@stdlib/complex/float32/imag' );
+
+var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+var cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+csrot.ndarray( 2, cx, 2, 1, cy, 2, 1, 0.8, 0.6 );
+
+var z = cy.get( 3 );
+// returns
+
+var re = realf( z );
+// returns ~-4.2
+
+var im = imagf( z );
+// returns ~-4.8
+
+z = cx.get( 1 );
+// returns
+
+re = realf( z );
+// returns ~2.4
+
+im = imagf( z );
+// returns ~3.2
+```
+
+* * *
+
+### Module
+
+#### csrot.Module( memory )
+
+Returns a new WebAssembly [module wrapper][@stdlib/wasm/module-wrapper] instance which uses the provided WebAssembly [memory][@stdlib/wasm/memory] instance as its underlying memory.
+
+
+
+```javascript
+var Memory = require( '@stdlib/wasm/memory' );
+
+// Create a new memory instance with an initial size of 10 pages (640KiB) and a maximum size of 100 pages (6.4MiB):
+var mem = new Memory({
+ 'initial': 10,
+ 'maximum': 100
+});
+
+// Create a BLAS routine:
+var mod = new csrot.Module( mem );
+// returns
+
+// Initialize the routine:
+mod.initializeSync();
+```
+
+#### csrot.Module.prototype.main( N, cxp, sx, cyp, sy, c, s )
+
+Applies a plane rotation.
+
+
+
+```javascript
+var Memory = require( '@stdlib/wasm/memory' );
+var oneTo = require( '@stdlib/array/one-to' );
+var ones = require( '@stdlib/array/ones' );
+var zeros = require( '@stdlib/array/zeros' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+
+// Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+var mem = new Memory({
+ 'initial': 10,
+ 'maximum': 100
+});
+
+// Create a BLAS routine:
+var mod = new csrot.Module( mem );
+// returns
+
+// Initialize the routine:
+mod.initializeSync();
+
+// Define a vector data type:
+var dtype = 'complex64';
+
+// Specify a vector length:
+var N = 5;
+
+// Define pointers (i.e., byte offsets) for storing the input vectors:
+var cxptr = 0;
+var cyptr = N * bytesPerElement( dtype );
+
+// Write vector values to module memory:
+var xbuf = oneTo( N*2, 'float32' );
+var cx = new Complex64Array( xbuf.buffer );
+mod.write( cxptr, cx );
+
+var ybuf = ones( N*2, 'float32' );
+var cy = new Complex64Array( ybuf.buffer );
+mod.write( cyptr, cy );
+
+// Perform computation:
+mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+
+// Read out the results:
+var viewX = zeros( N, dtype );
+var viewY = zeros( N, dtype );
+mod.read( cxptr, viewX );
+mod.read( cyptr, viewY );
+
+console.log( reinterpretComplex64( viewX, 0 ) );
+// => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+
+console.log( reinterpretComplex64( viewY, 0 ) );
+// => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+```
+
+The function has the following parameters:
+
+- **N**: number of indexed elements.
+- **cxp**: first input [`Complex64Array`][@stdlib/array/complex64] pointer (i.e., byte offset).
+- **sx**: index increment for `cx`.
+- **cyp**: second input [`Complex64Array`][@stdlib/array/complex64] pointer (i.e., byte offset).
+- **sy**: index increment for `cy`.
+- **c**: cosine of the angle of rotation.
+- **s**: sine of the angle of rotation.
+
+#### csrot.Module.prototype.ndarray( N, cxp, sx, ox, cyp, sy, oy, c, s )
+
+Applies a plane rotation using alternative indexing semantics.
+
+
+
+```javascript
+var Memory = require( '@stdlib/wasm/memory' );
+var oneTo = require( '@stdlib/array/one-to' );
+var ones = require( '@stdlib/array/ones' );
+var zeros = require( '@stdlib/array/zeros' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+
+// Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+var mem = new Memory({
+ 'initial': 10,
+ 'maximum': 100
+});
+
+// Create a BLAS routine:
+var mod = new csrot.Module( mem );
+// returns
+
+// Initialize the routine:
+mod.initializeSync();
+
+// Define a vector data type:
+var dtype = 'complex64';
+
+// Specify a vector length:
+var N = 5;
+
+// Define pointers (i.e., byte offsets) for storing input vectors:
+var cxptr = 0;
+var cyptr = N * bytesPerElement( dtype );
+
+// Write vector values to module memory:
+var xbuf = oneTo( N*2, 'float32' );
+var cx = new Complex64Array( xbuf.buffer );
+mod.write( cxptr, cx );
+
+var ybuf = ones( N*2, 'float32' );
+var cy = new Complex64Array( ybuf.buffer );
+mod.write( cyptr, cy );
+
+// Perform computation:
+mod.ndarray( N, cxptr, 1, 0, cyptr, 1, 0, 0.8, 0.6 );
+
+// Read out the results:
+var viewX = zeros( N, dtype );
+var viewY = zeros( N, dtype );
+mod.read( cxptr, viewX );
+mod.read( cyptr, viewY );
+
+console.log( reinterpretComplex64( viewX, 0 ) );
+// => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+
+console.log( reinterpretComplex64( viewY, 0 ) );
+// => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+```
+
+The function has the following additional parameters:
+
+- **ox**: starting index for `cx`.
+- **oy**: starting index for `cy`.
+
+
+
+
+
+
+
+* * *
+
+## Notes
+
+- If `N <= 0`, `cx` and `cy` are left unchanged.
+- This package implements routines using WebAssembly. When provided arrays which are not allocated on a `csrot` module memory instance, data must be explicitly copied to module memory prior to computation. Data movement may entail a performance cost, and, thus, if you are using arrays external to module memory, you should prefer using [`@stdlib/blas/base/csrot`][@stdlib/blas/base/csrot]. However, if working with arrays which are allocated and explicitly managed on module memory, you can achieve better performance when compared to the pure JavaScript implementations found in [`@stdlib/blas/base/csrot`][@stdlib/blas/base/csrot]. Beware that such performance gains may come at the cost of additional complexity when having to perform manual memory management. Choosing between implementations depends heavily on the particular needs and constraints of your application, with no one choice universally better than the other.
+- `csrot()` corresponds to the [BLAS][blas] level 1 function [`csrot`][csrot].
+
+
+
+
+
+
+
+* * *
+
+## Examples
+
+
+
+```javascript
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var oneTo = require( '@stdlib/array/one-to' );
+var ones = require( '@stdlib/array/ones' );
+var zeros = require( '@stdlib/array/zeros' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+
+// Specify a vector length:
+var N = 5;
+
+var xbuf = oneTo( N*2, 'float32' );
+var cx = new Complex64Array( xbuf.buffer );
+
+var ybuf = ones( N*2, 'float32' );
+var cy = new Complex64Array( ybuf.buffer );
+
+// Perform computation:
+csrot.ndarray( N, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+
+// Print the results:
+console.log( reinterpretComplex64( cx, 0 ) );
+// => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+
+console.log( reinterpretComplex64( cy, 0 ) );
+// => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[blas]: http://www.netlib.org/blas
+
+[csrot]: http://www.netlib.org/lapack/explore-html/da/df6/group__complex__blas__level1.html
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+[@stdlib/array/complex64]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/complex64
+
+[@stdlib/wasm/memory]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/wasm/memory
+
+[@stdlib/wasm/module-wrapper]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/wasm/module-wrapper
+
+[@stdlib/blas/base/csrot]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/csrot
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.js
new file mode 100644
index 000000000000..e37f66aa214d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.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 bench = require( '@stdlib/bench' );
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var pkg = require( './../package.json' ).name;
+var csrot = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': !hasWebAssemblySupport()
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var xbuf;
+ var ybuf;
+ var x;
+ var y;
+
+ xbuf = uniform( len*2, -100.0, 100.0, options );
+ x = new Complex64Array( xbuf.buffer );
+
+ ybuf = uniform( len*2, -100.0, 100.0, options );
+ y = new Complex64Array( ybuf.buffer );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ csrot.main( x.length, x, 1, y, 1, 0.8, 0.6 );
+ if ( isnanf( ybuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( ybuf[ 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, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.js
new file mode 100644
index 000000000000..e461fe1011c7
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.js
@@ -0,0 +1,66 @@
+/**
+* @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 hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var Memory = require( '@stdlib/wasm/memory' );
+var pkg = require( './../package.json' ).name;
+var csrot = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': !hasWebAssemblySupport()
+};
+
+
+// MAIN //
+
+bench( pkg+':Module:constructor', opts, function benchmark( b ) {
+ var values;
+ var o;
+ var v;
+ var i;
+
+ o = {
+ 'initial': 0
+ };
+ values = [
+ new Memory( o ),
+ new Memory( o )
+ ];
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = new csrot.Module( values[ i%values.length ] );
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an object' );
+ }
+ }
+ b.toc();
+ if ( typeof v !== 'object' ) {
+ b.fail( 'should return an object' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.main.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.main.js
new file mode 100644
index 000000000000..729be4111b8f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.main.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var Memory = require( '@stdlib/wasm/memory' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var pkg = require( './../package.json' ).name;
+var csrot = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': !hasWebAssemblySupport()
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var byteOffset;
+ var view;
+ var xptr;
+ var yptr;
+ var mod;
+ var mem;
+ var nb;
+ var N;
+ var i;
+
+ N = len * 2;
+
+ // Create a new BLAS routine interface:
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new csrot.Module( mem );
+
+ // Initialize the module:
+ mod.initializeSync(); // eslint-disable-line node/no-sync
+
+ // Reallocate the underlying memory to allow storing two vectors:
+ nb = bytesPerElement( 'complex64' );
+ mod.realloc( 2*(N*nb) );
+
+ // Define pointers (i.e., byte offsets) to the first vector elements:
+ xptr = 0;
+ yptr = N * nb;
+
+ // Write random values to module memory:
+ mod.write( xptr, uniform( N, -100.0, 100.0, options ) );
+ mod.write( yptr, uniform( N, -100.0, 100.0, options ) );
+
+ // Retrieve a DataView of module memory:
+ view = mod.view;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ mod.main( len, xptr, 1, yptr, 1, 0.8, 0.6 );
+ byteOffset = yptr + ( (i%len)*nb );
+ if ( isnanf( view.getFloat32( byteOffset, true ) ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( view.getFloat32( byteOffset, true ) ) ) {
+ 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+'::module,pointers:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.ndarray.js
new file mode 100644
index 000000000000..4072e8d34f89
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.module.ndarray.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var Memory = require( '@stdlib/wasm/memory' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var pkg = require( './../package.json' ).name;
+var csrot = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': !hasWebAssemblySupport()
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var byteOffset;
+ var view;
+ var xptr;
+ var yptr;
+ var mod;
+ var mem;
+ var nb;
+ var N;
+ var i;
+
+ N = len * 2;
+
+ // Create a new BLAS routine interface:
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new csrot.Module( mem );
+
+ // Initialize the module:
+ mod.initializeSync(); // eslint-disable-line node/no-sync
+
+ // Reallocate the underlying memory to allow storing two vectors:
+ nb = bytesPerElement( 'complex64' );
+ mod.realloc( 2*(N*nb) );
+
+ // Define pointers (i.e., byte offsets) to the first vector elements:
+ xptr = 0;
+ yptr = N * nb;
+
+ // Write random values to module memory:
+ mod.write( xptr, uniform( N, -100.0, 100.0, options ) );
+ mod.write( yptr, uniform( N, -100.0, 100.0, options ) );
+
+ // Retrieve a DataView of module memory:
+ view = mod.view;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ mod.ndarray( len, xptr, 1, 0, yptr, 1, 0, 0.8, 0.6 );
+ byteOffset = yptr + ( (i%len)*nb );
+ if ( isnanf( view.getFloat32( byteOffset, true ) ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( view.getFloat32( byteOffset, true ) ) ) {
+ 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+'::module,pointers:ndarray:len='+len, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..667d5505310f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/benchmark/benchmark.ndarray.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 bench = require( '@stdlib/bench' );
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var pkg = require( './../package.json' ).name;
+var csrot = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': !hasWebAssemblySupport()
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} len - array length
+* @returns {Function} benchmark function
+*/
+function createBenchmark( len ) {
+ var xbuf;
+ var ybuf;
+ var x;
+ var y;
+
+ xbuf = uniform( len*2, -100.0, 100.0, options );
+ x = new Complex64Array( xbuf.buffer );
+
+ ybuf = uniform( len*2, -100.0, 100.0, options );
+ y = new Complex64Array( ybuf.buffer );
+
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ csrot.ndarray( x.length, x, 1, 0, y, 1, 0, 0.8, 0.6 );
+ if ( isnanf( ybuf[ i%(len*2) ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( ybuf[ 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, opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/repl.txt
new file mode 100644
index 000000000000..d7ae5b80d0d2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/repl.txt
@@ -0,0 +1,639 @@
+
+{{alias}}.main( N, cx, strideX, cy, strideY, c, s )
+ Applies a plane rotation.
+
+ The `N` and stride parameters determine how values in the strided arrays are
+ accessed at runtime.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `N` is less than or equal to `0`, the vectors are unchanged.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ cx: Complex64Array
+ First input array.
+
+ strideX: integer
+ Index increment for `x`.
+
+ cy: Complex64Array
+ Second input array.
+
+ strideY: integer
+ Index increment for `y`.
+
+ c: number
+ Cosine of the angle of rotation.
+
+ s: number
+ Sine of the angle of rotation.
+
+ Returns
+ -------
+ cy: Complex64Array
+ Input array `cy`.
+
+ Examples
+ --------
+ // Standard usage:
+ > var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
+ > {{alias}}.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+ > var z = cy.get( 0 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~-0.6
+ > var im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~-1.2
+ > z = cx.get( 0 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~0.8
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~1.6
+
+ // Advanced indexing:
+ > cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ > cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+ > {{alias}}.main( 2, cx, -2, cy, 1, 0.8, 0.6 );
+ > z = cy.get( 0 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~-3.0
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~-3.6
+ > z = cx.get( 2 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~4.0
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~4.8
+
+ // Using typed array views:
+ > var cx0 = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ > var cy0 = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+ > var cx1 = new {{alias:@stdlib/array/complex64}}( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 );
+ > var cy1 = new {{alias:@stdlib/array/complex64}}( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 );
+ > {{alias}}.main( 1, cx1, 1, cy1, 1, 0.8, 0.6 );
+ > z = cy0.get( 2 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~-1.8
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~-2.4
+ > z = cx0.get( 1 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~2.4
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~3.2
+
+
+{{alias}}.ndarray( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s )
+ Applies a plane rotation using alternative indexing semantics.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ cx: Complex64Array
+ First input array.
+
+ strideX: integer
+ Index increment for `cx`.
+
+ offsetX: integer
+ Starting index for `cx`.
+
+ cy: Complex64Array
+ Second input array.
+
+ strideY: integer
+ Index increment for `cy`.
+
+ offsetY: integer
+ Starting index for `cy`.
+
+ c: number
+ Cosine of the angle of rotation.
+
+ s: number
+ Sine of the angle of rotation.
+
+ Returns
+ -------
+ cy: Complex64Array
+ Input array `cy`.
+
+ Examples
+ --------
+ // Standard usage:
+ > var cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0 ] );
+ > {{alias}}.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+ > var z = cy.get( 0 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~-0.6
+ > var im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~-1.2
+ > z = cx.get( 0 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~0.8
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~1.6
+
+ // Advanced indexing:
+ > cx = new {{alias:@stdlib/array/complex64}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ > cy = new {{alias:@stdlib/array/complex64}}( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+ > {{alias}}.ndarray( 1, cx, 2, 1, cy, 2, 1, 0.8, 0.6 );
+ > z = cy.get( 1 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~-1.8
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~-2.4
+ > z = cx.get( 1 );
+ > re = {{alias:@stdlib/complex/float32/real}}( z )
+ ~2.4
+ > im = {{alias:@stdlib/complex/float32/imag}}( z )
+ ~3.2
+
+
+{{alias}}.Module( memory )
+ Returns a new WebAssembly module wrapper which uses the provided WebAssembly
+ memory instance as its underlying memory.
+
+ Parameters
+ ----------
+ memory: Memory
+ WebAssembly memory instance.
+
+ Returns
+ -------
+ mod: Module
+ WebAssembly module wrapper.
+
+ Examples
+ --------
+ // Create a new memory instance:
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+
+ // Create a new routine:
+ > var mod = new {{alias}}.Module( mem );
+
+ // Initialize the routine:
+ > mod.initializeSync();
+
+
+{{alias}}.Module.prototype.binary
+ Read-only property which returns WebAssembly binary code.
+
+ Returns
+ -------
+ out: Uint8Array
+ WebAssembly binary code.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.binary
+
+
+
+{{alias}}.Module.prototype.memory
+ Read-only property which returns WebAssembly memory.
+
+ Returns
+ -------
+ mem: Memory|null
+ WebAssembly memory.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.memory
+
+
+
+{{alias}}.Module.prototype.buffer
+ Read-only property which returns a WebAssembly memory buffer as a
+ Uint8Array.
+
+ Returns
+ -------
+ buf: Uint8Array|null
+ WebAssembly memory buffer.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.buffer
+
+
+
+{{alias}}.Module.prototype.view
+ Read-only property which returns a WebAsssembly memory buffer as a DataView.
+
+ Returns
+ -------
+ view: DataView|null
+ WebAssembly memory view.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.view
+
+
+
+{{alias}}.Module.prototype.exports
+ Read-only property which returns "raw" WebAssembly module exports.
+
+ Returns
+ -------
+ out: Object|null
+ WebAssembly module exports.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.exports
+ {...}
+
+
+{{alias}}.Module.prototype.initialize()
+ Asynchronously initializes a WebAssembly module instance.
+
+ Returns
+ -------
+ p: Promise
+ Promise which resolves upon initializing a WebAssembly module instance.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initialize();
+
+
+{{alias}}.Module.prototype.initializeAsync( clbk )
+ Asynchronously initializes a WebAssembly module instance.
+
+ Parameters
+ ----------
+ clbk: Function
+ Callback to invoke upon initializing a WebAssembly module instance.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > function clbk() { console.log( 'done' ) };
+ > mod.initializeAsync( clbk );
+
+
+{{alias}}.Module.prototype.initializeSync()
+ Synchronously initializes a WebAssembly module instance.
+
+ In web browsers, JavaScript engines may raise an exception when attempting
+ to synchronously compile large WebAssembly binaries due to concerns about
+ blocking the main thread. Hence, to initialize WebAssembly modules having
+ large binaries (e.g., >4KiB), consider using asynchronous initialization
+ methods in browser contexts.
+
+ Returns
+ -------
+ mod: Module
+ Module wrapper instance.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+
+
+{{alias}}.Module.prototype.realloc( nbytes )
+ Reallocates the underlying WebAssembly memory instance to a specified number
+ of bytes.
+
+ WebAssembly memory can only *grow*, not shrink. Hence, if provided a number
+ of bytes which is less than or equal to the size of the current memory, the
+ function does nothing.
+
+ When non-shared memory is resized, the underlying the `ArrayBuffer` is
+ detached, consequently invalidating any associated typed array views. Before
+ resizing non-shared memory, ensure that associated typed array views no
+ longer need byte access and can be garbage collected.
+
+ Parameters
+ ----------
+ nbytes: integer
+ Memory size (in bytes).
+
+ Returns
+ -------
+ bool: boolean
+ Boolean indicating whether the resize operation was successful.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.realloc( 100 )
+
+
+
+{{alias}}.Module.prototype.hasCapacity( byteOffset, values )
+ Returns a boolean indicating whether the underlying WebAssembly memory
+ instance has the capacity to store a provided list of values starting from a
+ specified byte offset.
+
+ Parameters
+ ----------
+ byteOffset: integer
+ Byte offset at which to start writing values.
+
+ values: ArrayLikeObject
+ Input array containing values to write.
+
+ Returns
+ -------
+ bool: boolean
+ Boolean indicating whether the underlying WebAssembly memory instance
+ has enough capacity.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.realloc( 100 );
+ > mod.hasCapacity( 0, [ 1, 2, 3, 4 ] )
+ true
+
+
+{{alias}}.Module.prototype.isView( values )
+ Returns a boolean indicating whether a provided list of values is a view of
+ the underlying memory of the WebAssembly module.
+
+ Parameters
+ ----------
+ values: ArrayLikeObject
+ Input array.
+
+ Returns
+ -------
+ bool: boolean
+ Boolean indicating whether the list is a memory view.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.realloc( 100 );
+ > mod.isView( [ 1, 2, 3, 4 ] )
+ false
+
+
+{{alias}}.Module.prototype.write( byteOffset, values )
+ Writes values to the underlying WebAssembly memory instance.
+
+ The function infers element size (i.e., number of bytes per element) from
+ the data type of the input array. For example, if provided a Float32Array,
+ the function writes each element as a single-precision floating-point number
+ to the underlying WebAssembly memory instance.
+
+ In order to write elements as a different data type, you need to perform an
+ explicit cast *before* calling this method. For example, in order to write
+ single-precision floating-point numbers contained in a Float32Array as
+ signed 32-bit integers, you must first convert the Float32Array to an
+ Int32Array before passing the values to this method.
+
+ If provided an array having an unknown or "generic" data type, elements are
+ written as double-precision floating-point numbers.
+
+ Parameters
+ ----------
+ byteOffset: integer
+ Byte offset at which to start writing values.
+
+ values: ArrayLikeObject
+ Input array containing values to write.
+
+ Returns
+ -------
+ mod: Module
+ Module wrapper instance.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.realloc( 100 );
+ > mod.write( 0, [ 1, 2, 3, 4 ] );
+
+
+{{alias}}.Module.prototype.read( byteOffset, out )
+ Reads values from the underlying WebAssembly memory instance.
+
+ The function infers element size (i.e., number of bytes per element) from
+ the data type of the output array. For example, if provided a Float32Array,
+ the function reads each element as a single-precision floating-point number
+ from the underlying WebAssembly memory instance.
+
+ In order to read elements as a different data type, you need to perform an
+ explicit cast *after* calling this method. For example, in order to read
+ single-precision floating-point numbers contained in a Float32Array as
+ signed 32-bit integers, you must convert the Float32Array to an Int32Array
+ after reading memory values using this method.
+
+ If provided an output array having an unknown or "generic" data type,
+ elements are read as double-precision floating-point numbers.
+
+ Parameters
+ ----------
+ byteOffset: integer
+ Byte offset at which to start reading values.
+
+ out: ArrayLikeObject
+ Output array for storing read values.
+
+ Returns
+ -------
+ mod: Module
+ Module wrapper instance.
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 0 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+ > mod.realloc( 100 );
+ > mod.write( 0, [ 1, 2, 3, 4 ] );
+ > var out = [ 0, 0, 0, 0 ];
+ > mod.read( 0, out );
+ > out
+ [ 1, 2, 3, 4 ]
+
+
+{{alias}}.Module.prototype.main( N, cxp, sx, cyp, sy, c, s )
+ Applies a plane rotation.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ cxp: integer
+ First input array pointer (i.e., byte offset).
+
+ sx: integer
+ Index increment for `x`.
+
+ cyp: integer
+ Second input array pointer (i.e., byte offset).
+
+ sy: integer
+ Index increment for `y`.
+
+ Returns
+ -------
+ cyp: integer
+ Input array pointer for `cy` (i.e., byte offset).
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 1 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+
+ // Define "pointers" (i.e., byte offsets) into module memory:
+ > var xptr = 0;
+ > var yptr = 40;
+
+ // Write data to module memory:
+ > var xbuf = {{alias:@stdlib/array/one-to}}( 10, 'float32' );
+ > var x = new {{alias:@stdlib/array/complex64}}( xbuf.buffer );
+ > mod.write( xptr, x );
+
+ > var ybuf = {{alias:@stdlib/array/ones}}( 10, 'float32' );
+ > var y = new {{alias:@stdlib/array/complex64}}( ybuf.buffer );
+ > mod.write( yptr, y );
+
+ // Perform computation:
+ > mod.main( 5, xptr, 1, yptr, 1, 0.8, 0.6 );
+
+ // Extract results from module memory:
+ > var viewX = {{alias:@stdlib/array/zeros}}( 5, 'complex64' );
+ > var viewY = {{alias:@stdlib/array/zeros}}( 5, 'complex64' );
+ > mod.read( xptr, viewX );
+ > mod.read( yptr, viewY );
+
+ > var v = viewX.get( 1 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( v )
+ ~3.0
+ > var im = {{alias:@stdlib/complex/float32/imag}}( v )
+ ~3.8
+ > v = viewY.get( 1 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( v )
+ ~-1.0
+ > var im = {{alias:@stdlib/complex/float32/imag}}( v )
+ ~-1.6
+
+
+{{alias}}.Module.prototype.ndarray( N, cxp, sx, ox, cyp, sy, oy, c, s )
+ Applies a plane rotation using alternative indexing semantics.
+
+ Parameters
+ ----------
+ N: integer
+ Number of indexed elements.
+
+ cxp: integer
+ First input array pointer (i.e., byte offset).
+
+ sx: integer
+ Index increment for `cx`.
+
+ ox: integer
+ Starting index for `cx`.
+
+ cyp: integer
+ Second input array pointer (i.e., byte offset).
+
+ sy: integer
+ Index increment for `cy`.
+
+ oy: integer
+ Starting index for `cy`.
+
+ c: number
+ Cosine of the angle of rotation.
+
+ s: number
+ Sine of the angle of rotation.
+
+ Returns
+ -------
+ cyp: integer
+ Input array pointer for `cy` (i.e., byte offset).
+
+ Examples
+ --------
+ > var mem = new {{alias:@stdlib/wasm/memory}}( { 'initial': 1 } );
+ > var mod = new {{alias}}.Module( mem );
+ > mod.initializeSync();
+
+ // Define "pointers" (i.e., byte offsets) into module memory:
+ > var xptr = 0;
+ > var yptr = 40;
+
+ // Write data to module memory:
+ > var xbuf = {{alias:@stdlib/array/one-to}}( 10, 'float32' );
+ > var x = new {{alias:@stdlib/array/complex64}}( xbuf.buffer );
+ > mod.write( xptr, x );
+
+ > var ybuf = {{alias:@stdlib/array/ones}}( 10, 'float32' );
+ > var y = new {{alias:@stdlib/array/complex64}}( ybuf.buffer );
+ > mod.write( yptr, y );
+
+ // Perform computation:
+ > mod.ndarray( 5, xptr, 1, 0, yptr, 1, 0, 0.8, 0.6 );
+
+ // Extract results from module memory:
+ > var viewX = {{alias:@stdlib/array/zeros}}( 5, 'complex64' );
+ > var viewY = {{alias:@stdlib/array/zeros}}( 5, 'complex64' );
+ > mod.read( xptr, viewX );
+ > mod.read( yptr, viewY );
+
+ > var v = viewX.get( 1 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( v )
+ ~3.0
+ > var im = {{alias:@stdlib/complex/float32/imag}}( v )
+ ~3.8
+ > v = viewY.get( 1 );
+ > var re = {{alias:@stdlib/complex/float32/real}}( v )
+ ~-1.0
+ > var im = {{alias:@stdlib/complex/float32/imag}}( v )
+ ~-1.6
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/index.d.ts
new file mode 100644
index 000000000000..4196a2377f6b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/index.d.ts
@@ -0,0 +1,556 @@
+/*
+* @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 { ModuleWrapper, Memory } from '@stdlib/types/wasm';
+import { Complex64Array } from '@stdlib/types/array';
+
+/**
+* Interface defining a module constructor which is both "newable" and "callable".
+*/
+interface ModuleConstructor {
+ /**
+ * Returns a new WebAssembly module wrapper instance which uses the provided WebAssembly memory instance as its underlying memory.
+ *
+ * @param mem - WebAssembly memory instance
+ * @returns module wrapper instance
+ *
+ * @example
+ * var Memory = require( '@stdlib/wasm/memory' );
+ * var oneTo = require( '@stdlib/array/one-to' );
+ * var ones = require( '@stdlib/array/ones' );
+ * var zeros = require( '@stdlib/array/zeros' );
+ * var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+ *
+ * // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+ * var mem = new Memory({
+ * 'initial': 10,
+ * 'maximum': 100
+ * });
+ *
+ * // Create a BLAS routine:
+ * var mod = new csrot.Module( mem );
+ * // returns
+ *
+ * // Initialize the routine:
+ * mod.initializeSync();
+ *
+ * // Define a vector data type:
+ * var dtype = 'complex64';
+ *
+ * // Specify a vector length:
+ * var N = 5;
+ *
+ * // Define pointers (i.e., byte offsets) for storing input vectors:
+ * var cxptr = 0;
+ * var cyptr = N * bytesPerElement( dtype );
+ *
+ * // Write vector values to module memory:
+ * var xbuf = oneTo( N*2, 'float32' );
+ * var x = new Complex64Array( xbuf.buffer );
+ * mod.write( cxptr, x );
+ *
+ * var ybuf = ones( N*2, 'float32' );
+ * var y = new Complex64Array( ybuf.buffer );
+ * mod.write( cyptr, y );
+ *
+ * // Perform computation:
+ * var ptr = mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+ * // returns
+ *
+ * var bool = ( ptr === cyptr );
+ * // returns true
+ *
+ * // Read out the results:
+ * var viewX = zeros( N, dtype );
+ * var viewY = zeros( N, dtype );
+ * mod.read( cxptr, viewX );
+ * mod.read( cyptr, viewY );
+ *
+ * console.log( reinterpretComplex64( viewY, 0 ) );
+ * // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+ *
+ * console.log( reinterpretComplex64( viewX, 0 ) );
+ * // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+ */
+ new( mem: Memory ): Module; // newable
+
+ /**
+ * Returns a new WebAssembly module wrapper instance which uses the provided WebAssembly memory instance as its underlying memory.
+ *
+ * @param mem - WebAssembly memory instance
+ * @returns module wrapper instance
+ *
+ * @example
+ * var Memory = require( '@stdlib/wasm/memory' );
+ * var oneTo = require( '@stdlib/array/one-to' );
+ * var ones = require( '@stdlib/array/ones' );
+ * var zeros = require( '@stdlib/array/zeros' );
+ * var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+ *
+ * // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+ * var mem = new Memory({
+ * 'initial': 10,
+ * 'maximum': 100
+ * });
+ *
+ * // Create a BLAS routine:
+ * var mod = csrot.Module( mem );
+ * // returns
+ *
+ * // Initialize the routine:
+ * mod.initializeSync();
+ *
+ * // Define a vector data type:
+ * var dtype = 'complex64';
+ *
+ * // Specify a vector length:
+ * var N = 5;
+ *
+ * // Define pointers (i.e., byte offsets) for storing input vectors:
+ * var cxptr = 0;
+ * var cyptr = N * bytesPerElement( dtype );
+ *
+ * // Write vector values to module memory:
+ * var xbuf = oneTo( N*2, 'float32' );
+ * var x = new Complex64Array( xbuf.buffer );
+ * mod.write( cxptr, x );
+ *
+ * var ybuf = ones( N*2, 'float32' );
+ * var y = new Complex64Array( ybuf.buffer );
+ * mod.write( cyptr, y );
+ *
+ * // Perform computation:
+ * var ptr = mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+ * // returns
+ *
+ * var bool = ( ptr === cyptr );
+ * // returns true
+ *
+ * // Read out the results:
+ * var viewX = zeros( N, dtype );
+ * var viewY = zeros( N, dtype );
+ * mod.read( cxptr, viewX );
+ * mod.read( cyptr, viewY );
+ *
+ * console.log( reinterpretComplex64( viewY, 0 ) );
+ * // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+ *
+ * console.log( reinterpretComplex64( viewX, 0 ) );
+ * // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+ */
+ ( mem: Memory ): Module; // callable
+}
+
+/**
+* Interface describing a `csrot` WebAssembly module.
+*/
+interface Module extends ModuleWrapper {
+ /**
+ * Applies a plane rotation.
+ *
+ * @param N - number of indexed elements
+ * @param cxptr - first input array pointer (i.e., byte offset)
+ * @param strideX - `cx` stride length
+ * @param cyptr - second input array pointer (i.e., byte offset)
+ * @param strideY - `cy` stride length
+ * @param c - cosine of the angle of rotation
+ * @param s - sine of the angle of rotation
+ * @returns input array pointer `cy` (i.e., byte offset)
+ *
+ * @example
+ * var Memory = require( '@stdlib/wasm/memory' );
+ * var oneTo = require( '@stdlib/array/one-to' );
+ * var ones = require( '@stdlib/array/ones' );
+ * var zeros = require( '@stdlib/array/zeros' );
+ * var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+ *
+ * // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+ * var mem = new Memory({
+ * 'initial': 10,
+ * 'maximum': 100
+ * });
+ *
+ * // Create a BLAS routine:
+ * var mod = new csrot.Module( mem );
+ * // returns
+ *
+ * // Initialize the routine:
+ * mod.initializeSync();
+ *
+ * // Define a vector data type:
+ * var dtype = 'complex64';
+ *
+ * // Specify a vector length:
+ * var N = 5;
+ *
+ * // Define pointers (i.e., byte offsets) for storing input vectors:
+ * var cxptr = 0;
+ * var cyptr = N * bytesPerElement( dtype );
+ *
+ * // Write vector values to module memory:
+ * var xbuf = oneTo( N*2, 'float32' );
+ * var x = new Complex64Array( xbuf.buffer );
+ * mod.write( cxptr, x );
+ *
+ * var ybuf = ones( N*2, 'float32' );
+ * var y = new Complex64Array( ybuf.buffer );
+ * mod.write( cyptr, y );
+ *
+ * // Perform computation:
+ * var ptr = mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+ * // returns
+ *
+ * var bool = ( ptr === cyptr );
+ * // returns true
+ *
+ * // Read out the results:
+ * var viewX = zeros( N, dtype );
+ * var viewY = zeros( N, dtype );
+ * mod.read( cxptr, viewX );
+ * mod.read( cyptr, viewY );
+ *
+ * console.log( reinterpretComplex64( viewY, 0 ) );
+ * // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+ *
+ * console.log( reinterpretComplex64( viewX, 0 ) );
+ * // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+ */
+ main( N: number, cxptr: number, strideX: number, cyptr: number, strideY: number, c: number, s: number ): number;
+
+ /**
+ * Applies a plane rotation using alternative indexing semantics.
+ *
+ * @param N - number of indexed elements
+ * @param cxptr - first input array pointer (i.e., byte offset)
+ * @param strideX - `cx` stride length
+ * @param offsetX - starting index for `x`
+ * @param cyptr - second input array pointer (i.e., byte offset)
+ * @param strideY - `cy` stride length
+ * @param offsetY - starting index for `y`
+ * @param c - cosine of the angle of rotation
+ * @param s - sine of the angle of rotation
+ * @returns input array pointer `cyptr` (i.e., byte offset)
+ *
+ * @example
+ * var Memory = require( '@stdlib/wasm/memory' );
+ * var oneTo = require( '@stdlib/array/one-to' );
+ * var ones = require( '@stdlib/array/ones' );
+ * var zeros = require( '@stdlib/array/zeros' );
+ * var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+ *
+ * // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+ * var mem = new Memory({
+ * 'initial': 10,
+ * 'maximum': 100
+ * });
+ *
+ * // Create a BLAS routine:
+ * var mod = new csrot.Module( mem );
+ * // returns
+ *
+ * // Initialize the routine:
+ * mod.initializeSync();
+ *
+ * // Define a vector data type:
+ * var dtype = 'complex64';
+ *
+ * // Specify a vector length:
+ * var N = 5;
+ *
+ * // Define pointers (i.e., byte offsets) for storing input vectors:
+ * var cxptr = 0;
+ * var cyptr = N * bytesPerElement( dtype );
+ *
+ * // Write vector values to module memory:
+ * var xbuf = oneTo( N*2, 'float32' );
+ * var x = new Complex64Array( xbuf.buffer );
+ * mod.write( cxptr, x );
+ *
+ * var ybuf = ones( N*2, 'float32' );
+ * var y = new Complex64Array( ybuf.buffer );
+ * mod.write( cyptr, y );
+ *
+ * // Perform computation:
+ * var ptr = mod.ndarray( N, cxptr, 1, 0, cyptr, 1, 0, 0.8, 0.6 );
+ * // returns
+ *
+ * var bool = ( ptr === cyptr );
+ * // returns true
+ *
+ * // Read out the results:
+ * var viewX = zeros( N, dtype );
+ * var viewY = zeros( N, dtype );
+ * mod.read( cxptr, viewX );
+ * mod.read( cyptr, viewY );
+ *
+ * console.log( reinterpretComplex64( viewY, 0 ) );
+ * // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+ *
+ * console.log( reinterpretComplex64( viewX, 0 ) );
+ * // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+ */
+ ndarray( N: number, cxptr: number, strideX: number, offsetX: number, cyptr: number, strideY: number, offsetY: number, c: number, s: number ): number;
+}
+
+/**
+* Interface describing `csrot`.
+*/
+interface Routine extends ModuleWrapper {
+ /**
+ * Applies a plane rotation.
+ *
+ * @param N - number of indexed elements
+ * @param cx - first input array
+ * @param strideX - `cx` stride length
+ * @param cy - second input array
+ * @param strideY - `cy` stride length
+ * @param c - cosine of the angle of rotation
+ * @param s - sine of the angle of rotation
+ * @returns input array `cy`
+ *
+ * @example
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var realf = require( '@stdlib/complex/float32/real' );
+ * var imagf = require( '@stdlib/complex/float32/imag' );
+ *
+ * var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+ * var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ *
+ * // Perform operation:
+ * csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+ *
+ * var v = cx.get( 0 );
+ * // returns
+ *
+ * var re = realf( v );
+ * // returns ~-0.2
+ *
+ * var im = imagf( v );
+ * // returns ~-0.4
+ *
+ * v = cy.get( 0 );
+ * // returns
+ *
+ * re = realf( v );
+ * // returns ~1.4
+ *
+ * im = imagf( v );
+ * // returns ~2.8
+ */
+ main( N: number, cx: Complex64Array, strideX: number, cy: Complex64Array, strideY: number, c: number, s: number ): Complex64Array;
+
+ /**
+ * Applies a plane rotation using alternative indexing semantics.
+ *
+ * @param N - number of indexed elements
+ * @param cx - first input array
+ * @param strideX - `cx` stride length
+ * @param offsetX - starting index for `x`
+ * @param cy - second input array
+ * @param strideY - `cy` stride length
+ * @param offsetY - starting index for `y`
+ * @returns input array `cy`
+ *
+ * @example
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var realf = require( '@stdlib/complex/float32/real' );
+ * var imagf = require( '@stdlib/complex/float32/imag' );
+ *
+ * var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+ * var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ *
+ * // Perform operation:
+ * csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+ *
+ * var v = cx.get( 0 );
+ * // returns
+ *
+ * var re = realf( v );
+ * // returns ~-0.2
+ *
+ * var im = imagf( v );
+ * // returns ~-0.4
+ *
+ * v = cy.get( 0 );
+ * // returns
+ *
+ * re = realf( v );
+ * // returns ~1.4
+ *
+ * im = imagf( v );
+ * // returns ~2.8
+ */
+ ndarray( N: number, cx: Complex64Array, strideX: number, offsetX: number, cy: Complex64Array, strideY: number, offsetY: number, c: number, s: number ): Complex64Array;
+
+ /**
+ * Returns a new WebAssembly module wrapper instance which uses the provided WebAssembly memory instance as its underlying memory.
+ *
+ * @param mem - WebAssembly memory instance
+ * @returns module wrapper instance
+ *
+ * @example
+ * var Memory = require( '@stdlib/wasm/memory' );
+ * var oneTo = require( '@stdlib/array/one-to' );
+ * var ones = require( '@stdlib/array/ones' );
+ * var zeros = require( '@stdlib/array/zeros' );
+ * var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+ * var Complex64Array = require( '@stdlib/array/complex64' );
+ * var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+ *
+ * // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+ * var mem = new Memory({
+ * 'initial': 10,
+ * 'maximum': 100
+ * });
+ *
+ * // Create a BLAS routine:
+ * var mod = new csrot.Module( mem );
+ * // returns
+ *
+ * // Initialize the routine:
+ * mod.initializeSync();
+ *
+ * // Define a vector data type:
+ * var dtype = 'complex64';
+ *
+ * // Specify a vector length:
+ * var N = 5;
+ *
+ * // Define pointers (i.e., byte offsets) for storing input vectors:
+ * var cxptr = 0;
+ * var cyptr = N * bytesPerElement( dtype );
+ *
+ * // Write vector values to module memory:
+ * var xbuf = oneTo( N*2, 'float32' );
+ * var x = new Complex64Array( xbuf.buffer );
+ * mod.write( cxptr, x );
+ *
+ * var ybuf = zeros( N*2, 'float32' );
+ * var y = new Complex64Array( ybuf.buffer );
+ * mod.write( cyptr, y );
+ *
+ * // Perform computation:
+ * var ptr = mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+ * // returns
+ *
+ * var bool = ( ptr === cyptr );
+ * // returns true
+ *
+ * // Read out the results:
+ * var viewX = zeros( N, dtype );
+ * var viewY = zeros( N, dtype );
+ * mod.read( cxptr, viewX );
+ * mod.read( cyptr, viewY );
+ *
+ * console.log( reinterpretComplex64( viewY, 0 ) );
+ * // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+ *
+ * console.log( reinterpretComplex64( viewX, 0 ) );
+ * // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+ */
+ Module: ModuleConstructor;
+}
+
+/**
+* Applies a plane rotation.
+*
+* @param N - number of indexed elements
+* @param cx - first input array
+* @param strideX - `cx` stride length
+* @param cy - second input array
+* @param strideY - `cy` stride length
+* @param c - cosine of the angle of rotation
+* @param s - sine of the angle of rotation
+* @returns input array `cy`
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*/
+declare var csrot: Routine;
+
+
+// EXPORTS //
+
+export = csrot;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/test.ts
new file mode 100644
index 000000000000..1575cc5b0579
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/docs/types/test.ts
@@ -0,0 +1,665 @@
+/*
+* @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.
+*/
+
+/* eslint-disable space-in-parens */
+
+import Complex64Array = require( '@stdlib/array/complex64' );
+import Memory = require( '@stdlib/wasm/memory' );
+import csrot = require( './index' );
+
+
+// TESTS //
+
+// Attached to the main export is a `main` method which returns a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectType Complex64Array
+}
+
+// The compiler throws an error if the `main` method is provided a first argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( '10', cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( true, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( false, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( null, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( undefined, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( [], cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( {}, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( ( x: number ): number => x, cx, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a second argument which is not a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, 10, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, '10', 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, true, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, false, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, null, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, undefined, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, [], 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, {}, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, ( x: number ): number => x, 1, cy, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a third argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, '10', cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, true, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, false, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, null, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, undefined, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, [], cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, {}, cy, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, ( x: number ): number => x, cy, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a fourth argument which is not a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, 1, 10, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, '10', 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, true, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, false, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, null, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, undefined, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, [], 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, {}, 1, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, ( x: number ): number => x, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a fifth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, 1, cy, '10', 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, true, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, false, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, null, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, undefined, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, [], 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, {}, 0.8, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a sixth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, 1, cy, 1, '10', 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, true, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, false, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, null, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, undefined, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, [], 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, {}, 0.6 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, ( x: number ): number => x, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided a seventh argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, '10' ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, true ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, false ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, null ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, undefined ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, [] ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, {} ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method is provided an unsupported number of arguments...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.main(); // $ExpectError
+ csrot.main( cx.length ); // $ExpectError
+ csrot.main( cx.length, cx ); // $ExpectError
+ csrot.main( cx.length, cx, 1 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8 ); // $ExpectError
+ csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectType Complex64Array
+}
+
+// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( '10', cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( true, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( false, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( null, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( undefined, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( [], cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( {}, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( ( x: number ): number => x, cx, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, 10, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, '10', 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, true, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, false, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, null, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, undefined, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, [], 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, {}, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, ( x: number ): number => x, 1, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, '10', 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, true, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, false, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, null, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, undefined, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, [], 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, {}, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, ( x: number ): number => x, 0, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, '10', cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, true, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, false, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, null, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, undefined, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, [], cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, {}, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, ( x: number ): number => x, cy, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Complex64Array...
+{
+ const cx = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, 10, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, '10', 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, true, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, false, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, null, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, undefined, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, [], 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, {}, 1, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, ( x: number ): number => x, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, cy, '10', 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, true, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, false, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, null, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, undefined, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, [], 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, {}, 0, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, ( x: number ): number => x, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, '10', 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, true, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, false, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, null, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, undefined, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, [], 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, {}, 0.8, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, '10', 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, true, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, false, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, null, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, undefined, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, [], 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, {}, 0.6 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, ( x: number ): number => x, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided a ninth argument which is not a number...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, '10' ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, true ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, false ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, null ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, undefined ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, [] ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, {} ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const cx = new Complex64Array( 10 );
+ const cy = new Complex64Array( 10 );
+
+ csrot.ndarray(); // $ExpectError
+ csrot.ndarray( cx.length ); // $ExpectError
+ csrot.ndarray( cx.length, cx ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8 ); // $ExpectError
+ csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6, 10 ); // $ExpectError
+}
+
+// Attached to the main export is a `Module` constructor which returns a module...
+{
+ const mem = new Memory({
+ 'initial': 0
+ });
+
+ csrot.Module( mem ); // $ExpectType Module
+}
+
+// The compiler throws an error if the `Module` constructor is not provided a WebAssembly memory instance...
+{
+ csrot.Module( '10' ); // $ExpectError
+ csrot.Module( true ); // $ExpectError
+ csrot.Module( false ); // $ExpectError
+ csrot.Module( null ); // $ExpectError
+ csrot.Module( undefined ); // $ExpectError
+ csrot.Module( [] ); // $ExpectError
+ csrot.Module( {} ); // $ExpectError
+ csrot.Module( ( x: number ): number => x ); // $ExpectError
+}
+
+// The `Module` constructor returns a module instance having a `main` method which returns a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, 1, 80, 1, 0.8, 0.6 ); // $ExpectType number
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a first argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( '10', 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( true, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( false, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( null, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( undefined, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( [], 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( {}, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( ( x: number ): number => x, 10, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a second argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, '10', 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, true, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, false, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, null, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, undefined, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, [], 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, {}, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, ( x: number ): number => x, 1, 80, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a third argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, '10', 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, true, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, false, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, null, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, undefined, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, [], 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, {}, 80, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, ( x: number ): number => x, 80, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a fourth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, 1, '10', 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, true, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, false, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, null, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, undefined, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, [], 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, {}, 1, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, ( x: number ): number => x, 1, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a fifth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, 1, 80, '10', 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, true, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, false, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, null, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, undefined, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, [], 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, {}, 0.8, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a sixth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, 1, 80, 1, '10', 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, true, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, false, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, null, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, undefined, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, [], 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, {}, 0.6 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, ( x: number ): number => x, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided a seventh argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main( 10, 0, 1, 80, 1, 0.8, '10' ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, true ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, false ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, null ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, undefined ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, [] ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, {} ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `main` method of a module instance is provided an unsupported number of arguments...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.main(); // $ExpectError
+ mod.main( 10 ); // $ExpectError
+ mod.main( 10, 0 ); // $ExpectError
+ mod.main( 10, 0, 1 ); // $ExpectError
+ mod.main( 10, 0, 1, 80 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8 ); // $ExpectError
+ mod.main( 10, 0, 1, 80, 1, 0.8, 0.6, 10 ); // $ExpectError
+}
+
+// The `Module` constructor returns a module instance having an `ndarray` method which returns a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectType number
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a first argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( '10', 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( true, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( false, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( null, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( undefined, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( [], 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( {}, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( ( x: number ): number => x, 0, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a second argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, '10', 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, true, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, false, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, null, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, undefined, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, [], 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, {}, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, ( x: number ): number => x, 1, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a third argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, '10', 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, true, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, false, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, null, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, undefined, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, [], 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, {}, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, ( x: number ): number => x, 0, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a fourth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, '10', 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, true, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, false, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, null, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, undefined, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, [], 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, {}, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, ( x: number ): number => x, 80, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a fifth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, '10', 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, true, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, false, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, null, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, undefined, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, [], 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, {}, 1, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, ( x: number ): number => x, 1, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a sixth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, 80, '10', 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, true, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, false, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, null, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, undefined, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, [], 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, {}, 0, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, ( x: number ): number => x, 0, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a seventh argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, 80, 1, '10', 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, true, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, false, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, null, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, undefined, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, [], 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, {}, 0.8, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, ( x: number ): number => x, 0.8, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided an eighth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, '10', 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, true, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, false, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, null, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, undefined, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, [], 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, {}, 0.6 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, ( x: number ): number => x, 0.6 ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided a ninth argument which is not a number...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, '10' ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, true ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, false ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, null ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, undefined ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, [] ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, {} ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method of a module instance is provided an unsupported number of arguments...
+{
+ const mem = new Memory({
+ 'initial': 1
+ });
+ const mod = csrot.Module( mem );
+
+ mod.ndarray(); // $ExpectError
+ mod.ndarray( 10 ); // $ExpectError
+ mod.ndarray( 10, 0 ); // $ExpectError
+ mod.ndarray( 10, 0, 1 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8 ); // $ExpectError
+ mod.ndarray( 10, 0, 1, 0, 80, 1, 0, 0.8, 0.6, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/index.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/index.js
new file mode 100644
index 000000000000..fdecf0733f6d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/index.js
@@ -0,0 +1,54 @@
+/**
+* @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 hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var oneTo = require( '@stdlib/array/one-to' );
+var ones = require( '@stdlib/array/ones' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+var csrot = require( './../lib' );
+
+function main() {
+ if ( !hasWebAssemblySupport() ) {
+ console.error( 'Environment does not support WebAssembly.' );
+ return;
+ }
+ // Specify a vector length:
+ var N = 5;
+
+ // Create input arrays:
+ var xbuf = oneTo( N*2, 'float32' );
+ var cx = new Complex64Array( xbuf.buffer );
+
+ var ybuf = ones( N*2, 'float32' );
+ var cy = new Complex64Array( ybuf.buffer );
+
+ // Perform computation:
+ csrot.ndarray( N, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+
+ // Print the results:
+ console.log( reinterpretComplex64( cx, 0 ) );
+ // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+
+ console.log( reinterpretComplex64( cy, 0 ) );
+ // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/little_endian_arrays.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/little_endian_arrays.js
new file mode 100644
index 000000000000..584bb514a6a5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/little_endian_arrays.js
@@ -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.
+*/
+
+'use strict';
+
+var hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var Memory = require( '@stdlib/wasm/memory' );
+var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
+var gfillBy = require( '@stdlib/blas/ext/base/gfill-by' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var Float32ArrayLE = require( '@stdlib/array/little-endian-float32' );
+var csrot = require( './../lib' );
+
+function main() {
+ if ( !hasWebAssemblySupport() ) {
+ console.error( 'Environment does not support WebAssembly.' );
+ return;
+ }
+ // Create a new memory instance with an initial size of 10 pages (640KiB) and a maximum size of 100 pages (6.4MiB):
+ var mem = new Memory({
+ 'initial': 10,
+ 'maximum': 100
+ });
+
+ // Create a BLAS routine:
+ var mod = new csrot.Module( mem );
+ // returns
+
+ // Initialize the routine:
+ mod.initializeSync(); // eslint-disable-line node/no-sync
+
+ // Specify a vector length:
+ var N = 5;
+
+ // Define pointers (i.e., byte offsets) for storing input vectors:
+ var cxptr = 0;
+ var cyptr = N * bytesPerElement( 'complex64' );
+
+ // Create typed array views over module memory:
+ var x = new Float32ArrayLE( mod.memory.buffer, cxptr, N*2 );
+ var y = new Float32ArrayLE( mod.memory.buffer, cyptr, N*2 );
+
+ // Write values to module memory:
+ gfillBy( N*2, x, 1, discreteUniform( -10.0, 10.0 ) );
+ gfillBy( N*2, y, 1, discreteUniform( -10.0, 10.0 ) );
+
+ // Perform computation:
+ mod.ndarray( N, cxptr, 1, 0, cyptr, 1, 0, 0.8, 0.6 );
+
+ // Print the result:
+ console.log( 'x[:] = [%s]', x.toString() );
+ console.log( 'y[:] = [%s]', y.toString() );
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/module.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/module.js
new file mode 100644
index 000000000000..3efc58cd7e22
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/examples/module.js
@@ -0,0 +1,84 @@
+/**
+* @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 hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
+var Memory = require( '@stdlib/wasm/memory' );
+var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+var oneTo = require( '@stdlib/array/one-to' );
+var ones = require( '@stdlib/array/ones' );
+var zeros = require( '@stdlib/array/zeros' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+var csrot = require( './../lib' );
+
+function main() {
+ if ( !hasWebAssemblySupport() ) {
+ console.error( 'Environment does not support WebAssembly.' );
+ return;
+ }
+ // Create a new memory instance with an initial size of 10 pages (640KiB) and a maximum size of 100 pages (6.4MiB):
+ var mem = new Memory({
+ 'initial': 10,
+ 'maximum': 100
+ });
+
+ // Create a BLAS routine:
+ var mod = new csrot.Module( mem );
+ // returns
+
+ // Initialize the routine:
+ mod.initializeSync(); // eslint-disable-line node/no-sync
+
+ // Define a vector data type for interleaved real and imaginary components:
+ var dtype = 'complex64';
+
+ // Specify a vector length:
+ var N = 5;
+
+ // Define pointer (i.e., byte offsets) for storing input vectors:
+ var cxptr = 0;
+ var cyptr = N * bytesPerElement( dtype );
+
+ // Write vector values to module memory:
+ var xbuf = oneTo( N*2, 'float32' );
+ var cx = new Complex64Array( xbuf.buffer );
+ mod.write( cxptr, cx );
+
+ var ybuf = ones( N*2, 'float32' );
+ var cy = new Complex64Array( ybuf.buffer );
+ mod.write( cyptr, cy );
+
+ // Perform computation:
+ mod.ndarray( N, cxptr, 1, 0, cyptr, 1, 0, 0.8, 0.6 );
+
+ // Read out the results:
+ var viewX = zeros( N, dtype );
+ var viewY = zeros( N, dtype );
+ mod.read( cxptr, viewX );
+ mod.read( cyptr, viewY );
+
+ console.log( reinterpretComplex64( viewX, 0 ) );
+ // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+
+ console.log( reinterpretComplex64( viewY, 0 ) );
+ // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.browser.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.browser.js
new file mode 100644
index 000000000000..6ec591da4d40
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.browser.js
@@ -0,0 +1,33 @@
+/**
+* @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 base64ToUint8Array = require( '@stdlib/string/base/base64-to-uint8array' );
+
+
+// MAIN //
+
+var wasm = base64ToUint8Array( 'AGFzbQEAAAAADwhkeWxpbmsuMAEEAAAAAAEaA2AAAGAHf39/f399fQBgCX9/f39/f399fQACDwEDZW52Bm1lbW9yeQIAAAMEAwABAgdMBBFfX3dhc21fY2FsbF9jdG9ycwAAGF9fd2FzbV9hcHBseV9kYXRhX3JlbG9jcwAAB2NfY3Nyb3QAAQ9jX2Nzcm90X25kYXJyYXkAAgr6AgMDAAELxgECBX8CfSAAQQBKBEBBASAAayIHIARsQQF0QQAgBEEATBshCCACIAdsQQF0QQAgAkEATBshByAEQQF0IQogAkEBdCELA0AgAyAIQQJ0aiICIAUgAioCACIMlCAGIAEgB0ECdGoiBCoCACINlJM4AgAgBCAFIA2UIAYgDJSSOAIAIAIgBSACKgIEIgyUIAYgBCoCBCINlJM4AgQgBCAFIA2UIAYgDJSSOAIEIAggCmohCCAHIAtqIQcgCUEBaiIJIABHDQALCwurAQICfQN/IABBAEoEQCAGQQF0IQYgA0EBdCEDIAVBAXQhDCACQQF0IQ0DQCAEIAZBAnRqIgIgByACKgIAIgmUIAggASADQQJ0aiIFKgIAIgqUkzgCACAFIAcgCpQgCCAJlJI4AgAgAiAHIAIqAgQiCZQgCCAFKgIEIgqUkzgCBCAFIAcgCpQgCCAJlJI4AgQgBiAMaiEGIAMgDWohAyALQQFqIgsgAEcNAAsLCw==' );
+
+
+// EXPORTS //
+
+module.exports = wasm;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.js
new file mode 100644
index 000000000000..6f02393f96e5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/binary.js
@@ -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.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var readWASM = require( '@stdlib/fs/read-wasm' ).sync;
+
+
+// MAIN //
+
+var wasm = readWASM( resolve( __dirname, '..', 'src', 'main.wasm' ) );
+
+
+// EXPORTS //
+
+module.exports = wasm;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/index.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/index.js
new file mode 100644
index 000000000000..10546ab74582
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/index.js
@@ -0,0 +1,163 @@
+/**
+* @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';
+
+/**
+* WebAssembly routine to apply a plane rotation.
+*
+* @module @stdlib/blas/base/csrot-wasm
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+* var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var cy = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Perform operation:
+* csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns 5.0
+*
+* var im = imagf( v );
+* // returns ~6.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns 5.0
+*
+* im = imagf( v );
+* // returns ~5.2
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var Complex64 = require( '@stdlib/complex/float32/ctor' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+* var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var cy = new Complex64Array( [ 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] );
+*
+* // Perform operation:
+* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns 5.0
+*
+* var im = imagf( v );
+* // returns ~6.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns 5.0
+*
+* im = imagf( v );
+* // returns ~5.2
+*
+* @example
+* var Memory = require( '@stdlib/wasm/memory' );
+* var oneTo = require( '@stdlib/array/one-to' );
+* var ones = require( '@stdlib/array/ones' );
+* var zeros = require( '@stdlib/array/zeros' );
+* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+* var csrot = require( '@stdlib/blas/base/csrot-wasm' );
+*
+* // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+* var mem = new Memory({
+* 'initial': 10,
+* 'maximum': 100
+* });
+*
+* // Create a BLAS routine:
+* var mod = new csrot.Module( mem );
+* // returns
+*
+* // Initialize the routine:
+* mod.initializeSync();
+*
+* // Define a vector data type:
+* var dtype = 'complex64';
+*
+* // Specify a vector length:
+* var N = 5;
+*
+* // Define pointers (i.e., byte offsets) for storing input vectors:
+* var cxptr = 0;
+* var cyptr = N * bytesPerElement( dtype );
+*
+* // Write vector values to module memory:
+* var xbuf = oneTo( N*2, 'float32' );
+* var cx = new Complex64Array( xbuf.buffer );
+* mod.write( cxptr, cx );
+*
+* var ybuf = ones( N*2, 'float32' );
+* var cy = new Complex64Array( ybuf.buffer );
+* mod.write( cyptr, cy );
+*
+* // Perform computation:
+* mod.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+*
+* // Read out the results:
+* var viewX = zeros( N, dtype );
+* var viewY = zeros( N, dtype );
+* mod.read( cxptr, viewX );
+* mod.read( cyptr, viewY );
+*
+* console.log( reinterpretComplex64( viewY, 0 ) );
+* // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+*
+* console.log( reinterpretComplex64( viewX, 0 ) );
+* // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+*/
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var main = require( './main.js' );
+var Module = require( './module.js' );
+
+
+// MAIN //
+
+setReadOnly( main, 'Module', Module );
+
+
+// EXPORTS //
+
+module.exports = main;
+
+// exports: { "Module": "main.Module" }
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/main.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/main.js
new file mode 100644
index 000000000000..10af05d3919e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/main.js
@@ -0,0 +1,100 @@
+/**
+* @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 Routine = require( './routine.js' );
+
+
+// MAIN //
+
+/**
+* WebAssembly module to apply a plane rotation.
+*
+* @name csrot
+* @type {Routine}
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Define a strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*/
+var csrot = new Routine();
+csrot.initializeSync(); // eslint-disable-line node/no-sync
+
+
+// EXPORTS //
+
+module.exports = csrot;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/module.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/module.js
new file mode 100644
index 000000000000..733a00cc4157
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/module.js
@@ -0,0 +1,290 @@
+/**
+* @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.
+*/
+
+/* eslint-disable no-restricted-syntax, no-invalid-this */
+
+'use strict';
+
+// MODULES //
+
+var isWebAssemblyMemory = require( '@stdlib/assert/is-wasm-memory' );
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var inherits = require( '@stdlib/utils/inherit' );
+var WasmModule = require( '@stdlib/wasm/module-wrapper' );
+var format = require( '@stdlib/string/format' );
+var wasmBinary = require( './binary.js' );
+
+
+// MAIN //
+
+/**
+* BLAS routine WebAssembly module wrapper constructor.
+*
+* @constructor
+* @param {Object} memory - WebAssembly memory instance
+* @throws {TypeError} must provide a WebAssembly memory instance
+* @returns {Module} module instance
+*
+* @example
+* var Memory = require( '@stdlib/wasm/memory' );
+* var oneTo = require( '@stdlib/array/one-to' );
+* var ones = require( '@stdlib/array/ones' );
+* var zeros = require( '@stdlib/array/zeros' );
+* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+*
+* // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+* var mem = new Memory({
+* 'initial': 10,
+* 'maximum': 100
+* });
+*
+* // Create a BLAS routine:
+* var csrot = new Module( mem );
+* // returns
+*
+* // Initialize the routine:
+* csrot.initializeSync();
+*
+* // Define a vector data type:
+* var dtype = 'complex64';
+*
+* // Specify a vector length:
+* var N = 5;
+*
+* // Define pointers (i.e., byte offsets) for storing input vectors:
+* var cxptr = 0;
+* var cyptr = N * bytesPerElement( dtype );
+*
+* // Write vector values to module memory:
+* var xbuf = oneTo( N*2, 'float32' );
+* var cx = new Complex64Array( xbuf.buffer );
+* csrot.write( cxptr, cx );
+*
+* var ybuf = ones( N*2, 'float32' );
+* var cy = new Complex64Array( ybuf.buffer );
+* csrot.write( cyptr, cy );
+*
+* // Perform computation:
+* var ptr = csrot.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+* // returns
+*
+* var bool = ( ptr === cyptr );
+* // returns true
+*
+* // Read out the results:
+* var viewX = zeros( N, dtype );
+* var viewY = zeros( N, dtype );
+* csrot.read( cxptr, viewX );
+* csrot.read( cyptr, viewY );
+*
+* console.log( reinterpretComplex64( viewY, 0 ) );
+* // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+*
+* console.log( reinterpretComplex64( viewX, 0 ) );
+* // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+*/
+function Module( memory ) {
+ if ( !( this instanceof Module ) ) {
+ return new Module( memory );
+ }
+ if ( !isWebAssemblyMemory( memory ) ) {
+ throw new TypeError( format( 'invalid argument. Must provide a WebAssembly memory instance. Value: `%s`.', memory ) );
+ }
+ // Call the parent constructor:
+ WasmModule.call( this, wasmBinary, memory, {
+ 'env': {
+ 'memory': memory
+ }
+ });
+
+ return this;
+}
+
+// Inherit from the parent constructor:
+inherits( Module, WasmModule );
+
+/**
+* Applies a plane rotation.
+*
+* @name main
+* @memberof Module.prototype
+* @readonly
+* @type {Function}
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} cxptr - first input array pointer (i.e., byte offset)
+* @param {integer} strideX - `cx` stride length
+* @param {NonNegativeInteger} cyptr - second input array pointer (i.e., byte offset)
+* @param {integer} strideY - `cy` stride length
+* @param {number} c - cosine of the angle of rotation
+* @param {number} s - sine of the angle of rotation
+* @returns {NonNegativeInteger} input array pointer `cy` (i.e., byte offset)
+*
+* @example
+* var Memory = require( '@stdlib/wasm/memory' );
+* var oneTo = require( '@stdlib/array/one-to' );
+* var ones = require( '@stdlib/array/ones' );
+* var zeros = require( '@stdlib/array/zeros' );
+* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+*
+* // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+* var mem = new Memory({
+* 'initial': 10,
+* 'maximum': 100
+* });
+*
+* // Create a BLAS routine:
+* var csrot = new Module( mem );
+* // returns
+*
+* // Initialize the routine:
+* csrot.initializeSync();
+*
+* // Define a vector data type:
+* var dtype = 'complex64';
+*
+* // Specify a vector length:
+* var N = 5;
+*
+* // Define pointers (i.e., byte offsets) for storing input vectors:
+* var cxptr = 0;
+* var cyptr = N * bytesPerElement( dtype );
+*
+* // Write vector values to module memory:
+* var xbuf = oneTo( N*2, 'float32' );
+* var cx = new Complex64Array( xbuf.buffer );
+* csrot.write( cxptr, cx );
+*
+* var ybuf = ones( N*2, 'float32' );
+* var cy = new Complex64Array( ybuf.buffer );
+* csrot.write( cyptr, cy );
+*
+* // Perform computation:
+* var ptr = csrot.main( N, cxptr, 1, cyptr, 1, 0.8, 0.6 );
+* // returns
+*
+* var bool = ( ptr === cyptr );
+* // returns true
+*
+* // Read out the results:
+* var viewX = zeros( N, dtype );
+* var viewY = zeros( N, dtype );
+* csrot.read( cxptr, viewX );
+* csrot.read( cyptr, viewY );
+*
+* console.log( reinterpretComplex64( viewY, 0 ) );
+* // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+*
+* console.log( reinterpretComplex64( viewX, 0 ) );
+* // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+*/
+setReadOnly( Module.prototype, 'main', function csrot( N, cxptr, strideX, cyptr, strideY, c, s ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point
+ this._instance.exports.c_csrot( N, cxptr, strideX, cyptr, strideY, c, s );
+ return cyptr;
+});
+
+/**
+* Applies a plane rotation using alternative indexing semantics.
+*
+* @name ndarray
+* @memberof Module.prototype
+* @readonly
+* @type {Function}
+* @param {PositiveInteger} N - number of indexed elements
+* @param {NonNegativeInteger} cxptr - first input array pointer (i.e., byte offset)
+* @param {integer} strideX - `cx` stride length
+* @param {NonNegativeInteger} offsetX - starting index for `cx`
+* @param {NonNegativeInteger} cyptr - second input array pointer (i.e., byte offset)
+* @param {integer} strideY - `cy` stride length
+* @param {NonNegativeInteger} offsetY - starting index for `cy`
+* @param {number} c - cosine of the angle of rotation
+* @param {number} s - sine of the angle of rotation
+* @returns {NonNegativeInteger} input array pointer `cy` (i.e., byte offset)
+*
+* @example
+* var Memory = require( '@stdlib/wasm/memory' );
+* var oneTo = require( '@stdlib/array/one-to' );
+* var ones = require( '@stdlib/array/ones' );
+* var zeros = require( '@stdlib/array/zeros' );
+* var bytesPerElement = require( '@stdlib/ndarray/base/bytes-per-element' );
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var reinterpretComplex64 = require( '@stdlib/strided/base/reinterpret-complex64' );
+*
+* // Create a new memory instance with an initial size of 10 pages (320KiB) and a maximum size of 100 pages (6.4MiB):
+* var mem = new Memory({
+* 'initial': 10,
+* 'maximum': 100
+* });
+*
+* // Create a BLAS routine:
+* var csrot = new Module( mem );
+* // returns
+*
+* // Initialize the routine:
+* csrot.initializeSync();
+*
+* // Define a vector data type:
+* var dtype = 'complex64';
+*
+* // Specify a vector length:
+* var N = 5;
+*
+* // Define pointers (i.e., byte offsets) for storing input vectors:
+* var cxptr = 0;
+* var cyptr = N * bytesPerElement( dtype );
+*
+* // Write vector values to module memory:
+* var xbuf = oneTo( N*2, 'float32' );
+* var cx = new Complex64Array( xbuf.buffer );
+* csrot.write( cxptr, cx );
+*
+* var ybuf = ones( N*2, 'float32' );
+* var cy = new Complex64Array( ybuf.buffer );
+* csrot.write( cyptr, cy );
+*
+* // Perform computation:
+* var ptr = csrot.ndarray( N, cxptr, 1, 0, cyptr, 1, 0, 0.8, 0.6 );
+* // returns
+*
+* var bool = ( ptr === cyptr );
+* // returns true
+*
+* // Read out the results:
+* var viewX = zeros( N, dtype );
+* var viewY = zeros( N, dtype );
+* csrot.read( cxptr, viewX );
+* csrot.read( cyptr, viewY );
+*
+* console.log( reinterpretComplex64( viewY, 0 ) );
+* // => [ ~0.2, ~-0.4, -1.0, ~-1.6, ~-2.2, ~-2.8, ~-3.4, -4.0, ~-4.6, ~-5.2 ]
+*
+* console.log( reinterpretComplex64( viewX, 0 ) );
+* // => [ ~1.4, ~2.2, 3.0, ~3.8, ~4.6, ~5.4, ~6.2, 7.0, ~7.8, ~8.6 ]
+*/
+setReadOnly( Module.prototype, 'ndarray', function csrot( N, cxptr, strideX, offsetX, cyptr, strideY, offsetY, c, s ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point
+ this._instance.exports.c_csrot_ndarray( N, cxptr, strideX, offsetX, cyptr, strideY, offsetY, c, s ); // eslint-disable-line max-len
+ return cyptr;
+});
+
+
+// EXPORTS //
+
+module.exports = Module;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/routine.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/routine.js
new file mode 100644
index 000000000000..2181ac1dcf76
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/lib/routine.js
@@ -0,0 +1,268 @@
+/**
+* @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.
+*/
+
+/* eslint-disable no-restricted-syntax, no-invalid-this */
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var inherits = require( '@stdlib/utils/inherit' );
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var readDataView = require( '@stdlib/strided/base/read-dataview' ).ndarray;
+var Memory = require( '@stdlib/wasm/memory' );
+var arrays2ptrs = require( '@stdlib/wasm/base/arrays2ptrs' );
+var strided2object = require( '@stdlib/wasm/base/strided2object' );
+var Module = require( './module.js' );
+
+
+// MAIN //
+
+/**
+* Routine constructor.
+*
+* @private
+* @constructor
+* @returns {Routine} routine instance
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create a new routine:
+* var csrot = new Routine();
+*
+* // Initialize the module:
+* csrot.initializeSync();
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create a new routine:
+* var csrot = new Routine();
+*
+* // Initialize the module:
+* csrot.initializeSync();
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*/
+function Routine() {
+ if ( !( this instanceof Routine ) ) {
+ return new Routine();
+ }
+ Module.call( this, new Memory({
+ 'initial': 0
+ }));
+ return this;
+}
+
+// Inherit from the parent constructor:
+inherits( Routine, Module );
+
+/**
+* Applies a plane rotation.
+*
+* @name main
+* @memberof Routine.prototype
+* @readonly
+* @type {Function}
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex64Array} cx - first input array
+* @param {integer} strideX - `cx` stride length
+* @param {Complex64Array} cy - second input array
+* @param {integer} strideY - `cy` stride length
+* @param {number} c - cosine of the angle of rotation
+* @param {number} s - sine of the angle of rotation
+* @returns {Complex64Array} input array `cy`
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create a new routine:
+* var csrot = new Routine();
+*
+* // Initialize the module:
+* csrot.initializeSync();
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*/
+setReadOnly( Routine.prototype, 'main', function csrot( N, cx, strideX, cy, strideY, c, s ) {
+ return this.ndarray( N, cx, strideX, stride2offset( N, strideX ), cy, strideY, stride2offset( N, strideY ), c, s ); // eslint-disable-line max-len
+});
+
+/**
+* Applies a plane rotation using alternative indexing semantics.
+*
+* @name ndarray
+* @memberof Routine.prototype
+* @readonly
+* @type {Function}
+* @param {PositiveInteger} N - number of indexed elements
+* @param {Complex64Array} cx - first input array
+* @param {integer} strideX - `cx` stride length
+* @param {NonNegativeInteger} offsetX - starting index for `cx`
+* @param {Complex64Array} cy - second input array
+* @param {integer} strideY - `cy` stride length
+* @param {NonNegativeInteger} offsetY - starting index for `cy`
+* @param {number} c - cosine of the angle of rotation
+* @param {number} s - sine of the angle of rotation
+* @returns {Complex64Array} input array `cy`
+*
+* @example
+* var Complex64Array = require( '@stdlib/array/complex64' );
+* var realf = require( '@stdlib/complex/float32/real' );
+* var imagf = require( '@stdlib/complex/float32/imag' );
+*
+* // Create a new routine:
+* var csrot = new Routine();
+*
+* // Initialize the module:
+* csrot.initializeSync();
+*
+* // Define strided arrays...
+* var cx = new Complex64Array( [ -1.0, -2.0, -3.0, -4.0, -5.0, -6.0 ] );
+* var cy = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+*
+* // Perform operation:
+* csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+*
+* var v = cx.get( 0 );
+* // returns
+*
+* var re = realf( v );
+* // returns ~-0.2
+*
+* var im = imagf( v );
+* // returns ~-0.4
+*
+* v = cy.get( 0 );
+* // returns
+*
+* re = realf( v );
+* // returns ~1.4
+*
+* im = imagf( v );
+* // returns ~2.8
+*/
+setReadOnly( Routine.prototype, 'ndarray', function csrot( N, cx, strideX, offsetX, cy, strideY, offsetY, c, s ) {
+ var ptrs;
+ var p0;
+ var p1;
+
+ // Convert the input arrays to "pointers" in the module's memory:
+ ptrs = arrays2ptrs( this, [
+ strided2object( N, cx, strideX, offsetX ),
+ strided2object( N, cy, strideY, offsetY )
+ ]);
+ p0 = ptrs[0];
+ p1 = ptrs[1];
+
+ // Perform computation by calling the corresponding parent method:
+ Module.prototype.ndarray.call( this, N, p0.ptr, p0.stride, p0.offset, p1.ptr, p1.stride, p1.offset, c, s ); // eslint-disable-line max-len
+
+ // If input array data had to be copied to module memory, copy the results to the provided arrays...
+ if ( p0.copy ) {
+ readDataView( N, this.view, p0.stride*p0.BYTES_PER_ELEMENT, p0.ptr, cx, strideX, offsetX, true ); // eslint-disable-line max-len
+ }
+ if ( p1.copy ) {
+ readDataView( N, this.view, p1.stride*p1.BYTES_PER_ELEMENT, p1.ptr, cy, strideY, offsetY, true ); // eslint-disable-line max-len
+ }
+ return cy;
+});
+
+
+// EXPORTS //
+
+module.exports = Routine;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/manifest.json b/lib/node_modules/@stdlib/blas/base/csrot-wasm/manifest.json
new file mode 100644
index 000000000000..15d96b63c0e9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/manifest.json
@@ -0,0 +1,36 @@
+{
+ "options": {},
+ "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": [
+ {
+ "src": [],
+ "include": [],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/csrot"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/package.json b/lib/node_modules/@stdlib/blas/base/csrot-wasm/package.json
new file mode 100644
index 000000000000..46ef1cb3b6b3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/package.json
@@ -0,0 +1,84 @@
+{
+ "name": "@stdlib/blas/base/csrot-wasm",
+ "version": "0.0.0",
+ "description": "Apply a plane rotation.",
+ "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/binary.js": "./lib/binary.browser.js"
+ },
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "scripts": "./scripts",
+ "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",
+ "csrot",
+ "rotation",
+ "vector",
+ "typed",
+ "array",
+ "ndarray",
+ "complex",
+ "complex64",
+ "float",
+ "float32",
+ "single",
+ "float32array",
+ "webassembly",
+ "wasm"
+ ],
+ "__stdlib__": {
+ "wasm": true
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/build.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/build.js
new file mode 100644
index 000000000000..348354d7029c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/build.js
@@ -0,0 +1,63 @@
+#!/usr/bin/env node
+
+/**
+* @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 readFile = require( '@stdlib/fs/read-file' ).sync;
+var writeFile = require( '@stdlib/fs/write-file' ).sync;
+var replace = require( '@stdlib/string/replace' );
+
+
+// VARIABLES //
+
+var wpath = resolve( __dirname, '..', 'src', 'main.wasm' );
+var tpath = resolve( __dirname, 'template.txt' );
+var opath = resolve( __dirname, '..', 'lib', 'binary.browser.js' );
+
+var opts = {
+ 'encoding': 'utf8'
+};
+
+var PLACEHOLDER = '{{WASM_BASE64}}';
+
+
+// MAIN //
+
+/**
+* Main execution sequence.
+*
+* @private
+*/
+function main() {
+ var wasm;
+ var tmpl;
+
+ wasm = readFile( wpath );
+ tmpl = readFile( tpath, opts );
+
+ tmpl = replace( tmpl, PLACEHOLDER, wasm.toString( 'base64' ) );
+
+ writeFile( opath, tmpl, opts );
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/template.txt b/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/template.txt
new file mode 100644
index 000000000000..12996dd89e3b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/scripts/template.txt
@@ -0,0 +1,33 @@
+/**
+* @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 base64ToUint8Array = require( '@stdlib/string/base/base64-to-uint8array' );
+
+
+// MAIN //
+
+var wasm = base64ToUint8Array( '{{WASM_BASE64}}' );
+
+
+// EXPORTS //
+
+module.exports = wasm;
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/Makefile b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/Makefile
new file mode 100644
index 000000000000..87bc9420e487
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/Makefile
@@ -0,0 +1,235 @@
+#/
+# @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.
+#/
+
+#/
+# To compile targets listed in this Makefile, use top-level project `make`
+# commands rather than commands listed in this Makefile. The top-level project
+# `make` commands will ensure that various environment variables and flags are
+# appropriately set.
+#/
+
+# 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 to WebAssembly:
+ifdef EMCC_COMPILER
+ EMCC := $(EMCC_COMPILER)
+else
+ EMCC := emcc
+endif
+
+# Define the program used for compiling WebAssembly files to the WebAssembly text format:
+ifdef WASM2WAT
+ WASM_TO_WAT := $(WASM2WAT)
+else
+ WASM_TO_WAT := wasm2wat
+endif
+
+# Define the program used for compiling WebAssembly files to JavaScript:
+ifdef WASM2JS
+ WASM_TO_JS := $(WASM2JS)
+else
+ WASM_TO_JS := wasm2js
+endif
+
+# Define the path to the Node.js executable:
+ifdef NODE
+ NODEJS := $(NODE)
+else
+ NODEJS := node
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -flto \
+ -Wall \
+ -pedantic \
+ -D CBLAS_INT=int32_t
+
+# Define the command-line options when compiling C files to WebAssembly and asm.js:
+EMCCFLAGS ?= $(CFLAGS)
+
+# Define shared `emcc` flags:
+EMCC_SHARED_FLAGS := \
+ -fwasm-exceptions \
+ -s SUPPORT_LONGJMP=1 \
+ -s SIDE_MODULE=2 \
+ -s EXPORTED_FUNCTIONS="$(shell cat exports.json | tr -d ' \t\n' | sed s/\"/\'/g)"
+
+# Define WebAssembly `emcc` flags:
+EMCC_WASM_FLAGS := $(EMCC_SHARED_FLAGS) \
+ -s WASM=1 \
+ -s WASM_BIGINT=0
+
+# 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 WebAssembly targets:
+wasm_targets := main.wasm
+
+# List of WebAssembly WAT targets:
+wat_targets := main.wat
+
+# List of WebAssembly JavaScript targets:
+wasm_js_targets := main.wasm.js
+
+# List of other JavaScript targets:
+browser_js_targets := ./../lib/binary.browser.js
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [EMCC_COMPILER] - EMCC compiler (e.g., `emcc`)
+# @param {string} [EMCCFLAGS] - EMCC compiler options
+# @param {string} [WASM2WAT] - WebAssembly text format compiler (e.g., `wasm2wat`)
+# @param {string} [WASM2JS] - WebAssembly JavaScript compiler (e.g., `wasm2js`)
+# @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: wasm
+
+.PHONY: all
+
+#/
+# Compiles source files to WebAssembly.
+#
+# @param {string} [EMCC_COMPILER] - EMCC compiler (e.g., `emcc`)
+# @param {string} [EMCCFLAGS] - EMCC compiler options
+# @param {string} [WASM2WAT] - WebAssembly text format compiler (e.g., `wasm2wat`)
+# @param {string} [WASM2JS] - WebAssembly JavaScript compiler (e.g., `wasm2js`)
+# @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 wasm
+#/
+wasm: $(wasm_targets) $(wat_targets) $(browser_js_targets)
+
+.PHONY: wasm
+
+#/
+# Compiles C source files to WebAssembly binaries.
+#
+# @private
+# @param {string} EMCC - EMCC compiler (e.g., `emcc`)
+# @param {string} EMCCFLAGS - EMCC compiler options
+# @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`)
+#/
+$(wasm_targets):
+ $(QUIET) $(EMCC) $(EMCCFLAGS) $(EMCC_WASM_FLAGS) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) $(LIBRARIES)
+
+#/
+# Compiles WebAssembly binary files to the WebAssembly text format.
+#
+# @private
+# @param {string} WASM2WAT - WAT compiler (e.g., `wasm2wat`)
+#/
+$(wat_targets): %.wat: %.wasm
+ $(QUIET) $(WASM_TO_WAT) -o $@ $(wasm_targets)
+
+#/
+# Compiles WebAssembly binary files to JavaScript.
+#
+# @private
+# @param {string} WASM2JS - JavaScript compiler (e.g., `wasm2js`)
+#/
+$(wasm_js_targets): %.wasm.js: %.wasm
+ $(QUIET) $(WASM_TO_JS) -o $@ $(wasm_targets)
+
+#/
+# Generates an inline WebAssembly build for use in bundlers.
+#
+# @private
+# @param {string} NODE - Node.js executable
+#/
+$(browser_js_targets): $(wasm_targets)
+ $(QUIET) $(NODEJS) ./../scripts/build.js
+
+#/
+# Removes generated WebAssembly files.
+#
+# @example
+# make clean-wasm
+#/
+clean-wasm:
+ $(QUIET) -rm -f *.wasm *.wat *.wasm.js $(browser_js_targets)
+
+.PHONY: clean-wasm
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean: clean-wasm
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/exports.json b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/exports.json
new file mode 100644
index 000000000000..62cd95eb0e0a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/exports.json
@@ -0,0 +1,4 @@
+[
+ "_c_csrot",
+ "_c_csrot_ndarray"
+]
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wasm b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wasm
new file mode 100755
index 000000000000..a7cb43e91685
Binary files /dev/null and b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wasm differ
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wat b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wat
new file mode 100644
index 000000000000..f2419f930867
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/src/main.wat
@@ -0,0 +1,232 @@
+;; @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.
+
+(module
+ (type (;0;) (func))
+ (type (;1;) (func (param i32 i32 i32 i32 i32 f32 f32)))
+ (type (;2;) (func (param i32 i32 i32 i32 i32 i32 i32 f32 f32)))
+ (import "env" "memory" (memory (;0;) 0))
+ (func (;0;) (type 0)
+ nop)
+ (func (;1;) (type 1) (param i32 i32 i32 i32 i32 f32 f32)
+ (local i32 i32 i32 i32 i32 f32 f32)
+ local.get 0
+ i32.const 0
+ i32.gt_s
+ if ;; label = @1
+ i32.const 1
+ local.get 0
+ i32.sub
+ local.tee 7
+ local.get 4
+ i32.mul
+ i32.const 1
+ i32.shl
+ i32.const 0
+ local.get 4
+ i32.const 0
+ i32.le_s
+ select
+ local.set 8
+ local.get 2
+ local.get 7
+ i32.mul
+ i32.const 1
+ i32.shl
+ i32.const 0
+ local.get 2
+ i32.const 0
+ i32.le_s
+ select
+ local.set 7
+ local.get 4
+ i32.const 1
+ i32.shl
+ local.set 10
+ local.get 2
+ i32.const 1
+ i32.shl
+ local.set 11
+ loop ;; label = @2
+ local.get 3
+ local.get 8
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee 2
+ local.get 5
+ local.get 2
+ f32.load
+ local.tee 12
+ f32.mul
+ local.get 6
+ local.get 1
+ local.get 7
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee 4
+ f32.load
+ local.tee 13
+ f32.mul
+ f32.sub
+ f32.store
+ local.get 4
+ local.get 5
+ local.get 13
+ f32.mul
+ local.get 6
+ local.get 12
+ f32.mul
+ f32.add
+ f32.store
+ local.get 2
+ local.get 5
+ local.get 2
+ f32.load offset=4
+ local.tee 12
+ f32.mul
+ local.get 6
+ local.get 4
+ f32.load offset=4
+ local.tee 13
+ f32.mul
+ f32.sub
+ f32.store offset=4
+ local.get 4
+ local.get 5
+ local.get 13
+ f32.mul
+ local.get 6
+ local.get 12
+ f32.mul
+ f32.add
+ f32.store offset=4
+ local.get 8
+ local.get 10
+ i32.add
+ local.set 8
+ local.get 7
+ local.get 11
+ i32.add
+ local.set 7
+ local.get 9
+ i32.const 1
+ i32.add
+ local.tee 9
+ local.get 0
+ i32.ne
+ br_if 0 (;@2;)
+ end
+ end)
+ (func (;2;) (type 2) (param i32 i32 i32 i32 i32 i32 i32 f32 f32)
+ (local f32 f32 i32 i32 i32)
+ local.get 0
+ i32.const 0
+ i32.gt_s
+ if ;; label = @1
+ local.get 6
+ i32.const 1
+ i32.shl
+ local.set 6
+ local.get 3
+ i32.const 1
+ i32.shl
+ local.set 3
+ local.get 5
+ i32.const 1
+ i32.shl
+ local.set 12
+ local.get 2
+ i32.const 1
+ i32.shl
+ local.set 13
+ loop ;; label = @2
+ local.get 4
+ local.get 6
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee 2
+ local.get 7
+ local.get 2
+ f32.load
+ local.tee 9
+ f32.mul
+ local.get 8
+ local.get 1
+ local.get 3
+ i32.const 2
+ i32.shl
+ i32.add
+ local.tee 5
+ f32.load
+ local.tee 10
+ f32.mul
+ f32.sub
+ f32.store
+ local.get 5
+ local.get 7
+ local.get 10
+ f32.mul
+ local.get 8
+ local.get 9
+ f32.mul
+ f32.add
+ f32.store
+ local.get 2
+ local.get 7
+ local.get 2
+ f32.load offset=4
+ local.tee 9
+ f32.mul
+ local.get 8
+ local.get 5
+ f32.load offset=4
+ local.tee 10
+ f32.mul
+ f32.sub
+ f32.store offset=4
+ local.get 5
+ local.get 7
+ local.get 10
+ f32.mul
+ local.get 8
+ local.get 9
+ f32.mul
+ f32.add
+ f32.store offset=4
+ local.get 6
+ local.get 12
+ i32.add
+ local.set 6
+ local.get 3
+ local.get 13
+ i32.add
+ local.set 3
+ local.get 11
+ i32.const 1
+ i32.add
+ local.tee 11
+ local.get 0
+ i32.ne
+ br_if 0 (;@2;)
+ end
+ end)
+ (export "__wasm_call_ctors" (func 0))
+ (export "__wasm_apply_data_relocs" (func 0))
+ (export "c_csrot" (func 1))
+ (export "c_csrot_ndarray" (func 2)))
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.js
new file mode 100644
index 000000000000..10eebfc3f85b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.js
@@ -0,0 +1,53 @@
+/**
+* @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 csrot = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is an object', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof csrot, 'object', 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to the main export is a `main` method', function test( t ) {
+ t.strictEqual( typeof csrot.main, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to the main export is an `ndarray` method', function test( t ) {
+ t.strictEqual( typeof csrot.ndarray, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to the main export is a `Module` constructor', function test( t ) {
+ t.strictEqual( typeof csrot.Module, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'the main export is a `Module` instance', function test( t ) {
+ t.strictEqual( csrot instanceof csrot.Module, true, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.main.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.main.js
new file mode 100644
index 000000000000..5794ee10638c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.main.js
@@ -0,0 +1,486 @@
+/**
+* @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 Float32Array = require( '@stdlib/array/float32' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var csrot = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof csrot.main, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the `main` method has an arity of 7', function test( t ) {
+ t.strictEqual( csrot.main.length, 7, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method applies a plane rotation', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0, // 3
+ 6.0, // 3
+ 7.0, // 4
+ 8.0 // 4
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.0, // 3
+ 0.0, // 4
+ 0.0 // 4
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 4.0, // 3
+ 4.8, // 3
+ 5.6, // 4
+ 6.4 // 4
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -1.8, // 2
+ -2.4, // 2
+ -3.0, // 3
+ -3.6, // 3
+ -4.2, // 4
+ -4.8 // 4
+ ] );
+
+ out = csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method supports an `x` stride', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -3.0, // 2
+ -3.6, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.main( 2, cx, 2, cy, 1, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method supports a `y` stride', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ -1.8, // 2
+ -2.4, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.main( 2, cx, 1, cy, 2, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method returns a reference to the destination array', function test( t ) {
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ out = csrot.main( cx.length, cx, 1, cy, 1, 0.8, 0.6 );
+
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the `main` method returns both vectors unchanged', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ csrot.main( -1, cx, 1, cy, 1, 0.8, 0.6 );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ csrot.main( 0, cx, 1, cy, 1, 0.8, 0.6 );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the `main` method supports negative strides', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 2
+ 2.0, // 2
+ 3.0, // 1
+ 4.0, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 2
+ 1.6, // 2
+ 2.4, // 1
+ 3.2, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 2
+ -1.2, // 2
+ 0.0,
+ 0.0,
+ -1.8, // 1
+ -2.4, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.main( 2, cx, -1, cy, -2, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method supports complex access patterns', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -3.0, // 2
+ -3.6, // 2
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.main( 2, cx, 2, cy, -1, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `main` method supports view offsets', function test( t ) {
+ var viewX;
+ var viewY;
+ var cx0;
+ var cy0;
+ var cx1;
+ var cy1;
+ var cxe;
+ var cye;
+ var out;
+
+ // Initial arrays...
+ cx0 = new Complex64Array([
+ 1.0,
+ 2.0,
+ 3.0, // 2
+ 4.0, // 2
+ 5.0,
+ 6.0,
+ 7.0, // 1
+ 8.0 // 1
+ ]);
+ cy0 = new Complex64Array([
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0 // 2
+ ]);
+
+ // Create offset views...
+ cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // begin at the 2nd element
+ cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // begin at the 3rd element
+
+ viewX = new Float32Array( cx0.buffer );
+ viewY = new Float32Array( cy0.buffer );
+
+ cxe = new Float32Array( [
+ 1.0,
+ 2.0,
+ 2.4, // 2
+ 3.2, // 2
+ 5.0,
+ 6.0,
+ 5.6, // 1
+ 6.4 // 1
+ ] );
+ cye = new Float32Array( [
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ -4.2, // 1
+ -4.8, // 1
+ -1.8, // 2
+ -2.4 // 2
+ ] );
+
+ out = csrot.main( 2, cx1, -2, cy1, 1, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy1, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.js
new file mode 100644
index 000000000000..9adcb07e22fa
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.js
@@ -0,0 +1,154 @@
+/**
+* @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 Memory = require( '@stdlib/wasm/memory' );
+var ModuleWrapper = require( '@stdlib/wasm/module-wrapper' );
+var Module = require( './../lib' ).Module;
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof Module, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function is a constructor', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+ t.strictEqual( mod instanceof Module, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function is a constructor which does not require `new`', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = Module( mem ); // eslint-disable-line new-cap
+ t.strictEqual( mod instanceof Module, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the module constructor throws an error if provided a first argument which is not a WebAssembly memory instance (new)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ return new Module( value );
+ };
+ }
+});
+
+tape( 'the module constructor throws an error if provided a first argument which is not a WebAssembly memory instance (no new)', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ 5,
+ NaN,
+ true,
+ false,
+ null,
+ void 0,
+ [],
+ {},
+ function noop() {}
+ ];
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ return Module( value ); // eslint-disable-line new-cap
+ };
+ }
+});
+
+tape( 'the module instance returned by the module constructor inherits from a module wrapper', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+
+ t.strictEqual( mod instanceof ModuleWrapper, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to a module instance is a `main` method', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+
+ t.strictEqual( typeof mod.main, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to a module instance is an `ndarray` method', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+
+ t.strictEqual( typeof mod.ndarray, 'function', 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.main.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.main.js
new file mode 100644
index 000000000000..64a3fade460b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.main.js
@@ -0,0 +1,546 @@
+/**
+* @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.
+*/
+
+/* eslint-disable node/no-sync */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Memory = require( '@stdlib/wasm/memory' );
+var Float32Array = require( '@stdlib/array/float32' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var Module = require( './../lib' ).Module;
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof Module, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which has an arity of 7', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+ t.strictEqual( mod.main.length, 7, 'returns expected value' );
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which applies a plane rotation', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ mod.write( cxp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( cyp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ cxe = new Float32Array( [ 0.8, 1.6, 2.4, 3.2, 4.0, 4.8, 5.6, 6.4 ] );
+ cye = new Float32Array( [ -0.6, -1.2, -1.8, -2.4, -3.0, -3.6, -4.2, -4.8 ] ); // eslint-disable-line max-len
+
+ mod.main( 4, cxp, 1, cyp, 1, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which supports an `x` stride', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -3.0, // 2
+ -3.6, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ mod.main( 2, cxp, 2, cyp, 1, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which supports a `y` stride', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ -1.8, // 2
+ -2.4, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ mod.main( 2, cxp, 1, cyp, 2, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which returns a reference to the output array', function test( t ) {
+ var mem;
+ var mod;
+ var out;
+ var xp;
+ var yp;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ xp = 0;
+ yp = 32;
+
+ mod.write( xp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( yp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ out = mod.main( 4, xp, 1, yp, 1, 0.8, 0.6 );
+ t.strictEqual( out, yp, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, a module instance has a `main` method which leaves the output array unchanged', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var cxe;
+ var cxp;
+ var cye;
+ var cyp;
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ mod.write( cxp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( cyp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ mod.main( -1, cxp, 1, cyp, 1, 0.8, 0.6 );
+ actualX = new Complex64Array( 4 );
+ actualY = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ mod.read( cyp, actualY );
+ viewX = new Float32Array( actualX.buffer );
+ viewY = new Float32Array( actualY.buffer );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ mod.main( 0, cxp, 1, cyp, 1, 0.8, 0.6 );
+ actualX = new Complex64Array( 4 );
+ actualY = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ mod.read( cyp, actualY );
+ viewX = new Float32Array( actualX.buffer );
+ viewY = new Float32Array( actualY.buffer );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which supports negative strides', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 2
+ 2.0, // 2
+ 3.0, // 1
+ 4.0, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 2
+ 1.6, // 2
+ 2.4, // 1
+ 3.2, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 2
+ -1.2, // 2
+ 0.0,
+ 0.0,
+ -1.8, // 1
+ -2.4, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ mod.main( 2, cxp, -1, cyp, -2, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has a `main` method which supports complex access patterns', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -3.0, // 2
+ -3.6, // 2
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ mod.main( 2, cxp, 2, cyp, -1, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.ndarray.js
new file mode 100644
index 000000000000..2665421612cc
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.module.ndarray.js
@@ -0,0 +1,720 @@
+/**
+* @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.
+*/
+
+/* eslint-disable node/no-sync */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Memory = require( '@stdlib/wasm/memory' );
+var Float32Array = require( '@stdlib/array/float32' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var Module = require( './../lib' ).Module;
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof Module, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which has an arity of 9', function test( t ) {
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 0
+ });
+ mod = new Module( mem );
+ t.strictEqual( mod.ndarray.length, 9, 'returns expected value' );
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which applies a plane rotation', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ mod.write( cxp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( cyp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ cxe = new Float32Array( [ 0.8, 1.6, 2.4, 3.2, 4.0, 4.8, 5.6, 6.4 ] );
+ cye = new Float32Array( [ -0.6, -1.2, -1.8, -2.4, -3.0, -3.6, -4.2, -4.8 ] ); // eslint-disable-line max-len
+
+ mod.ndarray( 4, cxp, 1, 0, cyp, 1, 0, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports an `x` stride', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -3.0, // 2
+ -3.6, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 2, cxp, 2, 0, cyp, 1, 0, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports an `x` offset', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0 // 3
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.0, // 3
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 1.0,
+ 2.0,
+ 2.4, // 1
+ 3.2, // 1
+ 4.0, // 2
+ 4.8, // 2
+ 5.6, // 3
+ 6.4 // 3
+ ] );
+ cye = new Float32Array( [
+ -1.8, // 1
+ -2.4, // 1
+ -3.0, // 2
+ -3.6, // 2
+ -4.2, // 3
+ -4.8, // 3
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 3, cxp, 1, 1, cyp, 1, 0, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports a `y` stride', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ -1.8, // 2
+ -2.4, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 2, cxp, 1, 0, cyp, 2, 0, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports a `y` offset', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -3.0, // 2
+ -3.6, // 2
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 2, cxp, 2, 0, cyp, -1, 1, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which returns a reference to the output array', function test( t ) {
+ var mem;
+ var mod;
+ var out;
+ var xp;
+ var yp;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ xp = 0;
+ yp = 32;
+
+ mod.write( xp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( yp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ out = mod.ndarray( 4, xp, 1, 0, yp, 1, 0, 0.8, 0.6 );
+ t.strictEqual( out, yp, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, a module instance has an `ndarray` method which leaves the output array unchanged', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var cxe;
+ var cxp;
+ var cye;
+ var cyp;
+ var mem;
+ var mod;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ mod.write( cxp, new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ) ); // eslint-disable-line max-len
+ mod.write( cyp, new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ) ); // eslint-disable-line max-len
+
+ cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ mod.ndarray( -1, cxp, 1, 0, cyp, 1, 0, 0.8, 0.6 );
+ actualX = new Complex64Array( 4 );
+ actualY = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ mod.read( cyp, actualY );
+ viewX = new Float32Array( actualX.buffer );
+ viewY = new Float32Array( actualY.buffer );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ mod.ndarray( 0, cxp, 1, 0, cyp, 1, 0, 0.8, 0.6 );
+ actualX = new Complex64Array( 4 );
+ actualY = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ mod.read( cyp, actualY );
+ viewX = new Float32Array( actualX.buffer );
+ viewY = new Float32Array( actualY.buffer );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports negative strides', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 2
+ 2.0, // 2
+ 3.0, // 1
+ 4.0, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 2
+ 1.6, // 2
+ 2.4, // 1
+ 3.2, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 2
+ -1.2, // 2
+ 0.0,
+ 0.0,
+ -1.8, // 1
+ -2.4, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 2, cxp, -1, 1, cyp, -2, 2, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
+
+tape( 'a module instance has an `ndarray` method which supports complex access patterns', function test( t ) {
+ var actualX;
+ var actualY;
+ var viewX;
+ var viewY;
+ var xbuf;
+ var ybuf;
+ var cxe;
+ var cye;
+ var cxp;
+ var cyp;
+ var mem;
+ var mod;
+ var cx;
+ var cy;
+
+ mem = new Memory({
+ 'initial': 1
+ });
+ mod = new Module( mem );
+ mod.initializeSync();
+
+ cxp = 0;
+ cyp = 32;
+
+ xbuf = new Float32Array([
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ]);
+ ybuf = new Float32Array([
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ]);
+ cx = new Complex64Array( xbuf.buffer );
+ cy = new Complex64Array( ybuf.buffer );
+
+ mod.write( cxp, cx );
+ mod.write( cyp, cy );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -3.0, // 2
+ -3.6, // 2
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ mod.ndarray( 2, cxp, 2, 0, cyp, -1, 1, 0.8, 0.6 );
+
+ actualX = new Complex64Array( 4 );
+ mod.read( cxp, actualX );
+ viewX = new Float32Array( actualX.buffer );
+ isApprox( t, viewX, cxe, 2.0 );
+
+ actualY = new Complex64Array( 4 );
+ mod.read( cyp, actualY );
+ viewY = new Float32Array( actualY.buffer );
+ isApprox( t, viewY, cye, 2.0 );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.ndarray.js
new file mode 100644
index 000000000000..7b11a4abba64
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.ndarray.js
@@ -0,0 +1,540 @@
+/**
+* @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 Float32Array = require( '@stdlib/array/float32' );
+var Complex64Array = require( '@stdlib/array/complex64' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var csrot = require( './../lib' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof csrot.ndarray, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the `ndarray` method has an arity of 9', function test( t ) {
+ t.strictEqual( csrot.ndarray.length, 9, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method applies a plane rotation', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0, // 3
+ 6.0, // 3
+ 7.0, // 4
+ 8.0 // 4
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.0, // 3
+ 0.0, // 4
+ 0.0 // 4
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 4.0, // 3
+ 4.8, // 3
+ 5.6, // 4
+ 6.4 // 4
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -1.8, // 2
+ -2.4, // 2
+ -3.0, // 3
+ -3.6, // 3
+ -4.2, // 4
+ -4.8 // 4
+ ] );
+
+ out = csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method supports an `x` stride', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ -3.0, // 2
+ -3.6, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.ndarray( 2, cx, 2, 0, cy, 1, 0, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method supports an `x` offset', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0,
+ 2.0,
+ 3.0, // 1
+ 4.0, // 1
+ 5.0, // 2
+ 6.0, // 2
+ 7.0, // 3
+ 8.0 // 3
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 3
+ 0.0, // 3
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 1.0,
+ 2.0,
+ 2.4, // 1
+ 3.2, // 1
+ 4.0, // 2
+ 4.8, // 2
+ 5.6, // 3
+ 6.4 // 3
+ ] );
+ cye = new Float32Array( [
+ -1.8, // 1
+ -2.4, // 1
+ -3.0, // 2
+ -3.6, // 2
+ -4.2, // 3
+ -4.8, // 3
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.ndarray( 3, cx, 1, 1, cy, 1, 0, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method supports a `y` stride', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0, // 2
+ 4.0, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 2.4, // 2
+ 3.2, // 2
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ -1.8, // 2
+ -2.4, // 2
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.ndarray( 2, cx, 1, 0, cy, 2, 0, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method supports a `y` offset', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 2
+ 0.0, // 2
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 1
+ 1.6, // 1
+ 3.0,
+ 4.0,
+ 4.0, // 2
+ 4.8, // 2
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -3.0, // 2
+ -3.6, // 2
+ -0.6, // 1
+ -1.2, // 1
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.ndarray( 2, cx, 2, 0, cy, -1, 1, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method returns a reference to the destination array', function test( t ) {
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ out = csrot.ndarray( cx.length, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if provided an `N` parameter less than or equal to `0`, the `ndarray` method returns both vectors unchanged', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cy = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
+ cye = new Float32Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] );
+
+ csrot.ndarray( -1, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ csrot.ndarray( 0, cx, 1, 0, cy, 1, 0, 0.8, 0.6 );
+ t.deepEqual( viewX, cxe, 'returns expected value' );
+ t.deepEqual( viewY, cye, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the `ndarray` method supports negative strides', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 2
+ 2.0, // 2
+ 3.0, // 1
+ 4.0, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0, // 1
+ 0.0, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 0.8, // 2
+ 1.6, // 2
+ 2.4, // 1
+ 3.2, // 1
+ 5.0,
+ 6.0,
+ 7.0,
+ 8.0
+ ] );
+ cye = new Float32Array( [
+ -0.6, // 2
+ -1.2, // 2
+ 0.0,
+ 0.0,
+ -1.8, // 1
+ -2.4, // 1
+ 0.0,
+ 0.0
+ ] );
+
+ out = csrot.ndarray( 2, cx, -1, 1, cy, -2, 2, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the `ndarray` method supports complex access patterns', function test( t ) {
+ var viewX;
+ var viewY;
+ var cxe;
+ var cye;
+ var out;
+ var cx;
+ var cy;
+
+ cx = new Complex64Array( [
+ 1.0, // 1
+ 2.0, // 1
+ 3.0,
+ 4.0,
+ 5.0, // 2
+ 6.0, // 2
+ 7.0,
+ 8.0
+ ] );
+ cy = new Complex64Array( [
+ 0.0, // 1
+ 0.0, // 1
+ 0.0, // 2
+ 0.0, // 2
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0
+ ] );
+
+ viewX = new Float32Array( cx.buffer );
+ viewY = new Float32Array( cy.buffer );
+
+ cxe = new Float32Array( [
+ 1.0,
+ 2.0,
+ 2.4, // 1
+ 3.2, // 1
+ 5.0,
+ 6.0,
+ 5.6, // 2
+ 6.4 // 2
+ ] );
+ cye = new Float32Array( [
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ -1.8, // 1
+ -2.4, // 1
+ -4.2, // 2
+ -4.8 // 2
+ ] );
+
+ out = csrot.ndarray( 2, cx, 2, 1, cy, 1, 2, 0.8, 0.6 );
+ isApprox( t, viewX, cxe, 2.0 );
+ isApprox( t, viewY, cye, 2.0 );
+ t.strictEqual( out, cy, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.routine.js b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.routine.js
new file mode 100644
index 000000000000..56a4b67daaf0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/csrot-wasm/test/test.routine.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 tape = require( 'tape' );
+var ModuleWrapper = require( '@stdlib/wasm/module-wrapper' );
+var Module = require( './../lib/module.js' );
+var Routine = require( './../lib/routine.js' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof Routine, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function is a constructor', function test( t ) {
+ var mod = new Routine();
+ t.strictEqual( mod instanceof Routine, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function is a constructor which does not require `new`', function test( t ) {
+ var mod = Routine(); // eslint-disable-line new-cap
+ t.strictEqual( mod instanceof Routine, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the module instance returned by the constructor inherits from a module wrapper', function test( t ) {
+ var mod = new Routine();
+ t.strictEqual( mod instanceof ModuleWrapper, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the module instance returned by the constructor inherits from a BLAS routine module', function test( t ) {
+ var mod = new Routine();
+ t.strictEqual( mod instanceof Module, true, 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to a module instance is a `main` method', function test( t ) {
+ var mod = new Routine();
+ t.strictEqual( typeof mod.main, 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'attached to a module instance is an `ndarray` method', function test( t ) {
+ var mod = new Routine();
+ t.strictEqual( typeof mod.ndarray, 'function', 'returns expected value' );
+ t.end();
+});