diff --git a/lib/node_modules/@stdlib/blas/base/sger/README.md b/lib/node_modules/@stdlib/blas/base/sger/README.md
new file mode 100644
index 000000000000..a442ef9f5014
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/README.md
@@ -0,0 +1,379 @@
+
+
+# sger
+
+> Perform the rank 1 operation `A = α*x*y^T + A`.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var sger = require( '@stdlib/blas/base/sger' );
+```
+
+#### sger( order, M, N, α, x, sx, y, sy, A, lda )
+
+Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+var x = new Float32Array( [ 1.0, 1.0 ] );
+var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+
+sger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 );
+// A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+```
+
+The function has the following parameters:
+
+- **order**: storage layout.
+- **M**: number of rows in the matrix `A`.
+- **N**: number of columns in the matrix `A`.
+- **α**: scalar constant.
+- **x**: an `M` element [`Float32Array`][mdn-float32array].
+- **sx**: stride length for `x`.
+- **y**: an `N` element [`Float32Array`][mdn-float32array].
+- **sy**: stride length for `y`.
+- **A**: input matrix stored in linear memory as a [`Float32Array`][mdn-float32array].
+- **lda**: stride of the first dimension of `A` (leading dimension of `A`).
+
+The stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to iterate over every other element in `x` and `y`,
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var A = new Float32Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] );
+var x = new Float32Array( [ 1.0, 0.0, 1.0, 0.0 ] );
+var y = new Float32Array( [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ] );
+
+sger( 'column-major', 2, 3, 1.0, x, 2, y, 2, A, 2 );
+// A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+```
+
+Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
+
+
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+// Initial arrays...
+var x0 = new Float32Array( [ 0.0, 1.0, 1.0 ] );
+var y0 = new Float32Array( [ 0.0, 1.0, 1.0, 1.0 ] );
+var A = new Float32Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] );
+
+// Create offset views...
+var x1 = new Float32Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+var y1 = new Float32Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
+
+sger( 'column-major', 2, 3, 1.0, x1, -1, y1, -1, A, 2 );
+// A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+```
+
+#### sger.ndarray( M, N, α, x, sx, ox, y, sy, oy, A, sa1, sa2, oa )
+
+Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+var x = new Float32Array( [ 1.0, 1.0 ] );
+var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+
+sger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 );
+// A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+```
+
+The function has the following additional parameters:
+
+- **sa1**: stride of the first dimension of `A`.
+- **sa2**: stride of the second dimension of `A`.
+- **oa**: starting index for `A`.
+- **ox**: starting index for `x`.
+- **oy**: starting index for `y`.
+
+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,
+
+```javascript
+var Float32Array = require( '@stdlib/array/float32' );
+
+var A = new Float32Array( [ 0.0, 0.0, 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] );
+var x = new Float32Array( [ 0.0, 1.0, 0.0, 1.0, 0.0 ] );
+var y = new Float32Array( [ 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ] );
+
+sger.ndarray( 2, 3, 1.0, x, 2, 1, y, 2, 1, A, 1, 2, 2 );
+// A => [ 0.0, 0.0, 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+```
+
+
+
+
+
+
+
+## Notes
+
+- `sger()` corresponds to the [BLAS][blas] level 2 function [`sger`][blas-sger].
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var sger = require( '@stdlib/blas/base/sger' );
+
+var opts = {
+ 'dtype': 'float32'
+};
+
+var M = 3;
+var N = 5;
+
+var A = discreteUniform( M*N, 0, 255, opts );
+var x = discreteUniform( M, 0, 255, opts );
+var y = discreteUniform( N, 0, 255, opts );
+
+sger( 'row-major', M, N, 1.0, x, 1, y, 1, A, N );
+console.log( A );
+
+sger.ndarray( M, N, 1.0, x, 1, 0, y, 1, 0, A, 1, M, 0 );
+console.log( A );
+
+```
+
+
+
+
+
+
+
+* * *
+
+
+
+## C APIs
+
+
+
+
+
+
+
+
+
+
+
+### Usage
+
+```c
+#include "stdlib/blas/base/sger.h"
+```
+
+#### c_sger( layout, M, N, alpha, \*X, strideX, \*Y, strideY, \*A, LDA )
+
+Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `X` is an `M` element vector, `Y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+
+```c
+#include "stdlib/blas/base/shared.h"
+
+float A[ 3*4 ] = {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f
+};
+
+const float x[ 3 ] = { 1.0f, 4.0f, 0.0f };
+const float y[ 4 ] = { 0.0f, 1.0f, 2.0f, 3.0f };
+
+c_sger( CblasRowMajor, 3, 4, 1.0f, x, 1, y, 1, A, 4 );
+```
+
+The function accepts the following arguments:
+
+- **layout**: `[in] CBLAS_LAYOUT` storage layout.
+- **M**: `[in] CBLAS_INT` number of rows in the matrix `A`.
+- **N**: `[in] CBLAS_INT` number of columns in the matrix `A`.
+- **alpha**: `[in] float` scalar constant.
+- **X**: `[in] float*` an `M` element vector.
+- **strideX**: `[in] CBLAS_INT` stride length for `X`.
+- **Y**: `[in] float*` an `N` element vector.
+- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
+- **A**: `[inout] float*` input matrix.
+- **LDA**: `[in] CBLAS_INT` stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`).
+
+```c
+void c_sger( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const float *Y, const CBLAS_INT strideY, float *A, const CBLAS_INT LDA );
+```
+
+#### c_sger_ndarray( M, N, alpha, \*X, sx, ox, \*Y, sy, oy, \*A, sa1, sa2, oa )
+
+Performs the rank 1 operation `A = alpha*x*y^T + A`, using alternative indexing semantics and where `alpha` is a scalar, `X` is an `M` element vector, `Y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+
+```c
+#include "stdlib/blas/base/shared.h"
+
+float A[ 3*4 ] = {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f
+};
+
+const float x[ 3 ] = { 1.0f, 4.0f, 0.0f };
+const float y[ 4 ] = { 0.0f, 1.0f, 2.0f, 3.0f };
+
+c_sger_ndarray( 3, 4, 1.0f, x, 1, 0, y, 1, 0, A, 4, 1, 0 );
+```
+
+The function accepts the following arguments:
+
+- **layout**: `[in] CBLAS_LAYOUT` storage layout.
+- **M**: `[in] CBLAS_INT` number of rows in the matrix `A`.
+- **N**: `[in] CBLAS_INT` number of columns in the matrix `A`.
+- **alpha**: `[in] float` scalar constant.
+- **X**: `[in] float*` an `M` element vector.
+- **sx**: `[in] CBLAS_INT` stride length for `X`.
+- **ox**: `[in] CBLAS_INT` starting index for `X`.
+- **Y**: `[in] float*` an `N` element vector.
+- **sy**: `[in] CBLAS_INT` stride length for `Y`.
+- **oy**: `[in] CBLAS_INT` starting index for `Y`.
+- **A**: `[inout] float*` input matrix.
+- **sa1**: `[in] CBLAS_INT` stride of the first dimension of `A`.
+- **sa2**: `[in] CBLAS_INT` stride of the second dimension of `A`.
+- **oa**: `[in] CBLAS_INT` starting index for `A`.
+
+```c
+void c_sger( onst CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, float *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+### Examples
+
+```c
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include
+
+int main( void ) {
+ // Define a 3x4 matrix stored in row-major order:
+ float A[ 3*4 ] = {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f
+ };
+ // Define `x` and `y^T` vectors:
+ const float x[ 3 ] = { 1.0f, 4.0f, 0.0f }; // M
+ const float y[ 4 ] = { 0.0f, 1.0f, 2.0f, 3.0f }; // N
+
+ // Specify the number of rows and columns:
+ const int M = 3;
+ const int N = 4;
+
+ // Specify stride lengths:
+ const int strideX = 1;
+ const int strideY = 1;
+
+ // Perform operation:
+ c_sger( CblasRowMajor, M, N, 1.0f, x, strideX, y, strideY, A, N );
+
+ // Print the result:
+ for ( int i = 0; i < M; i++ ) {
+ for ( int j = 0; j < N; j++ ) {
+ printf( "A[%i,%i] = %f\n", i, j, A[ (i*N)+j ] );
+ }
+ }
+
+ // Perform operation using alterntive indexing semantics:
+ c_sger( CblasRowMajor, M, N, 1.0f, x, strideX, 0, y, 0, strideY, A, N, 1, 0 );
+
+ // Print the result:
+ for ( int i = 0; i < M; i++ ) {
+ for ( int j = 0; j < N; j++ ) {
+ printf( "A[%i,%i] = %f\n", i, j, A[ (i*N)+j ] );
+ }
+ }
+}
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[blas]: http://www.netlib.org/blas
+
+[blas-sger]: https://www.netlib.org/lapack/explore-html/d8/d75/group__ger_ga95baec6bb0a84393d7bc67212b566ab0.html
+
+[mdn-float32array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array
+
+[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
+
+
+
+
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.js
new file mode 100644
index 000000000000..20835d780fea
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.js
@@ -0,0 +1,105 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var pkg = require( './../package.json' ).name;
+var sger = require( './../lib/sger.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} N - array dimension size
+* @returns {Function} benchmark function
+*/
+function createBenchmark( N ) {
+ var x = uniform( N, -10.0, 10.0, options );
+ var y = uniform( N, -10.0, 10.0, options );
+ var A = uniform( N*N, -10.0, 10.0, options );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var z;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ z = sger( 'row-major', N, N, 1.0, x, 1, y, 1, A, N );
+ if ( isnanf( z[ i%z.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( z[ i%z.length ] ) ) {
+ 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 = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( len );
+ bench( pkg+':size='+(len*len), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.native.js
new file mode 100644
index 000000000000..243b4e5ab863
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.native.js
@@ -0,0 +1,110 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var sger = tryRequire( resolve( __dirname, './../lib/sger.native.js' ) );
+var opts = {
+ 'skip': ( sger instanceof Error )
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} N - array dimension size
+* @returns {Function} benchmark function
+*/
+function createBenchmark( N ) {
+ var x = uniform( N, -10.0, 10.0, options );
+ var y = uniform( N, -10.0, 10.0, options );
+ var A = uniform( N*N, -10.0, 10.0, options );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var z;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ z = sger( 'row-major', N, N, 1.0, x, 1, y, 1, A, N );
+ if ( isnanf( z[ i%z.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( z[ i%z.length ] ) ) {
+ 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 = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( len );
+ bench( pkg+'::native:size='+(len*len), opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.js
new file mode 100644
index 000000000000..5c4ec6a545c6
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.js
@@ -0,0 +1,105 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var pkg = require( './../package.json' ).name;
+var sger = require( './../lib/ndarray.js' );
+
+
+// VARIABLES //
+
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} N - array dimension size
+* @returns {Function} benchmark function
+*/
+function createBenchmark( N ) {
+ var x = uniform( N, -10.0, 10.0, options );
+ var y = uniform( N, -10.0, 10.0, options );
+ var A = uniform( N*N, -10.0, 10.0, options );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var z;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ z = sger( N, N, 1.0, x, 1, 0, y, 1, 0, A, N, 1, 0 );
+ if ( isnanf( z[ i%z.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( z[ i%z.length ] ) ) {
+ 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 = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( len );
+ bench( pkg+':ndarray:size='+(len*len), f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.native.js
new file mode 100644
index 000000000000..4ef80279226f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/benchmark.ndarray.native.js
@@ -0,0 +1,110 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var bench = require( '@stdlib/bench' );
+var uniform = require( '@stdlib/random/array/uniform' );
+var isnanf = require( '@stdlib/math/base/assert/is-nanf' );
+var pow = require( '@stdlib/math/base/special/pow' );
+var floor = require( '@stdlib/math/base/special/floor' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+var pkg = require( './../package.json' ).name;
+
+
+// VARIABLES //
+
+var sger = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( sger instanceof Error )
+};
+var options = {
+ 'dtype': 'float32'
+};
+
+
+// FUNCTIONS //
+
+/**
+* Creates a benchmark function.
+*
+* @private
+* @param {PositiveInteger} N - array dimension size
+* @returns {Function} benchmark function
+*/
+function createBenchmark( N ) {
+ var x = uniform( N, -10.0, 10.0, options );
+ var y = uniform( N, -10.0, 10.0, options );
+ var A = uniform( N*N, -10.0, 10.0, options );
+ return benchmark;
+
+ /**
+ * Benchmark function.
+ *
+ * @private
+ * @param {Benchmark} b - benchmark instance
+ */
+ function benchmark( b ) {
+ var z;
+ var i;
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ z = sger( N, N, 1.0, x, 1, 0, y, 1, 0, A, N, 1, 0 );
+ if ( isnanf( z[ i%z.length ] ) ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( isnanf( z[ i%z.length ] ) ) {
+ 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 = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ f = createBenchmark( len );
+ bench( pkg+'::native:ndarray:size='+(len*len), opts, f );
+ }
+}
+
+main();
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/Makefile b/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/Makefile
new file mode 100644
index 000000000000..cce2c865d7ad
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/benchmark.length.c
new file mode 100644
index 000000000000..2a439460f7d4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/c/benchmark.length.c
@@ -0,0 +1,206 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include
+#include
+#include
+#include
+#include
+
+#define NAME "sger"
+#define ITERATIONS 10000000
+#define REPEATS 3
+#define MIN 1
+#define MAX 6
+
+/**
+* Prints the TAP version.
+*/
+static void print_version( void ) {
+ printf( "TAP version 13\n" );
+}
+
+/**
+* Prints the TAP summary.
+*
+* @param total total number of tests
+* @param passing total number of passing tests
+*/
+static void print_summary( int total, int passing ) {
+ printf( "#\n" );
+ printf( "1..%d\n", total ); // TAP plan
+ printf( "# total %d\n", total );
+ printf( "# pass %d\n", passing );
+ printf( "#\n" );
+ printf( "# ok\n" );
+}
+
+/**
+* Prints benchmarks results.
+*
+* @param iterations number of iterations
+* @param elapsed elapsed time in seconds
+*/
+static void print_results( int iterations, double elapsed ) {
+ double rate = (double)iterations / elapsed;
+ printf( " ---\n" );
+ printf( " iterations: %d\n", iterations );
+ printf( " elapsed: %0.9f\n", elapsed );
+ printf( " rate: %0.9f\n", rate );
+ printf( " ...\n" );
+}
+
+/**
+* Returns a clock time.
+*
+* @return clock time
+*/
+static double tic( void ) {
+ struct timeval now;
+ gettimeofday( &now, NULL );
+ return (double)now.tv_sec + (double)now.tv_usec/1.0e6;
+}
+
+/**
+* Generates a random number on the interval [0,1).
+*
+* @return random number
+*/
+static float rand_float( void ) {
+ int r = rand();
+ return (float)r / ( (float)RAND_MAX + 1.0f );
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param N array dimension size
+* @return elapsed time in seconds
+*/
+static double benchmark1( int iterations, int N ) {
+ double elapsed;
+ float A[ N*N ];
+ float x[ N ];
+ float y[ N ];
+ double t;
+ int i;
+ int j;
+
+ for ( i = 0, j = 0; i < N; i++, j += 2 ) {
+ x[ i ] = ( rand_float()*20.0f ) - 10.0f;
+ y[ i ] = ( rand_float()*20.0f ) - 10.0f;
+ A[ j ] = ( rand_float()*20.0f ) - 10.0f;
+ A[ j+1 ] = ( rand_float()*20.0f ) - 10.0f;
+ }
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ c_sger( CblasRowMajor, N, N, 1.0f, x, 1, y, 1, A, N );
+ if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Runs a benchmark.
+*
+* @param iterations number of iterations
+* @param N array dimension size
+* @return elapsed time in seconds
+*/
+static double benchmark2( int iterations, int N ) {
+ double elapsed;
+ float A[ N*N ];
+ float x[ N ];
+ float y[ N ];
+ double t;
+ int i;
+ int j;
+
+ for ( i = 0, j = 0; i < N; i++, j += 2 ) {
+ x[ i ] = ( rand_float()*20.0f ) - 10.0f;
+ y[ i ] = ( rand_float()*20.0f ) - 10.0f;
+ A[ j ] = ( rand_float()*20.0f ) - 10.0f;
+ A[ j+1 ] = ( rand_float()*20.0f ) - 10.0f;
+ }
+ t = tic();
+ for ( i = 0; i < iterations; i++ ) {
+ // cppcheck-suppress uninitvar
+ c_sger_ndarray( N, N, 1.0f, x, 1, 0, y, 1, 0, A, N, 1, 0 );
+ if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) {
+ printf( "should not return NaN\n" );
+ break;
+ }
+ }
+ elapsed = tic() - t;
+ if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) {
+ printf( "should not return NaN\n" );
+ }
+ return elapsed;
+}
+
+/**
+* Main execution sequence.
+*/
+int main( void ) {
+ double elapsed;
+ int count;
+ int iter;
+ int N;
+ int i;
+ int j;
+
+ // Use the current time to seed the random number generator:
+ srand( time( NULL ) );
+
+ print_version();
+ count = 0;
+ for ( i = MIN; i <= MAX; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:size=%d\n", NAME, N*N );
+ elapsed = benchmark1( iter, N );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ for ( i = MIN; i <= MAX; i++ ) {
+ N = floor( pow( pow( 10, i ), 1.0/2.0 ) );
+ iter = ITERATIONS / pow( 10, i-1 );
+ for ( j = 0; j < REPEATS; j++ ) {
+ count += 1;
+ printf( "# c::%s:ndarray:size=%d\n", NAME, N*N );
+ elapsed = benchmark2( iter, N );
+ print_results( iter, elapsed );
+ printf( "ok %d benchmark finished\n", count );
+ }
+ }
+ print_summary( count, count );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/Makefile b/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/Makefile
new file mode 100644
index 000000000000..e66ba947e450
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/Makefile
@@ -0,0 +1,141 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling Fortran source files:
+ifdef FORTRAN_COMPILER
+ FC := $(FORTRAN_COMPILER)
+else
+ FC := gfortran
+endif
+
+# Define the command-line options when compiling Fortran files:
+FFLAGS ?= \
+ -std=f95 \
+ -ffree-form \
+ -O3 \
+ -Wall \
+ -Wextra \
+ -Wno-compare-reals \
+ -Wimplicit-interface \
+ -fno-underscoring \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop`):
+INCLUDE ?=
+
+# List of Fortran source files:
+SOURCE_FILES ?= ../../src/sger.f
+
+# List of Fortran targets:
+f_targets := benchmark.length.out
+
+
+# RULES #
+
+#/
+# Compiles Fortran source files.
+#
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} [FORTRAN_COMPILER] - Fortran compiler
+# @param {string} [FFLAGS] - Fortran compiler flags
+# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(f_targets)
+
+.PHONY: all
+
+#/
+# Compiles Fortran source files.
+#
+# @private
+# @param {string} SOURCE_FILES - list of Fortran source files
+# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`)
+# @param {string} FC - Fortran compiler
+# @param {string} FFLAGS - Fortran compiler flags
+# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code
+#/
+$(f_targets): %.out: %.f
+ $(QUIET) $(FC) $(FFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $<
+
+#/
+# Runs compiled benchmarks.
+#
+# @example
+# make run
+#/
+run: $(f_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/benchmark.length.f
new file mode 100644
index 000000000000..b768b93b2bef
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/benchmark/fortran/benchmark.length.f
@@ -0,0 +1,217 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2025 The Stdlib Authors.
+!
+! Licensed under the Apache License, Version 2.0 (the "License");
+! you may not use this file except in compliance with the License.
+! You may obtain a copy of the License at
+!
+! http://www.apache.org/licenses/LICENSE-2.0
+!
+! Unless required by applicable law or agreed to in writing, software
+! distributed under the License is distributed on an "AS IS" BASIS,
+! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+! See the License for the specific language governing permissions and
+! limitations under the License.
+!<
+
+program bench
+ implicit none
+ ! ..
+ ! Local constants:
+ character(4), parameter :: name = 'sger' ! if changed, be sure to adjust length
+ integer, parameter :: iterations = 1000000
+ integer, parameter :: repeats = 3
+ integer, parameter :: min = 1
+ integer, parameter :: max = 6
+ ! ..
+ ! Run the benchmarks:
+ call main()
+ ! ..
+ ! Functions:
+contains
+ ! ..
+ ! Prints the TAP version.
+ ! ..
+ subroutine print_version()
+ print '(A)', 'TAP version 13'
+ end subroutine print_version
+ ! ..
+ ! Prints the TAP summary.
+ !
+ ! @param {integer} total - total number of tests
+ ! @param {integer} passing - total number of passing tests
+ ! ..
+ subroutine print_summary( total, passing )
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: total, passing
+ ! ..
+ ! Local variables:
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim
+ ! ..
+ print '(A)', '#'
+ ! ..
+ write (str, '(I15)') total ! TAP plan
+ tmp = adjustl( str )
+ print '(A,A)', '1..', trim( tmp )
+ ! ..
+ print '(A,A)', '# total ', trim( tmp )
+ ! ..
+ write (str, '(I15)') passing
+ tmp = adjustl( str )
+ print '(A,A)', '# pass ', trim( tmp )
+ ! ..
+ print '(A)', '#'
+ print '(A)', '# ok'
+ end subroutine print_summary
+ ! ..
+ ! Prints benchmarks results.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {double} elapsed - elapsed time in seconds
+ ! ..
+ subroutine print_results( iterations, elapsed )
+ ! ..
+ ! Scalar arguments:
+ double precision, intent(in) :: elapsed
+ integer, intent(in) :: iterations
+ ! ..
+ ! Local variables:
+ double precision :: rate
+ character(len=999) :: str, tmp
+ ! ..
+ ! Intrinsic functions:
+ intrinsic dble, adjustl, trim
+ ! ..
+ rate = dble( iterations ) / elapsed
+ ! ..
+ print '(A)', ' ---'
+ ! ..
+ write (str, '(I15)') iterations
+ tmp = adjustl( str )
+ print '(A,A)', ' iterations: ', trim( tmp )
+ ! ..
+ write (str, '(f100.9)') elapsed
+ tmp = adjustl( str )
+ print '(A,A)', ' elapsed: ', trim( tmp )
+ ! ..
+ write( str, '(f100.9)') rate
+ tmp = adjustl( str )
+ print '(A,A)', ' rate: ', trim( tmp )
+ ! ..
+ print '(A)', ' ...'
+ end subroutine print_results
+ ! ..
+ ! Runs a benchmark.
+ !
+ ! @param {integer} iterations - number of iterations
+ ! @param {integer} N - array dimension size
+ ! @return {double} elapsed time in seconds
+ ! ..
+ double precision function benchmark( iterations, N )
+ ! ..
+ ! External functions:
+ interface
+ subroutine sger( M, N, alpha, X, strideX, Y, strideY, A, LDA )
+ integer :: strideX, strideY, LDA, M, N
+ single precision :: X(*), Y(*), A(LDA, *)
+ single precision :: alpha
+ end subroutine sger
+ end interface
+ ! ..
+ ! Scalar arguments:
+ integer, intent(in) :: iterations, N
+ ! ..
+ ! Local scalars:
+ double precision :: elapsed, r
+ double precision :: t1, t2
+ integer :: i, j
+ ! ..
+ ! Local arrays:
+ single precision, allocatable :: x(:), y(:), A(:,:)
+ ! ..
+ ! Intrinsic functions:
+ intrinsic random_number, cpu_time, mod
+ ! ..
+ ! Allocate arrays:
+ allocate( x(N), y(N), A(N,N) )
+ ! ..
+ do i = 1, N
+ call random_number( r )
+ x( i ) = ( r*20.0 ) - 10.0
+ call random_number( r )
+ y( i ) = ( r*20.0 ) - 10.0
+ do j = 1, N
+ call random_number( r )
+ A(i, j) = ( r*20.0 ) - 10.0
+ end do
+ end do
+ ! ..
+ call cpu_time( t1 )
+ ! ..
+ j = 1
+ do i = 1, iterations
+ call sger( N, N, 1.0, x, 1, y, 1, A, N )
+ j = mod( i, N ) + 1
+ if ( A( j, j ) /= A( j, j ) ) then
+ print '(A)', 'should not return NaN'
+ exit
+ end if
+ end do
+ ! ..
+ call cpu_time( t2 )
+ ! ..
+ elapsed = t2 - t1
+ ! ..
+ if ( A( j, j ) /= A( j, j ) ) then
+ print '(A)', 'should not return NaN'
+ end if
+ ! ..
+ ! Deallocate arrays:
+ deallocate( x, y, A )
+ ! ..
+ benchmark = elapsed
+ return
+ end function benchmark
+ ! ..
+ ! Main execution sequence.
+ ! ..
+ subroutine main()
+ ! ..
+ ! Local variables:
+ character(len=999) :: str, tmp
+ double precision :: elapsed
+ integer :: i, j, N, count, iter
+ ! ..
+ ! Intrinsic functions:
+ intrinsic adjustl, trim, floor, sqrt
+ ! ..
+ call print_version()
+ count = 0
+ do i = min, max
+ N = floor( ( 10**i )**(1.0/2.0) )
+ iter = iterations / 10**(i-1)
+ do j = 1, repeats
+ count = count + 1
+ ! ..
+ write (str, '(I15)') N*N
+ tmp = adjustl( str )
+ print '(A,A,A,A)', '# fortran::', name, ':size=', trim(tmp)
+ ! ..
+ elapsed = benchmark( iter, N )
+ ! ..
+ call print_results( iter, elapsed )
+ ! ..
+ write (str, '(I15)') count
+ tmp = adjustl( str )
+ print '(A,A,A)', 'ok ', trim( tmp ), ' benchmark finished'
+ end do
+ end do
+ call print_summary( count, count )
+ end subroutine main
+end program bench
diff --git a/lib/node_modules/@stdlib/blas/base/sger/binding.gyp b/lib/node_modules/@stdlib/blas/base/sger/binding.gyp
new file mode 100644
index 000000000000..08de71a2020e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/binding.gyp
@@ -0,0 +1,265 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A `.gyp` file for building a Node.js native add-on.
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+{
+ # List of files to include in this file:
+ 'includes': [
+ './include.gypi',
+ ],
+
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ # Target name should match the add-on export name:
+ 'addon_target_name%': 'addon',
+
+ # Fortran compiler (to override -Dfortran_compiler=):
+ 'fortran_compiler%': 'gfortran',
+
+ # Fortran compiler flags:
+ 'fflags': [
+ # Specify the Fortran standard to which a program is expected to conform:
+ '-std=f95',
+
+ # Indicate that the layout is free-form source code:
+ '-ffree-form',
+
+ # Aggressive optimization:
+ '-O3',
+
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Warn if source code contains problematic language features:
+ '-Wextra',
+
+ # Warn if a procedure is called without an explicit interface:
+ '-Wimplicit-interface',
+
+ # Do not transform names of entities specified in Fortran source files by appending underscores (i.e., don't mangle names, thus allowing easier usage in C wrappers):
+ '-fno-underscoring',
+
+ # Warn if source code contains Fortran 95 extensions and C-language constructs:
+ '-pedantic',
+
+ # Compile but do not link (output is an object file):
+ '-c',
+ ],
+
+ # Set variables based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+ {
+ # Define the object file suffix:
+ 'obj': 'obj',
+ },
+ {
+ # Define the object file suffix:
+ 'obj': 'o',
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end variables
+
+ # Define compile targets:
+ 'targets': [
+
+ # Target to generate an add-on:
+ {
+ # The target name should match the add-on export name:
+ 'target_name': '<(addon_target_name)',
+
+ # Define dependencies:
+ 'dependencies': [],
+
+ # Define directories which contain relevant include headers:
+ 'include_dirs': [
+ # Local include directory:
+ '<@(include_dirs)',
+ ],
+
+ # List of source files:
+ 'sources': [
+ '<@(src_files)',
+ ],
+
+ # Settings which should be applied when a target's object files are used as linker input:
+ 'link_settings': {
+ # Define libraries:
+ 'libraries': [
+ '<@(libraries)',
+ ],
+
+ # Define library directories:
+ 'library_dirs': [
+ '<@(library_dirs)',
+ ],
+ },
+
+ # C/C++ compiler flags:
+ 'cflags': [
+ # Enable commonly used warning options:
+ '-Wall',
+
+ # Aggressive optimization:
+ '-O3',
+ ],
+
+ # C specific compiler flags:
+ 'cflags_c': [
+ # Specify the C standard to which a program is expected to conform:
+ '-std=c99',
+ ],
+
+ # C++ specific compiler flags:
+ 'cflags_cpp': [
+ # Specify the C++ standard to which a program is expected to conform:
+ '-std=c++11',
+ ],
+
+ # Linker flags:
+ 'ldflags': [],
+
+ # Apply conditions based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="mac"',
+ {
+ # Linker flags:
+ 'ldflags': [
+ '-undefined dynamic_lookup',
+ '-Wl,-no-pie',
+ '-Wl,-search_paths_first',
+ ],
+ },
+ ], # end condition (OS=="mac")
+ [
+ 'OS!="win"',
+ {
+ # C/C++ flags:
+ 'cflags': [
+ # Generate platform-independent code:
+ '-fPIC',
+ ],
+ },
+ ], # end condition (OS!="win")
+ ], # end conditions
+
+ # Define custom build actions for particular inputs:
+ 'rules': [
+ {
+ # Define a rule for processing Fortran files:
+ 'extension': 'f',
+
+ # Define the pathnames to be used as inputs when performing processing:
+ 'inputs': [
+ # Full path of the current input:
+ '<(RULE_INPUT_PATH)'
+ ],
+
+ # Define the outputs produced during processing:
+ 'outputs': [
+ # Store an output object file in a directory for placing intermediate results (only accessible within a single target):
+ '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).<(obj)'
+ ],
+
+ # Define the rule for compiling Fortran based on the host OS:
+ 'conditions': [
+ [
+ 'OS=="win"',
+
+ # Rule to compile Fortran on Windows:
+ {
+ 'rule_name': 'compile_fortran_windows',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Windows...',
+
+ 'process_outputs_as_sources': 0,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ },
+
+ # Rule to compile Fortran on non-Windows:
+ {
+ 'rule_name': 'compile_fortran_linux',
+ 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Linux...',
+
+ 'process_outputs_as_sources': 1,
+
+ # Define the command-line invocation:
+ 'action': [
+ '<(fortran_compiler)',
+ '<@(fflags)',
+ '-fPIC', # generate platform-independent code
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ }
+ ], # end condition (OS=="win")
+ ], # end conditions
+ }, # end rule (extension=="f")
+ ], # end rules
+ }, # end target <(addon_target_name)
+
+ # Target to copy a generated add-on to a standard location:
+ {
+ 'target_name': 'copy_addon',
+
+ # Declare that the output of this target is not linked:
+ 'type': 'none',
+
+ # Define dependencies:
+ 'dependencies': [
+ # Require that the add-on be generated before building this target:
+ '<(addon_target_name)',
+ ],
+
+ # Define a list of actions:
+ 'actions': [
+ {
+ 'action_name': 'copy_addon',
+ 'message': 'Copying addon...',
+
+ # Explicitly list the inputs in the command-line invocation below:
+ 'inputs': [],
+
+ # Declare the expected outputs:
+ 'outputs': [
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+
+ # Define the command-line invocation:
+ 'action': [
+ 'cp',
+ '<(PRODUCT_DIR)/<(addon_target_name).node',
+ '<(addon_output_dir)/<(addon_target_name).node',
+ ],
+ },
+ ], # end actions
+ }, # end target copy_addon
+ ], # end targets
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/sger/docs/repl.txt
new file mode 100644
index 000000000000..0a13e0664164
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/docs/repl.txt
@@ -0,0 +1,141 @@
+
+{{alias}}( order, M, N, α, x, sx, y, sy, A, lda )
+ Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x`
+ is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by
+ `N` matrix.
+
+ Indexing is relative to the first index. To introduce an offset, use typed
+ array views.
+
+ If `M`, `N`, or `α` is equal to `0`, the function returns `A` unchanged.
+
+ Parameters
+ ----------
+ order: string
+ Row-major (C-style) or column-major (Fortran-style) order.
+
+ M: integer
+ Number of rows in `A`.
+
+ N: integer
+ Number of columns in `A`.
+
+ α: number
+ Scalar constant.
+
+ x: Float32Array
+ First input vector.
+
+ sx: integer
+ Stride length for `x`.
+
+ y: Float32Array
+ Second input vector.
+
+ sy: integer
+ Stride length for `y`.
+
+ A: Float32Array
+ Input Matrix.
+
+ lda: integer
+ Stride of the first dimension of `A` (a.k.a., leading dimension of the
+ matrix `A`).
+
+ Returns
+ -------
+ A: Float32Array
+ Input Matrix.
+
+ Examples
+ --------
+ // Standard usage:
+ > var x = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > var y = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > var A = new {{alias:@stdlib/array/float32}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var order = 'row-major';
+ > {{alias}}( order, 2, 2, 1.0, x, 1, y, 1, A, 2 )
+ [ 2.0, 3.0, 4.0, 5.0 ]
+
+ // Advanced indexing:
+ > x = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > y = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > A = new {{alias:@stdlib/array/float32}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > {{alias}}( order, 2, 2, 1.0, x, -1, y, -1, A, 2 )
+ [ 2.0, 3.0, 4.0, 5.0 ]
+
+ // Using typed array views:
+ > var x0 = new {{alias:@stdlib/array/float32}}( [ 0.0, 1.0, 1.0 ] );
+ > var y0 = new {{alias:@stdlib/array/float32}}( [ 0.0, 1.0, 1.0 ] );
+ > A = new {{alias:@stdlib/array/float32}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
+ > var y1 = new {{alias:@stdlib/array/float32}}( y0.buffer, y0.BYTES_PER_ELEMENT*1 );
+ > {{alias}}( order, 2, 2, 1.0, x1, -1, y1, -1, A, 2 )
+ [ 2.0, 3.0, 4.0, 5.0 ]
+
+
+{{alias}}.ndarray( M, N, α, x, sx, ox, y, sy, oy, A, sa1, sa2, oa )
+ Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing
+ semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an
+ `N` element vector, and `A` is an `M` by `N` matrix.
+
+ While typed array views mandate a view offset based on the underlying
+ buffer, the offset parameters support indexing semantics based on starting
+ indices.
+
+ Parameters
+ ----------
+ M: integer
+ Number of rows in `A`.
+
+ N: integer
+ Number of columns in `A`.
+
+ α: number
+ Scalar constant.
+
+ x: Float32Array
+ First input vector.
+
+ sx: integer
+ Stride length for `x`.
+
+ ox: integer
+ Starting index for `x`.
+
+ y: Float32Array
+ Second input vector.
+
+ sy: integer
+ Stride length for `y`.
+
+ oy: integer
+ Starting index for `y`.
+
+ A: Float32Array
+ Input Matrix.
+
+ sa1: integer
+ Stride of the first dimension of `A`.
+
+ sa2: integer
+ Stride of the second dimension of `A`.
+
+ oa: integer
+ Starting index for `A`.
+
+ Returns
+ -------
+ A: Float32Array
+ Input Matrix.
+
+ Examples
+ --------
+ > var x = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > var y = new {{alias:@stdlib/array/float32}}( [ 1.0, 1.0 ] );
+ > var A = new {{alias:@stdlib/array/float32}}( [ 1.0, 2.0, 3.0, 4.0 ] );
+ > {{alias}}.ndarray( 2, 2, 1.0, x, 1, 0, y, 1, 0, A, 2, 1, 0 )
+ [ 2.0, 3.0, 4.0, 5.0 ]
+
+ See Also
+ --------
diff --git a/lib/node_modules/@stdlib/blas/base/sger/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/sger/docs/types/index.d.ts
new file mode 100644
index 000000000000..75e3aa18267c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/docs/types/index.d.ts
@@ -0,0 +1,127 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+import { Layout } from '@stdlib/types/blas';
+
+/**
+* Interface describing `sger`.
+*/
+interface Routine {
+ /**
+ * Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+ *
+ * @param order - storage layout
+ * @param M - number of rows in the matrix `A`
+ * @param N - number of columns in the matrix `A`
+ * @param alpha - scalar constant
+ * @param x - first input vector
+ * @param strideX - `x` stride length
+ * @param y - second input vector
+ * @param strideY - `y` stride length
+ * @param A - input matrix
+ * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+ * @returns `A`
+ *
+ * @example
+ * var Float32Array = require( '@stdlib/array/float32' );
+ *
+ * var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ * var x = new Float32Array( [ 1.0, 1.0 ] );
+ * var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+ *
+ * sger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 );
+ * // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+ */
+ ( order: Layout, M: number, N: number, alpha: number, x: Float32Array, strideX: number, y: Float32Array, strideY: number, A: Float32Array, LDA: number ): Float32Array;
+
+ /**
+ * Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+ *
+ * @param M - number of rows in the matrix `A`
+ * @param N - number of columns in the matrix `A`
+ * @param alpha - scalar constant
+ * @param x - first input vector
+ * @param strideX - `x` stride length
+ * @param offsetX - starting index for `x`
+ * @param y - second input vector
+ * @param strideY - `y` stride length
+ * @param offsetY - starting index for `y`
+ * @param A - input matrix
+ * @param strideA1 - stride of the first dimension of `A`
+ * @param strideA2 - stride of the second dimension of `A`
+ * @param offsetA - starting index for `A`
+ * @returns `A`
+ *
+ * @example
+ * var Float32Array = require( '@stdlib/array/float32' );
+ *
+ * var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+ * var x = new Float32Array( [ 1.0, 1.0 ] );
+ * var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+ *
+ * sger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 );
+ * // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+ */
+ ndarray( M: number, N: number, alpha: number, x: Float32Array, strideX: number, offsetX: number, y: Float32Array, strideY: number, offsetY: number, A: Float32Array, strideA1: number, strideA2: number, offsetA: number ): Float32Array;
+}
+
+/**
+* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @param order - storage layout
+* @param M - number of rows in the matrix `A`
+* @param N - number of columns in the matrix `A`
+* @param alpha - scalar constant
+* @param x - first input vector
+* @param strideX - `x` stride length
+* @param y - second input vector
+* @param strideY - `y` stride length
+* @param A - input matrix
+* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @returns `A`
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 'column-major', 2, 3, 1.0, x, 1, y, 1, A, 2 );
+* // A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 1, 2, 0 );
+* // A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+*/
+declare var sger: Routine;
+
+
+// EXPORTS //
+
+export = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/sger/docs/types/test.ts
new file mode 100644
index 000000000000..c744803657c9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/docs/types/test.ts
@@ -0,0 +1,449 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import sger = require( './index' );
+
+
+// TESTS //
+
+// The function returns a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectType Float32Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a string...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 10, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( true, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( false, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( null, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( undefined, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( [], 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( {}, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( ( x: number ): number => x, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', '10', 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', true, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', false, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', null, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', undefined, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', [], 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', {}, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', ( x: number ): number => x, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, '10', 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, true, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, false, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, null, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, undefined, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, [], 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, {}, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, ( x: number ): number => x, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, '10', x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, true, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, false, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, null, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, undefined, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, [], x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, {}, x, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, ( x: number ): number => x, x, 1, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a Float32Array...
+{
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, 10, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, '10', 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, true, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, false, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, null, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, undefined, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, [ '1' ], 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, {}, 1, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, ( x: number ): number => x, 1, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, x, '10', y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, true, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, false, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, null, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, undefined, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, [], y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, {}, y, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, ( x: number ): number => x, y, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, x, 1, 10, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, '10', 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, true, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, false, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, null, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, undefined, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, [ '1' ], 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, {}, 1, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, ( x: number ): number => x, 1, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, '10', A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, true, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, false, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, null, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, undefined, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, [], A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, {}, A, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, ( x: number ): number => x, A, 10 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, 10, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, '10', 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, true, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, false, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, null, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, undefined, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, [ '1' ], 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, {}, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, ( x: number ): number => x, 1 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, '10' ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, true ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, false ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, null ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, undefined ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, [] ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, {} ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an unsupported number of arguments...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger(); // $ExpectError
+ sger( 'row-major' ); // $ExpectError
+ sger( 'row-major', 10 ); // $ExpectError
+ sger( 'row-major', 10, 10 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1 ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A ); // $ExpectError
+ sger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, 10, 10 ); // $ExpectError
+}
+
+// Attached to main export is an `ndarray` method which returns a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectType Float32Array
+}
+
+// The compiler throws an error if the function is provided a first argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( '10', 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( true, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( false, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( null, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( undefined, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( [], 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( {}, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( ( x: number ): number => x, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a second argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, '10', 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, true, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, false, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, null, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, undefined, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, [], 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, {}, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, ( x: number ): number => x, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a third argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, '10', x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, true, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, false, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, null, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, undefined, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, [], x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, {}, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, ( x: number ): number => x, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fourth argument which is not a Float32Array...
+{
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, 10, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, '10', 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, true, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, false, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, null, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, undefined, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, [ '1' ], 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, {}, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, ( x: number ): number => x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a fifth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, '10', 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, true, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, false, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, null, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, undefined, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, [], 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, {}, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, ( x: number ): number => x, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a sixth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, '10', y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, true, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, false, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, null, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, undefined, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, [], y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, {}, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, ( x: number ): number => x, y, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a seventh argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, 10, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, '10', 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, true, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, false, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, null, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, undefined, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, [ '1' ], 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, {}, 1, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, ( x: number ): number => x, 1, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eighth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, '10', 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, true, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, false, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, null, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, undefined, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, [], 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, {}, 0, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, ( x: number ): number => x, 0, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a ninth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, '10', A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, true, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, false, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, null, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, undefined, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, [], A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, {}, A, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, ( x: number ): number => x, A, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a tenth argument which is not a Float32Array...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, 10, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, '10', 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, true, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, false, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, null, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, undefined, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, [ '1' ], 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, {}, 10, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, ( x: number ): number => x, 10, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an eleventh argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, '10', 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, true, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, false, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, null, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, undefined, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, [], 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, {}, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, ( x: number ): number => x, 1, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a twelfth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, '10', 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, true, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, false, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, null, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, undefined, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, [], 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, {}, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, ( x: number ): number => x, 0 ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided a thirteenth argument which is not a number...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, '10' ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, true ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, false ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, null ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, undefined ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, [] ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, {} ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
+{
+ const x = new Float32Array( 10 );
+ const y = new Float32Array( 10 );
+ const A = new Float32Array( 20 );
+
+ sger.ndarray(); // $ExpectError
+ sger.ndarray( 10 ); // $ExpectError
+ sger.ndarray( 10, 10 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1 ); // $ExpectError
+ sger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0, 10 ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/examples/c/Makefile b/lib/node_modules/@stdlib/blas/base/sger/examples/c/Makefile
new file mode 100644
index 000000000000..25ced822f96a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/examples/c/Makefile
@@ -0,0 +1,146 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+# Define the program used for compiling C source files:
+ifdef C_COMPILER
+ CC := $(C_COMPILER)
+else
+ CC := gcc
+endif
+
+# Define the command-line options when compiling C files:
+CFLAGS ?= \
+ -std=c99 \
+ -O3 \
+ -Wall \
+ -pedantic
+
+# Determine whether to generate position independent code ([1][1], [2][2]).
+#
+# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options
+# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option
+ifeq ($(OS), WINNT)
+ fPIC ?=
+else
+ fPIC ?= -fPIC
+endif
+
+# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`):
+INCLUDE ?=
+
+# List of source files:
+SOURCE_FILES ?=
+
+# List of libraries (e.g., `-lopenblas -lpthread`):
+LIBRARIES ?=
+
+# List of library paths (e.g., `-L /foo/bar -L /beep/boop`):
+LIBPATH ?=
+
+# List of C targets:
+c_targets := example.out
+
+
+# RULES #
+
+#/
+# Compiles source files.
+#
+# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`)
+# @param {string} [CFLAGS] - C compiler options
+# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`)
+# @param {string} [SOURCE_FILES] - list of source files
+# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`)
+# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`)
+#
+# @example
+# make
+#
+# @example
+# make all
+#/
+all: $(c_targets)
+
+.PHONY: all
+
+#/
+# Compiles C source files.
+#
+# @private
+# @param {string} CC - C compiler (e.g., `gcc`)
+# @param {string} CFLAGS - C compiler options
+# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`)
+# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`)
+# @param {string} SOURCE_FILES - list of source files
+# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`)
+# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`)
+#/
+$(c_targets): %.out: %.c
+ $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES)
+
+#/
+# Runs compiled examples.
+#
+# @example
+# make run
+#/
+run: $(c_targets)
+ $(QUIET) ./$<
+
+.PHONY: run
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean:
+ $(QUIET) -rm -f *.o *.out
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/base/sger/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/sger/examples/c/example.c
new file mode 100644
index 000000000000..b06f929d795b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/examples/c/example.c
@@ -0,0 +1,61 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include
+
+int main( void ) {
+ // Define a 3x4 matrix stored in row-major order:
+ float A[ 3*4 ] = {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f
+ };
+ // Define `x` and `y^T` vectors:
+ const float x[ 3 ] = { 1.0f, 4.0f, 0.0f }; // M
+ const float y[ 4 ] = { 0.0f, 1.0f, 2.0f, 3.0f }; // N
+
+ // Specify the number of rows and columns:
+ const int M = 3;
+ const int N = 4;
+
+ // Specify stride lengths:
+ const int strideX = 1;
+ const int strideY = 1;
+
+ // Perform operation:
+ c_sger( CblasRowMajor, M, N, 1.0f, x, strideX, y, strideY, A, N );
+
+ // Print the result:
+ for ( int i = 0; i < M; i++ ) {
+ for ( int j = 0; j < N; j++ ) {
+ printf( "A[%i,%i] = %f\n", i, j, A[ (i*N)+j ] );
+ }
+ }
+
+ // Perform operation using alterntive indexing semantics:
+ c_sger_ndarray( M, N, 1.0f, x, strideX, 0, y, strideY, 0, A, N, 1, 0 );
+
+ // Print the result:
+ for ( int i = 0; i < M; i++ ) {
+ for ( int j = 0; j < N; j++ ) {
+ printf( "A[%i,%i] = %f\n", i, j, A[ (i*N)+j ] );
+ }
+ }
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/examples/index.js b/lib/node_modules/@stdlib/blas/base/sger/examples/index.js
new file mode 100644
index 000000000000..e658dba12ee2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/examples/index.js
@@ -0,0 +1,39 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
+var sger = require( './../lib' );
+
+var opts = {
+ 'dtype': 'float32'
+};
+
+var M = 3;
+var N = 5;
+
+var A = discreteUniform( M*N, 0, 255, opts );
+var x = discreteUniform( M, 0, 255, opts );
+var y = discreteUniform( N, 0, 255, opts );
+
+sger( 'row-major', M, N, 1.0, x, 1, y, 1, A, N );
+console.log( A );
+
+sger.ndarray( M, N, 1.0, x, 1, 0, y, 1, 0, A, 1, M, 0 );
+console.log( A );
diff --git a/lib/node_modules/@stdlib/blas/base/sger/include.gypi b/lib/node_modules/@stdlib/blas/base/sger/include.gypi
new file mode 100644
index 000000000000..4217944b5d20
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/include.gypi
@@ -0,0 +1,70 @@
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A GYP include file for building a Node.js native add-on.
+#
+# Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors.
+#
+# Main documentation:
+#
+# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
+# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
+#
+# Variable nesting hacks:
+#
+# [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi
+# [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004
+{
+ # Define variables to be used throughout the configuration for all targets:
+ 'variables': {
+ 'variables': {
+ # Host BLAS library (to override -Dblas=):
+ 'blas%': '',
+
+ # Path to BLAS library (to override -Dblas_dir=):
+ 'blas_dir%': '',
+ }, # end variables
+
+ # Source directory:
+ 'src_dir': './src',
+
+ # Include directories:
+ 'include_dirs': [
+ '<@(blas_dir)',
+ ' [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+function sger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-params, max-len
+ var tmp;
+ var da0;
+ var da1;
+ var S0;
+ var S1;
+ var sx;
+ var sy;
+ var ia;
+ var ix;
+ var iy;
+ var i0;
+ var i1;
+
+ // Note on variable naming convention: S#, da#, ia#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ if ( isRowMajor( [ strideA1, strideA2 ] ) ) {
+ // For row-major matrices, the last dimension has the fastest changing index...
+ S0 = N;
+ S1 = M;
+ da0 = strideA2; // offset increment for innermost loop
+ da1 = strideA1 - ( S0*strideA2 ); // offset increment for outermost loop
+
+ // Swap the vectors...
+ tmp = x;
+ x = y;
+ y = tmp;
+
+ tmp = strideX;
+ strideX = strideY;
+ strideY = tmp;
+
+ tmp = offsetX;
+ offsetX = offsetY;
+ offsetY = tmp;
+ } else { // order === 'column-major'
+ // For column-major matrices, the first dimension has the fastest changing index...
+ S0 = M;
+ S1 = N;
+ da0 = strideA1; // offset increment for innermost loop
+ da1 = strideA2 - ( S0*strideA1 ); // offset increment for outermost loop
+ }
+ sx = strideX;
+ sy = strideY;
+ ix = offsetX;
+ iy = offsetY;
+ ia = offsetA;
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ // Check whether we can avoid the inner loop entirely...
+ if ( y[ iy ] === 0.0 ) {
+ ia += da0 * S0;
+ } else {
+ tmp = alpha * y[ iy ];
+ ix = offsetX;
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ A[ ia ] += x[ ix ] * tmp;
+ ix += sx;
+ ia += da0;
+ }
+ }
+ iy += sy;
+ ia += da1;
+ }
+ return A;
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/index.js b/lib/node_modules/@stdlib/blas/base/sger/lib/index.js
new file mode 100644
index 000000000000..efc6f07de765
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/index.js
@@ -0,0 +1,72 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* BLAS level 2 routine to perform the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @module @stdlib/blas/base/sger
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+* var sger = require( '@stdlib/blas/base/sger' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+* var sger = require( '@stdlib/blas/base/sger' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+
+// MODULES //
+
+var join = require( 'path' ).join;
+var tryRequire = require( '@stdlib/utils/try-require' );
+var isError = require( '@stdlib/assert/is-error' );
+var main = require( './main.js' );
+
+
+// MAIN //
+
+var sger;
+var tmp = tryRequire( join( __dirname, './native.js' ) );
+if ( isError( tmp ) ) {
+ sger = main;
+} else {
+ sger = tmp;
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
+
+// exports: { "ndarray": "sger.ndarray" }
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/main.js b/lib/node_modules/@stdlib/blas/base/sger/lib/main.js
new file mode 100644
index 000000000000..44f4d1d86b77
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/main.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var sger = require( './sger.js' );
+var ndarray = require( './ndarray.js' );
+
+
+// MAIN //
+
+setReadOnly( sger, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/native.js b/lib/node_modules/@stdlib/blas/base/sger/lib/native.js
new file mode 100644
index 000000000000..c9b61f6f8db9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/native.js
@@ -0,0 +1,35 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' );
+var sger = require( './sger.native.js' );
+var ndarray = require( './ndarray.native.js' );
+
+
+// MAIN //
+
+setReadOnly( sger, 'ndarray', ndarray );
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.js
new file mode 100644
index 000000000000..f4f1f1fa9b73
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.js
@@ -0,0 +1,84 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var format = require( '@stdlib/string/format' );
+var base = require( './base.js' );
+
+
+// MAIN //
+
+/**
+* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @param {NonNegativeInteger} M - number of rows in the matrix `A`
+* @param {NonNegativeInteger} N - number of columns in the matrix `A`
+* @param {number} alpha - scalar constant
+* @param {Float32Array} x - first input vector
+* @param {integer} strideX - `x` stride length
+* @param {NonNegativeInteger} offsetX - starting index for `x`
+* @param {Float32Array} y - second input vector
+* @param {integer} strideY - `y` stride length
+* @param {NonNegativeInteger} offsetY - starting index for `y`
+* @param {Float32Array} A - input matrix
+* @param {integer} strideA1 - stride of the first dimension of `A`
+* @param {integer} strideA2 - stride of the second dimension of `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
+* @throws {RangeError} first argument must be a nonnegative integer
+* @throws {RangeError} second argument must be a nonnegative integer
+* @throws {RangeError} fifth argument must be non-zero
+* @throws {RangeError} eighth argument must be non-zero
+* @returns {Float32Array} `A`
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+function sger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-params, max-len
+ if ( M < 0 ) {
+ throw new RangeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%d`.', M ) );
+ }
+ if ( N < 0 ) {
+ throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', N ) );
+ }
+ if ( strideX === 0 ) {
+ throw new RangeError( format( 'invalid argument. Fifth argument must be non-zero. Value: `%d`.', strideX ) );
+ }
+ if ( strideY === 0 ) {
+ throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
+ }
+ // Check if we can early return...
+ if ( M === 0 || N === 0 || alpha === 0.0 ) {
+ return A;
+ }
+ return base( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.native.js
new file mode 100644
index 000000000000..f264a3f69719
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/ndarray.native.js
@@ -0,0 +1,85 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var format = require( '@stdlib/string/format' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @param {NonNegativeInteger} M - number of rows in the matrix `A`
+* @param {NonNegativeInteger} N - number of columns in the matrix `A`
+* @param {number} alpha - scalar constant
+* @param {Float32Array} x - first input vector
+* @param {integer} strideX - `x` stride length
+* @param {NonNegativeInteger} offsetX - starting `x` index
+* @param {Float32Array} y - second input vector
+* @param {integer} strideY - `y` stride length
+* @param {NonNegativeInteger} offsetY - starting `y` index
+* @param {Float32Array} A - input matrix
+* @param {integer} strideA1 - stride of the first dimension of `A`
+* @param {integer} strideA2 - stride of the second dimension of `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A
+* @throws {RangeError} first argument must be a nonnegative integer
+* @throws {RangeError} second argument must be a nonnegative integer
+* @throws {RangeError} fifth argument must be non-zero
+* @throws {RangeError} eighth argument must be non-zero
+* @returns {Float32Array} `A`
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+function sger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-len, max-params
+ if ( M < 0 ) {
+ throw new RangeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%d`.', M ) );
+ }
+ if ( N < 0 ) {
+ throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', N ) );
+ }
+ if ( strideX === 0 ) {
+ throw new RangeError( format( 'invalid argument. Fifth argument must be non-zero. Value: `%d`.', strideX ) );
+ }
+ if ( strideY === 0 ) {
+ throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
+ }
+ // Check if we can early return...
+ if ( M === 0 || N === 0 || alpha === 0.0 ) {
+ return A;
+ }
+ addon.ndarray( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ); // eslint-disable-line max-len
+ return A;
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/sger.js b/lib/node_modules/@stdlib/blas/base/sger/lib/sger.js
new file mode 100644
index 000000000000..56f3ae6799b3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/sger.js
@@ -0,0 +1,115 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
+var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
+var stride2offset = require( '@stdlib/strided/base/stride2offset' );
+var max = require( '@stdlib/math/base/special/fast/max' );
+var format = require( '@stdlib/string/format' );
+var base = require( './base.js' );
+
+
+// MAIN //
+
+/**
+* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @param {string} order - storage layout
+* @param {NonNegativeInteger} M - number of rows in the matrix `A`
+* @param {NonNegativeInteger} N - number of columns in the matrix `A`
+* @param {number} alpha - scalar constant
+* @param {Float32Array} x - first input vector
+* @param {integer} strideX - `x` stride length
+* @param {Float32Array} y - second input vector
+* @param {integer} strideY - `y` stride length
+* @param {Float32Array} A - input matrix
+* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @throws {TypeError} first argument must be a valid order
+* @throws {RangeError} second argument must be a nonnegative integer
+* @throws {RangeError} third argument must be a nonnegative integer
+* @throws {RangeError} sixth argument must be non-zero
+* @throws {RangeError} eighth argument must be non-zero
+* @throws {RangeError} tenth argument must be a valid stride
+* @returns {Float32Array} `A`
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+function sger( order, M, N, alpha, x, strideX, y, strideY, A, LDA ) {
+ var iscm;
+ var vala;
+ var sa1;
+ var sa2;
+ var ox;
+ var oy;
+
+ if ( !isLayout( order ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
+ }
+ if ( M < 0 ) {
+ throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', M ) );
+ }
+ if ( N < 0 ) {
+ throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', N ) );
+ }
+ if ( strideX === 0 ) {
+ throw new RangeError( format( 'invalid argument. Sixth argument must be non-zero. Value: `%d`.', strideX ) );
+ }
+ if ( strideY === 0 ) {
+ throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
+ }
+ iscm = isColumnMajor( order );
+ if ( iscm ) {
+ vala = M;
+ } else {
+ vala = N;
+ }
+ if ( LDA < max( 1, vala ) ) {
+ throw new RangeError( format( 'invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.', vala, LDA ) );
+ }
+ // Check if we can early return...
+ if ( M === 0 || N === 0 || alpha === 0.0 ) {
+ return A;
+ }
+ ox = stride2offset( M, strideX );
+ oy = stride2offset( N, strideY );
+ if ( iscm ) {
+ sa1 = 1;
+ sa2 = LDA;
+ } else { // order === 'row-major'
+ sa1 = LDA;
+ sa2 = 1;
+ }
+ return base( M, N, alpha, x, strideX, ox, y, strideY, oy, A, sa1, sa2, 0 );
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/lib/sger.native.js b/lib/node_modules/@stdlib/blas/base/sger/lib/sger.native.js
new file mode 100644
index 000000000000..e1235b6a1714
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/lib/sger.native.js
@@ -0,0 +1,100 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' );
+var isLayout = require( '@stdlib/blas/base/assert/is-layout' );
+var resolve = require( '@stdlib/blas/base/layout-resolve-enum' );
+var max = require( '@stdlib/math/base/special/fast/max' );
+var format = require( '@stdlib/string/format' );
+var addon = require( './../src/addon.node' );
+
+
+// MAIN //
+
+/**
+* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M` by `N` matrix.
+*
+* @param {string} order - storage layout
+* @param {NonNegativeInteger} M - number of rows in the matrix `A`
+* @param {NonNegativeInteger} N - number of columns in the matrix `A`
+* @param {number} alpha - scalar constant
+* @param {Float32Array} x - first input vector
+* @param {integer} strideX - `x` stride length
+* @param {Float32Array} y - second input vector
+* @param {integer} strideY - `y` stride length
+* @param {Float32Array} A - matrix of coefficients
+* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+* @throws {TypeError} first argument must be a valid order
+* @throws {RangeError} second argument must be a nonnegative integer
+* @throws {RangeError} third argument must be a nonnegative integer
+* @throws {RangeError} sixth argument must be non-zero
+* @throws {RangeError} eighth argument must be non-zero
+* @throws {RangeError} tenth argument must be a valid stride
+* @returns {Float32Array} `A`
+*
+* @example
+* var Float32Array = require( '@stdlib/array/float32' );
+*
+* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
+* var x = new Float32Array( [ 1.0, 1.0 ] );
+* var y = new Float32Array( [ 1.0, 1.0, 1.0 ] );
+*
+* sger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 );
+* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+*/
+function sger( order, M, N, alpha, x, strideX, y, strideY, A, LDA ) {
+ var vala;
+ if ( !isLayout( order ) ) {
+ throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) );
+ }
+ if ( M < 0 ) {
+ throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', M ) );
+ }
+ if ( N < 0 ) {
+ throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', N ) );
+ }
+ if ( strideX === 0 ) {
+ throw new RangeError( format( 'invalid argument. Sixth argument must be non-zero. Value: `%d`.', strideX ) );
+ }
+ if ( strideY === 0 ) {
+ throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero. Value: `%d`.', strideY ) );
+ }
+ if ( isColumnMajor( order ) ) {
+ vala = M;
+ } else {
+ vala = N;
+ }
+ if ( LDA < max( 1, vala ) ) {
+ throw new RangeError( format( 'invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.', vala, LDA ) );
+ }
+ // Check if we can early return...
+ if ( M === 0 || N === 0 || alpha === 0.0 ) {
+ return A;
+ }
+ addon( resolve( order ), M, N, alpha, x, strideX, y, strideY, A, LDA );
+ return A;
+}
+
+
+// EXPORTS //
+
+module.exports = sger;
diff --git a/lib/node_modules/@stdlib/blas/base/sger/manifest.json b/lib/node_modules/@stdlib/blas/base/sger/manifest.json
new file mode 100644
index 000000000000..ae0ae6c048c2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/manifest.json
@@ -0,0 +1,485 @@
+{
+ "options": {
+ "task": "build",
+ "os": "linux",
+ "blas": "",
+ "wasm": false
+ },
+ "fields": [
+ {
+ "field": "src",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "include",
+ "resolve": true,
+ "relative": true
+ },
+ {
+ "field": "libraries",
+ "resolve": false,
+ "relative": false
+ },
+ {
+ "field": "libpath",
+ "resolve": true,
+ "relative": false
+ }
+ ],
+ "confs": [
+ {
+ "task": "build",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.f",
+ "./src/sger_f.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "linux",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.f",
+ "./src/sger_f.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "apple_accelerate_framework",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lblas"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "mac",
+ "blas": "openblas",
+ "wasm": false,
+ "src": [
+ "./src/sger_cblas.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [
+ "-lopenblas",
+ "-lpthread"
+ ],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/ndarray/base/assert/is-row-major"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/napi/export",
+ "@stdlib/napi/argv",
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-int32",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-strided-float32array2d",
+ "@stdlib/napi/argv-float",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "benchmark",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+ {
+ "task": "examples",
+ "os": "win",
+ "blas": "",
+ "wasm": false,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ },
+
+ {
+ "task": "build",
+ "os": "",
+ "blas": "",
+ "wasm": true,
+ "src": [
+ "./src/sger.c",
+ "./src/sger_ndarray.c"
+ ],
+ "include": [
+ "./include"
+ ],
+ "libraries": [],
+ "libpath": [],
+ "dependencies": [
+ "@stdlib/blas/base/shared",
+ "@stdlib/blas/base/xerbla",
+ "@stdlib/ndarray/base/assert/is-row-major",
+ "@stdlib/strided/base/stride2offset"
+ ]
+ }
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/package.json b/lib/node_modules/@stdlib/blas/base/sger/package.json
new file mode 100644
index 000000000000..0a86ad4f539d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@stdlib/blas/base/sger",
+ "version": "0.0.0",
+ "description": "Perform the rank 1 operation `A = α*x*y^T + A`.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "browser": "./lib/main.js",
+ "gypfile": true,
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "include": "./include",
+ "lib": "./lib",
+ "src": "./src",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "mathematics",
+ "math",
+ "blas",
+ "level 2",
+ "sger",
+ "linear",
+ "algebra",
+ "subroutines",
+ "array",
+ "ndarray",
+ "float32",
+ "float",
+ "float32array"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/Makefile b/lib/node_modules/@stdlib/blas/base/sger/src/Makefile
new file mode 100644
index 000000000000..7733b6180cb4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/Makefile
@@ -0,0 +1,70 @@
+#/
+# @license Apache-2.0
+#
+# Copyright (c) 2025 The Stdlib Authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#/
+
+# VARIABLES #
+
+ifndef VERBOSE
+ QUIET := @
+else
+ QUIET :=
+endif
+
+# Determine the OS ([1][1], [2][2]).
+#
+# [1]: https://en.wikipedia.org/wiki/Uname#Examples
+# [2]: http://stackoverflow.com/a/27776822/2225624
+OS ?= $(shell uname)
+ifneq (, $(findstring MINGW,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring MSYS,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring CYGWIN,$(OS)))
+ OS := WINNT
+else
+ifneq (, $(findstring Windows_NT,$(OS)))
+ OS := WINNT
+endif
+endif
+endif
+endif
+
+
+# RULES #
+
+#/
+# Removes generated files for building an add-on.
+#
+# @example
+# make clean-addon
+#/
+clean-addon:
+ $(QUIET) -rm -f *.o *.node
+
+.PHONY: clean-addon
+
+#/
+# Removes generated files.
+#
+# @example
+# make clean
+#/
+clean: clean-addon
+
+.PHONY: clean
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/addon.c b/lib/node_modules/@stdlib/blas/base/sger/src/addon.c
new file mode 100644
index 000000000000..923825029c97
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/addon.c
@@ -0,0 +1,97 @@
+
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/napi/export.h"
+#include "stdlib/napi/argv.h"
+#include "stdlib/napi/argv_int64.h"
+#include "stdlib/napi/argv_int32.h"
+#include "stdlib/napi/argv_float.h"
+#include "stdlib/napi/argv_strided_float32array.h"
+#include "stdlib/napi/argv_strided_float32array2d.h"
+#include
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 10 );
+
+ STDLIB_NAPI_ARGV_INT32( env, layout, argv, 0 );
+
+ STDLIB_NAPI_ARGV_INT64( env, M, argv, 1 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 2 );
+ STDLIB_NAPI_ARGV_INT64( env, LDA, argv, 9 );
+
+ STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 3 );
+
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 5 );
+ STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 7 );
+
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, M, strideX, argv, 4 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 6 );
+
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY2D( env, A, M, N, LDA, 1, argv, 8 );
+
+ API_SUFFIX(c_sger)( layout, M, N, alpha, X, strideX, Y, strideY, A, LDA );
+
+ return NULL;
+}
+
+/**
+* Receives JavaScript callback invocation data.
+*
+* @param env environment under which the function is invoked
+* @param info callback data
+* @return Node-API value
+*/
+static napi_value addon_method( napi_env env, napi_callback_info info ) {
+ STDLIB_NAPI_ARGV( env, info, argv, argc, 13 );
+
+ STDLIB_NAPI_ARGV_INT64( env, M, argv, 0 );
+ STDLIB_NAPI_ARGV_INT64( env, N, argv, 1 );
+
+ STDLIB_NAPI_ARGV_FLOAT( env, alpha, argv, 2 );
+
+ STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 4 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 5 );
+
+ STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 7 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetY, argv, 8 );
+
+ STDLIB_NAPI_ARGV_INT64( env, strideA1, argv, 10 );
+ STDLIB_NAPI_ARGV_INT64( env, strideA2, argv, 11 );
+ STDLIB_NAPI_ARGV_INT64( env, offsetA, argv, 12 );
+
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, X, M, strideX, argv, 3 );
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY( env, Y, N, strideY, argv, 6 );
+
+ STDLIB_NAPI_ARGV_STRIDED_FLOAT32ARRAY2D( env, A, M, N, strideA1, strideA2, argv, 9 );
+
+ API_SUFFIX(c_sger_ndarray)( M, N, alpha, X, strideX, offsetX, Y, strideY, offsetY, A, strideA1, strideA2, offsetA );
+
+ return NULL;
+}
+
+STDLIB_NAPI_MODULE_EXPORT_FCN_WITH_METHOD( addon, "ndarray", addon_method )
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/sger.c b/lib/node_modules/@stdlib/blas/base/sger/src/sger.c
new file mode 100644
index 000000000000..6478a943b699
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/sger.c
@@ -0,0 +1,97 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/blas/base/xerbla.h"
+#include "stdlib/strided/base/stride2offset.h"
+
+/**
+* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+*
+* @param layout storage layout
+* @param M number of rows in the matrix `A`
+* @param N number of columns in the matrix `A`
+* @param alpha scalar constant
+* @param X an `M` element vector
+* @param strideX stride length for `X`
+* @param Y an `N` element vector
+* @param strideY stride length for `Y`
+* @param A matrix of coefficients
+* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+*/
+void API_SUFFIX(c_sger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const float *Y, const CBLAS_INT strideY, float *A, const CBLAS_INT LDA ) {
+ CBLAS_INT vala;
+ CBLAS_INT sa1;
+ CBLAS_INT sa2;
+ CBLAS_INT ox;
+ CBLAS_INT oy;
+ CBLAS_INT v;
+
+ // Perform input argument validation...
+ if ( layout != CblasRowMajor && layout != CblasColMajor ) {
+ c_xerbla( 1, "c_sger", "Error: invalid argument. First argument must be a valid storage layout. Value: `%d`.", layout );
+ return;
+ }
+ if ( M < 0 ) {
+ c_xerbla( 2, "c_sger", "Error: invalid argument. Second argument must be a nonnegative integer. Value: `%d`.", M );
+ return;
+ }
+ if ( N < 0 ) {
+ c_xerbla( 3, "c_sger", "Error: invalid argument. Third argument must be a nonnegative integer. Value: `%d`.", N );
+ return;
+ }
+ if ( strideX == 0 ) {
+ c_xerbla( 6, "c_sger", "Error: invalid argument. Sixth argument must be nonzero. Value: `%d`.", strideX );
+ return;
+ }
+ if ( strideY == 0 ) {
+ c_xerbla( 8, "c_sger", "Error: invalid argument. Eighth argument must be nonzero. Value: `%d`.", strideX );
+ return;
+ }
+ if ( layout == CblasColMajor ) {
+ v = M;
+ } else {
+ v = N;
+ }
+ // max(1, v)
+ if ( v < 1 ) {
+ vala = 1;
+ } else {
+ vala = v;
+ }
+ if ( LDA < v ) {
+ c_xerbla( 10, "c_sger", "Error: invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.", vala, LDA );
+ return;
+ }
+ // Check whether we can avoid computation altogether...
+ if ( M == 0 || N == 0 || alpha == 0.0f ) {
+ return;
+ }
+ ox = stdlib_strided_stride2offset( N, strideX );
+ oy = stdlib_strided_stride2offset( N, strideY );
+ if ( layout == CblasColMajor ) {
+ sa1 = 1;
+ sa2 = LDA;
+ } else { // layout == CblasRowMajor
+ sa1 = LDA;
+ sa2 = 1;
+ }
+ API_SUFFIX(c_sger_ndarray)( M, N, alpha, X, strideX, ox, Y, strideY, oy, A, sa1, sa2, 0 );
+ return;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/sger.f b/lib/node_modules/@stdlib/blas/base/sger/src/sger.f
new file mode 100644
index 000000000000..afe6c2553a91
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/sger.f
@@ -0,0 +1,148 @@
+!>
+! @license Apache-2.0
+!
+! Copyright (c) 2025 The Stdlib Authors.
+!
+! Licensed under the Apache License, Version 2.0 (the "License");
+! you may not use this file except in compliance with the License.
+! You may obtain a copy of the License at
+!
+! http://www.apache.org/licenses/LICENSE-2.0
+!
+! Unless required by applicable law or agreed to in writing, software
+! distributed under the License is distributed on an "AS IS" BASIS,
+! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+! See the License for the specific language governing permissions and
+! limitations under the License.
+!<
+
+!> Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+!
+! ## Notes
+!
+! * Modified version of reference BLAS routine (version 3.12.0). Updated to "free form" Fortran 95.
+!
+! ## Authors
+!
+! * Univ. of Tennessee
+! * Univ. of California Berkeley
+! * Univ. of Colorado Denver
+! * NAG Ltd.
+!
+! ## History
+!
+! * Written on 22-October-1986.
+!
+! - Jack Dongarra, Argonne National Lab.
+! - Jermey Du Croz, Nag Central Office.
+! - Sven Hammarling, Nag Central Office.
+! - Richard Hanson, Sandia National Labs.
+!
+! ## License
+!
+! From :
+!
+! > The reference BLAS is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web. Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors.
+! >
+! > Like all software, it is copyrighted. It is not trademarked, but we do ask the following:
+! >
+! > * If you modify the source for these routines we ask that you change the name of the routine and comment the changes made to the original.
+! >
+! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support.
+!
+! @param {integer} M - number of rows in the matrix `A`
+! @param {integer} N - number of columns in the matrix `A`
+! @param {real} alpha - scalar constant
+! @param {Array} X - an `M` element vector
+! @param {integer} strideX - stride length for `X`
+! @param {Array} Y - an `N` element vector
+! @param {integer} strideY - stride length for `Y`
+! @param {Array} A - matrix of coefficients
+! @param {integer} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+!<
+subroutine sger( M, N, alpha, X, strideX, Y, strideY, A, LDA )
+ implicit none
+ ! ..
+ ! Internal parameters:
+ integer, parameter :: sp=kind(0.0) ! single-precision
+ ! ..
+ ! Scalar arguments:
+ real(sp) :: alpha
+ integer :: strideX, strideY, LDA, M, N
+ ! ..
+ ! Array arguments:
+ real(sp) :: A(LDA,*), X(*), Y(*)
+ ! ..
+ ! Local scalars:
+ real(sp) :: temp
+ integer :: i, info, ix, j, jy, kx
+ ! ..
+ ! External functions:
+ interface
+ subroutine xerbla( srname, info )
+ character*(*) :: srname
+ integer :: info
+ end subroutine xerbla
+ end interface
+ ! ..
+ ! Intrinsic functions:
+ intrinsic max
+ ! ..
+ ! Validate input arguments...
+ info = 0
+ if ( M < 0 ) then
+ info = 1
+ else if ( N < 0 ) then
+ info = 2
+ else if ( strideX == 0 ) then
+ info = 5
+ else if ( strideY == 0 ) then
+ info = 7
+ else if ( LDA < max( 1, M ) ) then
+ info = 9
+ end if
+ if ( info /= 0 ) then
+ call xerbla( 'sger ', info )
+ return
+ end if
+ ! ..
+ ! Check whether we can avoid computation altogether...
+ if ( M == 0 .OR. N == 0 .OR. alpha == 0.0 ) then
+ return
+ end if
+ ! ..
+ if ( strideY > 0 ) then
+ jy = 1
+ else
+ jy = 1 - ( (N-1) * strideY )
+ end if
+ if ( strideX == 1 ) then
+ do j = 1, N
+ if ( Y( jy ) /= 0.0 ) then
+ temp = alpha * Y( jy )
+ do i = 1, M
+ A( i, j ) = A( i, j ) + ( X( i ) * temp )
+ end do
+ end if
+ jy = jy + strideY
+ end do
+ else
+ if ( strideX > 0 ) then
+ kx = 1
+ else
+ kx = 1 - ( (M-1) * strideX )
+ end if
+ do j = 1, N
+ if ( Y( jy ) /= 0.0 ) then
+ temp = alpha * Y( jy )
+ ix = kx
+ do i = 1, M
+ A( i, j ) = A( i, j ) + ( X( ix ) * temp )
+ ix = ix + strideX
+ end do
+ end if
+ jy = jy + strideY
+ end do
+ end if
+ return
+end subroutine sger
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/sger_cblas.c b/lib/node_modules/@stdlib/blas/base/sger/src/sger_cblas.c
new file mode 100644
index 000000000000..c3d5fe7a6f5f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/sger_cblas.c
@@ -0,0 +1,39 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/sger_cblas.h"
+#include "stdlib/blas/base/shared.h"
+
+/**
+* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+*
+* @param layout storage layout
+* @param M number of rows in the matrix `A`
+* @param N number of columns in the matrix `A`
+* @param alpha scalar constant
+* @param X an `M` element vector
+* @param strideX stride length for `X`
+* @param Y an `N` element vector
+* @param strideY stride length for `Y`
+* @param A matrix of coefficients
+* @param LDA index of the first dimension of `A`
+*/
+void API_SUFFIX(c_sger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const float *Y, const CBLAS_INT strideY, float *A, const CBLAS_INT LDA ) {
+ API_SUFFIX(cblas_sger)( layout, M, N, alpha, X, strideX, Y, strideY, A, LDA );
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/sger_f.c b/lib/node_modules/@stdlib/blas/base/sger/src/sger_f.c
new file mode 100644
index 000000000000..d6dc0222dee2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/sger_f.c
@@ -0,0 +1,55 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/sger_fortran.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/blas/base/xerbla.h"
+
+/**
+* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+*
+* @param layout storage layout
+* @param M number of rows in the matrix `A`
+* @param N number of columns in the matrix `A`
+* @param alpha scalar constant
+* @param X an `M` element vector
+* @param strideX stride length for `X`
+* @param Y an `N` element vector
+* @param strideY stride length for `Y`
+* @param A matrix of coefficients
+* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
+*/
+void API_SUFFIX(c_sger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const float *Y, const CBLAS_INT strideY, float *A, const CBLAS_INT LDA ) {
+ extern int RowMajorStrg; // global flag
+
+ RowMajorStrg = 0;
+ if ( layout == CblasColMajor ) {
+ sger( &M, &N, &alpha, X, &strideX, Y, &strideY, A, &LDA );
+ return;
+ }
+ if ( layout == CblasRowMajor ) {
+ RowMajorStrg = 1;
+ sger( &N, &M, &alpha, Y, &strideY, X, &strideX, A, &LDA );
+ RowMajorStrg = 0;
+ return;
+ }
+ c_xerbla( 1, "c_sger", "Error: invalid argument. First argument must be a valid storage layout. Value: `%d`.", layout );
+ RowMajorStrg = 0;
+ return;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/src/sger_ndarray.c b/lib/node_modules/@stdlib/blas/base/sger/src/sger_ndarray.c
new file mode 100644
index 000000000000..1d0c189f8ee4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/src/sger_ndarray.c
@@ -0,0 +1,199 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include "stdlib/blas/base/sger.h"
+#include "stdlib/blas/base/shared.h"
+#include "stdlib/blas/base/xerbla.h"
+#include "stdlib/ndarray/base/assert/is_row_major.h"
+#include
+
+/**
+* Performs the rank 1 operation `A = alpha*x*y^T + A`, using alternative indexing semantics and where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix.
+*
+* ## Notes
+*
+* - To help motivate the use of loop interchange below, we first recognize that a matrix stored in row-major order is equivalent to storing the matrix's transpose in column-major order. For example, consider the following 2-by-3 matrix `A`
+*
+* ```tex
+* A = \begin{bmatrix}
+* 1 & 2 & 3 \\
+* 4 & 5 & 6
+* \end{bmatrix}
+* ```
+*
+* When stored in a linear buffer in column-major order, `A` becomes
+*
+* ```text
+* [ 1 4 2 5 3 6]
+* ```
+*
+* When stored in a linear buffer in row-major order, `A` becomes
+*
+* ```text
+* [ 1 2 3 4 5 6]
+* ```
+*
+* Now consider the transpose of `A`
+*
+* ```tex
+* A^T = \begin{bmatrix}
+* 1 & 4 \\
+* 2 & 5 \\
+* 3 & 6
+* \end{bmatrix}
+* ```
+*
+* When the transpose is stored in a linear buffer in column-major order, the transpose becomes
+*
+* ```text
+* [ 1 2 3 4 5 6 ]
+* ```
+*
+* Similarly, when stored in row-major order, the transpose becomes
+*
+* ```text
+* [ 1 4 2 5 3 6 ]
+* ```
+*
+* As may be observed, `A` stored in column-major order is equivalent to storing the transpose of `A` in row-major order, and storing `A` in row-major order is equivalent to storing the transpose of `A` in column-major order, and vice versa.
+*
+* Hence, we can interpret an `M` by `N` row-major matrix `B` as the matrix `A^T` stored in column-major order. In which case, we can derive an update equation for `B` as follows:
+*
+* ```tex
+* \begin{align*}
+* B &= A^T \\
+* &= (\alpha \bar{x} \bar{y}^T + A)^T \\
+* &= (\alpha \bar{x} \bar{y}^T)^T + A^T \\
+* &= \alpha (\bar{x} \bar{y}^T)^T + A^T \\
+* &= \alpha \bar{y} \bar{x}^T + A^T \\
+* &= \alpha \bar{y} \bar{x}^T + B
+* \end{align*}
+* ```
+*
+* Accordingly, we can reuse the same loop logic for column-major and row-major `A` by simply swapping `x` and `y` and `M` and `N` when `A` is row-major order. That is the essence of loop interchange.
+*
+* @param layout storage layout
+* @param M number of rows in the matrix `A`
+* @param N number of columns in the matrix `A`
+* @param alpha scalar constant
+* @param X an `M` element vector
+* @param strideX stride length for `X`
+* @param offsetX starting index for `X`
+* @param Y an `N` element vector
+* @param strideY stride length for `Y`
+* @param offsetY starting index for `Y`
+* @param A matrix of coefficients
+* @param strideA1 stride length of the first dimension of `A`
+* @param strideA2 stride length of the second dimension of `A`
+* @param offsetA starting index for `A`
+*/
+void API_SUFFIX(c_sger_ndarray)( const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, const float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY, float *A, const CBLAS_INT strideA1, const CBLAS_INT strideA2, const CBLAS_INT offsetA ) {
+ const float *x;
+ const float *y;
+ int64_t sa[ 2 ];
+ CBLAS_INT da0;
+ CBLAS_INT da1;
+ CBLAS_INT S0;
+ CBLAS_INT S1;
+ CBLAS_INT sx;
+ CBLAS_INT sy;
+ CBLAS_INT ox;
+ CBLAS_INT ia;
+ CBLAS_INT ix;
+ CBLAS_INT iy;
+ CBLAS_INT i0;
+ CBLAS_INT i1;
+ float tmp;
+
+ // Note on variable naming convention: S#, da#, ia#, i# where # corresponds to the loop number, with `0` being the innermost loop...
+
+ // Perform input argument validation...
+ if ( M < 0 ) {
+ c_xerbla( 1, "c_sger_ndarray", "Error: invalid argument. First argument must be a nonnegative integer. Value: `%d`.", M );
+ return;
+ }
+ if ( N < 0 ) {
+ c_xerbla( 2, "c_sger_ndarray", "Error: invalid argument. Second argument must be a nonnegative integer. Value: `%d`.", N );
+ return;
+ }
+ if ( strideX == 0 ) {
+ c_xerbla( 5, "c_sger_ndarray", "Error: invalid argument. Fifth argument must be a nonzero. Value: `%d`.", strideX );
+ return;
+ }
+ if ( strideY == 0 ) {
+ c_xerbla( 8, "c_sger_ndarray", "Error: invalid argument. Eighth argument must be a nonzero. Value: `%d`.", strideY );
+ return;
+ }
+ // Check whether we can avoid computation altogether...
+ if ( M == 0 || N == 0 || alpha == 0.0f ) {
+ return;
+ }
+ // Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
+ sa[ 0 ] = strideA1;
+ sa[ 1 ] = strideA2;
+ if ( stdlib_ndarray_is_row_major( 2, sa ) ) {
+ // For row-major matrices, the last dimension has the fastest changing index...
+ S0 = N;
+ S1 = M;
+ da0 = strideA2; // offset increment for innermost loop
+ da1 = strideA1 - ( S0*strideA2 ); // offset increment for outermost loop
+
+ // Swap the vectors...
+ x = Y;
+ y = X;
+
+ sx = strideY;
+ sy = strideX;
+
+ ox = offsetY;
+ iy = offsetX;
+ } else { // order === 'column-major'
+ // For column-major matrices, the first dimension has the fastest changing index...
+ S0 = M;
+ S1 = N;
+ da0 = strideA1; // offset increment for innermost loop
+ da1 = strideA2 - ( S0*strideA1 ); // offset increment for outermost loop
+
+ x = X;
+ y = Y;
+
+ sx = strideX;
+ sy = strideY;
+
+ ox = offsetX;
+ iy = offsetY;
+ }
+ ia = offsetA;
+ for ( i1 = 0; i1 < S1; i1++ ) {
+ // Check whether we can avoid the inner loop entirely...
+ if ( y[ iy ] == 0.0f ) {
+ ia += da0 * S0;
+ } else {
+ tmp = alpha * y[ iy ];
+ ix = ox;
+ for ( i0 = 0; i0 < S0; i0++ ) {
+ A[ ia ] += x[ ix ] * tmp;
+ ix += sx;
+ ia += da0;
+ }
+ }
+ iy += sy;
+ ia += da1;
+ }
+ return;
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major.json
new file mode 100644
index 000000000000..277c350146f0
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_complex_access_pattern.json
new file mode 100644
index 000000000000..c0b1f7e659f3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_complex_access_pattern.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 2.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": -2,
+ "strideA2": -8,
+ "offsetA": 22,
+ "A_out": [ 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oa.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oa.json
new file mode 100644
index 000000000000..0573891b4f3f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oa.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 1,
+ "A_out": [ 0.0, 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_ox.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_ox.json
new file mode 100644
index 000000000000..ac3db51d9545
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_ox.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 0.0, 0.0, 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 2,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oy.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oy.json
new file mode 100644
index 000000000000..d11a7ca06684
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_oy.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 0.0, 0.0, 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 2,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2.json
new file mode 100644
index 000000000000..fd11aac2b0e8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 6.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": 2,
+ "strideA2": 8,
+ "offsetA": 4,
+ "A_out": [ 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 12.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2n.json
new file mode 100644
index 000000000000..badbf19f9653
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1_sa2n.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 4.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": 2,
+ "strideA2": -8,
+ "offsetA": 20,
+ "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 6.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2.json
new file mode 100644
index 000000000000..ad6e61f2bcd2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": -2,
+ "strideA2": 8,
+ "offsetA": 6,
+ "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2n.json
new file mode 100644
index 000000000000..257125bbd7eb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_sa1n_sa2n.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": -2,
+ "strideA2": -8,
+ "offsetA": 22,
+ "A_out": [ 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_x_zeros.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_x_zeros.json
new file mode 100644
index 000000000000..7b48b4908fde
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_x_zeros.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 0.0, 0.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyn.json
new file mode 100644
index 000000000000..df5d1cf78f43
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyn.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyp.json
new file mode 100644
index 000000000000..33979ab2d0af
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xnyp.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyn.json
new file mode 100644
index 000000000000..96cb5e88b6c9
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyn.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyp.json
new file mode 100644
index 000000000000..33fbd18fdb62
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_xpyp.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_y_zeros.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_y_zeros.json
new file mode 100644
index 000000000000..3f7881dd3860
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/column_major_y_zeros.json
@@ -0,0 +1,22 @@
+{
+ "order": "column-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 0.0, 0.0, 0.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 2,
+ "strideA1": 1,
+ "strideA2": 2,
+ "offsetA": 0,
+ "A_out": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major.json
new file mode 100644
index 000000000000..2ab84ca7d4d3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_complex_access_pattern.json
new file mode 100644
index 000000000000..ba6c3ccb1a16
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_complex_access_pattern.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 2.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 0.0, 6.0, 0.0, 5.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 14,
+ "strideA1": -14,
+ "strideA2": -2,
+ "offsetA": 19,
+ "A_out": [ 0.0, 12.0, 0.0, 9.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 4.0, 0.0, 2.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oa.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oa.json
new file mode 100644
index 000000000000..cbc5b922d87e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oa.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 1,
+ "A_out": [ 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_ox.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_ox.json
new file mode 100644
index 000000000000..776f9aadfadb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_ox.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 0.0, 0.0, 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 2,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oy.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oy.json
new file mode 100644
index 000000000000..c95e6b470f60
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_oy.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 0.0, 0.0, 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 2,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2.json
new file mode 100644
index 000000000000..5ce43bf277a8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2.json
@@ -0,0 +1,58 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [
+ 999.0,
+ 999.0,
+ 3.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 1.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 5.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 999.0
+ ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": 8,
+ "strideA2": -2,
+ "offsetA": 6,
+ "A_out": [
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 12.0,
+ 999.0,
+ 9.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 999.0
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2n.json
new file mode 100644
index 000000000000..5ce43bf277a8
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1_sa2n.json
@@ -0,0 +1,58 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [
+ 999.0,
+ 999.0,
+ 3.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 1.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 5.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 999.0
+ ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": 8,
+ "strideA2": -2,
+ "offsetA": 6,
+ "A_out": [
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 12.0,
+ 999.0,
+ 9.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 999.0
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2.json
new file mode 100644
index 000000000000..2b6d599795cd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2.json
@@ -0,0 +1,62 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [
+ 999.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 999.0,
+ 5.0,
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 1.0,
+ 999.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 999.0,
+ 3.0,
+ 999.0,
+ 999.0
+ ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": -8,
+ "strideA2": 3,
+ "offsetA": 10,
+ "A_out": [
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 999.0,
+ 9.0,
+ 999.0,
+ 999.0,
+ 12.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 999.0
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2n.json
new file mode 100644
index 000000000000..f7cb88d30017
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_sa1n_sa2n.json
@@ -0,0 +1,58 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 2.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 5.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 3.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 1.0,
+ 999.0,
+ 999.0
+ ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 8,
+ "strideA1": -8,
+ "strideA2": -2,
+ "offsetA": 14,
+ "A_out": [
+ 999.0,
+ 999.0,
+ 12.0,
+ 999.0,
+ 9.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 999.0,
+ 999.0,
+ 6.0,
+ 999.0,
+ 4.0,
+ 999.0,
+ 2.0,
+ 999.0,
+ 999.0
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_x_zeros.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_x_zeros.json
new file mode 100644
index 000000000000..e677e3e2b655
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_x_zeros.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 0.0, 0.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 1.0, 1.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyn.json
new file mode 100644
index 000000000000..f158f9dc7d90
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyn.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyp.json
new file mode 100644
index 000000000000..7fb10bf73ee5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xnyp.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": -2,
+ "offsetX": 2,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyn.json
new file mode 100644
index 000000000000..66a5aedb4406
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyn.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": -2,
+ "offsetY": 4,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyp.json
new file mode 100644
index 000000000000..43f67e9fb316
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_xpyp.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 0.0, 1.0, 0.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ],
+ "strideY": 2,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_y_zeros.json b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_y_zeros.json
new file mode 100644
index 000000000000..3aadc0dd60ca
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/fixtures/row_major_y_zeros.json
@@ -0,0 +1,22 @@
+{
+ "order": "row-major",
+ "M": 2,
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 1.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 0.0, 0.0, 0.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ],
+ "A_mat": [
+ [ 1.0, 2.0, 3.0 ],
+ [ 4.0, 5.0, 6.0 ]
+ ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/test.js b/lib/node_modules/@stdlib/blas/base/sger/test/test.js
new file mode 100644
index 000000000000..35cd7f5dfebe
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var sger = require( './../lib' );
+
+
+// VARIABLES //
+
+var opts = {
+ 'skip': IS_BROWSER
+};
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof sger, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
+ t.strictEqual( typeof sger.ndarray, 'function', 'method is a function' );
+ t.end();
+});
+
+tape( 'if a native implementation is available, the main export is the native implementation', opts, function test( t ) {
+ var sger = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( sger, mock, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return mock;
+ }
+
+ function mock() {
+ // Mock...
+ }
+});
+
+tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) {
+ var sger;
+ var main;
+
+ main = require( './../lib/sger.js' );
+
+ sger = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( sger, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.js
new file mode 100644
index 000000000000..9a1e063efa32
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.js
@@ -0,0 +1,968 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var sger = require( './../lib/ndarray.js' );
+
+
+// FIXTURES //
+
+var cm = require( './fixtures/column_major.json' );
+var coa = require( './fixtures/column_major_oa.json' );
+var cox = require( './fixtures/column_major_ox.json' );
+var coy = require( './fixtures/column_major_oy.json' );
+var cxpyp = require( './fixtures/column_major_xpyp.json' );
+var cxnyp = require( './fixtures/column_major_xnyp.json' );
+var cxpyn = require( './fixtures/column_major_xpyn.json' );
+var cxnyn = require( './fixtures/column_major_xnyn.json' );
+var csa1sa2 = require( './fixtures/column_major_sa1_sa2.json' );
+var csa1nsa2 = require( './fixtures/column_major_sa1n_sa2.json' );
+var csa1sa2n = require( './fixtures/column_major_sa1_sa2n.json' );
+var csa1nsa2n = require( './fixtures/column_major_sa1n_sa2n.json' );
+var ccap = require( './fixtures/column_major_complex_access_pattern.json' );
+var cx0 = require( './fixtures/column_major_x_zeros.json' );
+var cy0 = require( './fixtures/column_major_y_zeros.json' );
+
+var rm = require( './fixtures/row_major.json' );
+var roa = require( './fixtures/row_major_oa.json' );
+var rox = require( './fixtures/row_major_ox.json' );
+var roy = require( './fixtures/row_major_oy.json' );
+var rxpyp = require( './fixtures/row_major_xpyp.json' );
+var rxnyp = require( './fixtures/row_major_xnyp.json' );
+var rxpyn = require( './fixtures/row_major_xpyn.json' );
+var rxnyn = require( './fixtures/row_major_xnyn.json' );
+var rsa1sa2 = require( './fixtures/row_major_sa1_sa2.json' );
+var rsa1nsa2 = require( './fixtures/row_major_sa1n_sa2.json' );
+var rsa1sa2n = require( './fixtures/row_major_sa1_sa2n.json' );
+var rsa1nsa2n = require( './fixtures/row_major_sa1n_sa2n.json' );
+var rcap = require( './fixtures/row_major_complex_access_pattern.json' );
+var rx0 = require( './fixtures/row_major_x_zeros.json' );
+var ry0 = require( './fixtures/row_major_y_zeros.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof sger, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 13', function test( t ) {
+ t.strictEqual( sger.length, 13, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided an invalid first argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( value, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid second argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, value, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid fifth argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, data.N, data.alpha, new Float32Array( data.x ), value, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid eighth argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), value, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (row-major)', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (column-major)', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ry0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cy0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying the strides of the first and second dimensions of `A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1sa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying the strides of the first and second dimensions of `A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1sa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the first dimension of `A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1nsa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the first dimension of `A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1nsa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the second dimension of `A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1sa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the second dimension of `A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1sa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides for `A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1nsa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides for `A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1nsa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = roa;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = coa;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying negative strides for `x` and `y` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying negative strides for `x` and `y` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `x` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rox;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `x` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cox;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `y` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = roy;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `y` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = coy;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rcap;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ccap;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.native.js b/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.native.js
new file mode 100644
index 000000000000..d59fb3a31f3a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/test.ndarray.native.js
@@ -0,0 +1,977 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var sger = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) );
+var opts = {
+ 'skip': ( sger instanceof Error )
+};
+
+
+// FIXTURES //
+
+var cm = require( './fixtures/column_major.json' );
+var coa = require( './fixtures/column_major_oa.json' );
+var cox = require( './fixtures/column_major_ox.json' );
+var coy = require( './fixtures/column_major_oy.json' );
+var cxpyp = require( './fixtures/column_major_xpyp.json' );
+var cxnyp = require( './fixtures/column_major_xnyp.json' );
+var cxpyn = require( './fixtures/column_major_xpyn.json' );
+var cxnyn = require( './fixtures/column_major_xnyn.json' );
+var csa1sa2 = require( './fixtures/column_major_sa1_sa2.json' );
+var csa1nsa2 = require( './fixtures/column_major_sa1n_sa2.json' );
+var csa1sa2n = require( './fixtures/column_major_sa1_sa2n.json' );
+var csa1nsa2n = require( './fixtures/column_major_sa1n_sa2n.json' );
+var ccap = require( './fixtures/column_major_complex_access_pattern.json' );
+var cx0 = require( './fixtures/column_major_x_zeros.json' );
+var cy0 = require( './fixtures/column_major_y_zeros.json' );
+
+var rm = require( './fixtures/row_major.json' );
+var roa = require( './fixtures/row_major_oa.json' );
+var rox = require( './fixtures/row_major_ox.json' );
+var roy = require( './fixtures/row_major_oy.json' );
+var rxpyp = require( './fixtures/row_major_xpyp.json' );
+var rxnyp = require( './fixtures/row_major_xnyp.json' );
+var rxpyn = require( './fixtures/row_major_xpyn.json' );
+var rxnyn = require( './fixtures/row_major_xnyn.json' );
+var rsa1sa2 = require( './fixtures/row_major_sa1_sa2.json' );
+var rsa1nsa2 = require( './fixtures/row_major_sa1n_sa2.json' );
+var rsa1sa2n = require( './fixtures/row_major_sa1_sa2n.json' );
+var rsa1nsa2n = require( './fixtures/row_major_sa1n_sa2n.json' );
+var rcap = require( './fixtures/row_major_complex_access_pattern.json' );
+var rx0 = require( './fixtures/row_major_x_zeros.json' );
+var ry0 = require( './fixtures/row_major_y_zeros.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof sger, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 13', opts, function test( t ) {
+ t.strictEqual( sger.length, 13, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided an invalid first argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( value, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid second argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, value, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid fifth argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, data.N, data.alpha, new Float32Array( data.x ), value, data.offsetX, new Float32Array( data.y ), data.strideY, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid eighth argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, data.offsetX, new Float32Array( data.y ), value, data.offsetY, new Float32Array( data.A ), data.strideA1, data.strideA2, data.offsetA );
+ };
+ }
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (row-major)', opts, function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (column-major)', opts, function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ry0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cy0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying the strides of the first and second dimensions of `A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1sa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying the strides of the first and second dimensions of `A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1sa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the first dimension of `A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1nsa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the first dimension of `A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1nsa2;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the second dimension of `A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1sa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports a negative stride for the second dimension of `A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1sa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides for `A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rsa1nsa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports negative strides for `A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = csa1nsa2n;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = roa;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = coa;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying negative strides for `x` and `y` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying negative strides for `x` and `y` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `x` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rox;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `x` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cox;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `y` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = roy;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying an offset parameter for `y` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = coy;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rcap;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ccap;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.js b/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.js
new file mode 100644
index 000000000000..04b1eba25a47
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.js
@@ -0,0 +1,653 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var sger = require( './../lib/sger.js' );
+
+
+// FIXTURES //
+
+var cm = require( './fixtures/column_major.json' );
+var cxpyp = require( './fixtures/column_major_xpyp.json' );
+var cxnyp = require( './fixtures/column_major_xnyp.json' );
+var cxpyn = require( './fixtures/column_major_xpyn.json' );
+var cxnyn = require( './fixtures/column_major_xnyn.json' );
+var cx0 = require( './fixtures/column_major_x_zeros.json' );
+var cy0 = require( './fixtures/column_major_y_zeros.json' );
+
+var rm = require( './fixtures/row_major.json' );
+var rxpyp = require( './fixtures/row_major_xpyp.json' );
+var rxnyp = require( './fixtures/row_major_xnyp.json' );
+var rxpyn = require( './fixtures/row_major_xpyn.json' );
+var rxnyn = require( './fixtures/row_major_xnyn.json' );
+var rx0 = require( './fixtures/row_major_x_zeros.json' );
+var ry0 = require( './fixtures/row_major_y_zeros.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof sger, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 10', function test( t ) {
+ t.strictEqual( sger.length, 10, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided an invalid first argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 'foo',
+ 'bar',
+ 'beep',
+ 'boop'
+ ];
+
+ 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() {
+ sger( value, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid second argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, value, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid third argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, value, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid sixth argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), value, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid eighth argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), value, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid tenth argument', function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -3,
+ -2,
+ -1,
+ 0,
+ 1
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), value );
+ };
+ }
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (row-major)', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (column-major)', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ry0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cy0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.native.js b/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.native.js
new file mode 100644
index 000000000000..2dec635ddbb3
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/sger/test/test.sger.native.js
@@ -0,0 +1,662 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2025 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var resolve = require( 'path' ).resolve;
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var tryRequire = require( '@stdlib/utils/try-require' );
+
+
+// VARIABLES //
+
+var sger = tryRequire( resolve( __dirname, './../lib/sger.native.js' ) );
+var opts = {
+ 'skip': ( sger instanceof Error )
+};
+
+
+// FIXTURES //
+
+var cm = require( './fixtures/column_major.json' );
+var cxpyp = require( './fixtures/column_major_xpyp.json' );
+var cxnyp = require( './fixtures/column_major_xnyp.json' );
+var cxpyn = require( './fixtures/column_major_xpyn.json' );
+var cxnyn = require( './fixtures/column_major_xnyn.json' );
+var cx0 = require( './fixtures/column_major_x_zeros.json' );
+var cy0 = require( './fixtures/column_major_y_zeros.json' );
+
+var rm = require( './fixtures/row_major.json' );
+var rxpyp = require( './fixtures/row_major_xpyp.json' );
+var rxnyp = require( './fixtures/row_major_xnyp.json' );
+var rxpyn = require( './fixtures/row_major_xpyn.json' );
+var rxnyn = require( './fixtures/row_major_xnyn.json' );
+var rx0 = require( './fixtures/row_major_x_zeros.json' );
+var ry0 = require( './fixtures/row_major_y_zeros.json' );
+
+
+// TESTS //
+
+tape( 'main export is a function', opts, function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof sger, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 10', opts, function test( t ) {
+ t.strictEqual( sger.length, 10, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function throws an error if provided an invalid first argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 'foo',
+ 'bar',
+ 'beep',
+ 'boop'
+ ];
+
+ 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() {
+ sger( value, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid second argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, value, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid third argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -1,
+ -2,
+ -3
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, value, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid sixth argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), value, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid eighth argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ 0
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), value, new Float32Array( data.A ), data.LDA );
+ };
+ }
+});
+
+tape( 'the function throws an error if provided an invalid tenth argument', opts, function test( t ) {
+ var values;
+ var data;
+ var i;
+
+ data = rm;
+
+ values = [
+ -3,
+ -2,
+ -1,
+ 0,
+ 1
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ sger( data.order, data.M, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), value );
+ };
+ }
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (row-major)', opts, function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix (column-major)', opts, function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ out = sger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cm;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = sger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `x` contains only zeros, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cx0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ry0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'if `y` contains only zeros, the function returns the input matrix unchanged (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cy0;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying `x` and `y` strides (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `x` stride (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyp;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports specifying a negative `y` stride (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxpyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (row-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the function supports complex access patterns (column-major)', opts, function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cxnyn;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = sger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( out, expected, 'returns expected value' );
+ t.end();
+});