[ 3.0, 6.0, 9.0, 0.0, 9.0, 14.0, 0.0, 0.0, 19.0 ]
+*/
+function ssyr2( order, uplo, N, alpha, x, strideX, y, strideY, A, LDA ) {
+ 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 ( !isMatrixTriangle( uplo ) ) {
+ throw new TypeError( format( 'invalid argument. Second argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) );
+ }
+ 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`.', strideX ) );
+ }
+ if ( LDA < max( 1, N ) ) {
+ throw new RangeError( format( 'invalid argument. Tenth argument must be greater than or equal to max(1,%d). Value: `%d`.', N, LDA ) );
+ }
+ if ( N === 0 || alpha === 0.0 ) {
+ return A;
+ }
+ if ( order === 'column-major' ) {
+ sa1 = 1;
+ sa2 = LDA;
+ } else { // order === 'row-major'
+ sa1 = LDA;
+ sa2 = 1;
+ }
+ ox = stride2offset( N, strideX );
+ oy = stride2offset( N, strideY );
+ return base( uplo, N, alpha, x, strideX, ox, y, strideY, oy, A, sa1, sa2, 0 ); // eslint-disable-line max-len
+}
+
+
+// EXPORTS //
+
+module.exports = ssyr2;
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/package.json b/lib/node_modules/@stdlib/blas/base/ssyr2/package.json
new file mode 100644
index 00000000000..cf7b13d10bb
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "@stdlib/blas/base/ssyr2",
+ "version": "0.0.0",
+ "description": "Perform the symmetric rank 2 operation `A = α*x*y^T + α*y*x^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",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "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",
+ "ssyr2",
+ "linear",
+ "algebra",
+ "subroutines",
+ "array",
+ "ndarray",
+ "float32",
+ "float",
+ "float32array"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_complex_access_pattern.json
new file mode 100644
index 00000000000..f6257986814
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_complex_access_pattern.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": -1,
+ "offsetX": 2,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 2.0, 999.0, 3.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 1.0, 999.0, 2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 1.0 ],
+ "strideA1": -2,
+ "strideA2": -10,
+ "offsetA": 29,
+ "A_out": [ 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 6.0, 999.0, 9.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 9.0, 999.0, 14.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 19.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_l.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_l.json
new file mode 100644
index 00000000000..781a5a56fc1
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_l.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "lower",
+ "N": 3,
+ "alpha": 2.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 1.0, 1.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 5.0, 9.0, 13.0, 0.0, 18.0, 26.0, 0.0, 0.0, 39.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_oa.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_oa.json
new file mode 100644
index 00000000000..b01a1efbe2a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_oa.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "lower",
+ "N": 3,
+ "alpha": 2.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 1.0, 1.0, 1.0, 999.0, 999.0, 0.0, 2.0, 2.0, 999.0, 999.0, 0.0, 0.0, 3.0, 999.0 ],
+ "strideA1": 1,
+ "strideA2": 5,
+ "offsetA": 1,
+ "A_out": [ 999.0, 5.0, 9.0, 13.0, 999.0, 999.0, 0.0, 18.0, 26.0, 999.0, 999.0, 0.0, 0.0, 39.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2.json
new file mode 100644
index 00000000000..62cdc5b269d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, 999.0, 1.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 2.0, 999.0, 1.0 ],
+ "strideA1": 2,
+ "strideA2": 10,
+ "offsetA": 5,
+ "A_out": [ 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 6.0, 999.0, 9.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 9.0, 999.0, 14.0, 999.0, 19.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2n.json
new file mode 100644
index 00000000000..d77b0e2955d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1_sa2n.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 2.0, 999.0, 1.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, 999.0, 1.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 0.0, 999.0, 0.0 ],
+ "strideA1": 2,
+ "strideA2": -10,
+ "offsetA": 25,
+ "A_out": [ 999.0, 999.0, 999.0, 999.0, 999.0, 9.0, 999.0, 14.0, 999.0, 19.0, 999.0, 999.0, 999.0, 999.0, 999.0, 6.0, 999.0, 9.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 0.0, 999.0, 0.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2.json
new file mode 100644
index 00000000000..bd1fea14ca2
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 1.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 1.0, 999.0, 2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 2.0, 999.0, 3.0 ],
+ "strideA1": -2,
+ "strideA2": 10,
+ "offsetA": 9,
+ "A_out": [ 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 3.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 9.0, 999.0, 6.0, 999.0, 999.0, 999.0, 999.0, 999.0, 19.0, 999.0, 14.0, 999.0, 9.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2n.json
new file mode 100644
index 00000000000..32e3298705a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_sa1n_sa2n.json
@@ -0,0 +1,17 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 2.0, 999.0, 3.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 1.0, 999.0, 2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 1.0 ],
+ "strideA1": -2,
+ "strideA2": -10,
+ "offsetA": 29,
+ "A_out": [ 999.0, 999.0, 999.0, 999.0, 999.0, 19.0, 999.0, 14.0, 999.0, 9.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 9.0, 999.0, 6.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 3.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_u.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_u.json
new file mode 100644
index 00000000000..fac00d3bf1c
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_u.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 3.0, 0.0, 0.0, 6.0, 9.0, 0.0, 9.0, 14.0, 19.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyn.json
new file mode 100644
index 00000000000..790473bbd53
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyn.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": -2,
+ "offsetX": 4,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 31.0, 0.0, 0.0, 21.0, 13.0, 0.0, 11.0, 7.0, 3.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyp.json
new file mode 100644
index 00000000000..3cbe3d71e9a
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xnyp.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": -2,
+ "offsetX": 4,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 11.0, 0.0, 0.0, 15.0, 13.0, 0.0, 19.0, 13.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyn.json
new file mode 100644
index 00000000000..072dcef02fc
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyn.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 7.0, 0.0, 0.0, 13.0, 13.0, 0.0, 19.0, 15.0, 11.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyp.json
new file mode 100644
index 00000000000..d8685725d61
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/column_major_xpyp.json
@@ -0,0 +1,18 @@
+{
+ "order": "column-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 0.0, 0.0, 2.0, 1.0, 0.0, 3.0, 2.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 1,
+ "strideA2": 3,
+ "offsetA": 0,
+ "A_out": [ 3.0, 0.0, 0.0, 7.0, 13.0, 0.0, 11.0, 21.0, 31.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_complex_access_pattern.json
new file mode 100644
index 00000000000..5f837f8085e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_complex_access_pattern.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": -1,
+ "offsetX": 2,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 999.0, 1.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, 999.0, 1.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 2.0, 999.0, 1.0, 999.0 ],
+ "strideA1": -14,
+ "strideA2": -2,
+ "offsetA": 33,
+ "A_out": [ 999.0, 3.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 6.0, 999.0, 9.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 9.0, 999.0, 14.0, 999.0, 19.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_l.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_l.json
new file mode 100644
index 00000000000..c012cf3c408
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_l.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "lower",
+ "N": 3,
+ "alpha": 2.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 0.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0, 3.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 5.0, 0.0, 0.0, 9.0, 18.0, 0.0, 13.0, 26.0, 39.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_oa.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_oa.json
new file mode 100644
index 00000000000..719ee5a0d02
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_oa.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "lower",
+ "N": 3,
+ "alpha": 2.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 999.0, 999.0, 1.0, 0.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0, 3.0, 999.0, 999.0, 999.0 ],
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 3,
+ "A_out": [ 999.0, 999.0, 999.0, 5.0, 0.0, 0.0, 9.0, 18.0, 0.0, 13.0, 26.0, 39.0, 999.0, 999.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2.json
new file mode 100644
index 00000000000..fca54b56fe4
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 1.0, 999.0, 2.0, 999.0, 3.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 1.0, 999.0, 2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 1.0, 999.0 ],
+ "strideA1": 14,
+ "strideA2": 2,
+ "offsetA": 1,
+ "A_out": [ 999.0, 3.0, 999.0, 6.0, 999.0, 9.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 9.0, 999.0, 14.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 0.0, 999.0, 19.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2n.json
new file mode 100644
index 00000000000..b61992d216b
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1_sa2n.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 3.0, 999.0, 2.0, 999.0, 1.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, 999.0, 1.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 0.0, 999.0, 0.0, 999.0 ],
+ "strideA1": 14,
+ "strideA2": -2,
+ "offsetA": 5,
+ "A_out": [ 999.0, 9.0, 999.0, 6.0, 999.0, 3.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 14.0, 999.0, 9.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 19.0, 999.0, 0.0, 999.0, 0.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2.json
new file mode 100644
index 00000000000..d57c31d8449
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 0.0, 999.0, 0.0, 999.0, 1.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 1.0, 999.0, 2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 999.0, 2.0, 999.0, 3.0, 999.0 ],
+ "strideA1": -14,
+ "strideA2": 2,
+ "offsetA": 29,
+ "A_out": [ 999.0, 0.0, 999.0, 0.0, 999.0, 19.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 999.0, 9.0, 999.0, 14.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 6.0, 999.0, 9.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2n.json
new file mode 100644
index 00000000000..7233e480e28
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_sa1n_sa2n.json
@@ -0,0 +1,17 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 999.0, 1.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, 999.0, 1.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 999.0, 2.0, 999.0, 1.0, 999.0 ],
+ "strideA1": -14,
+ "strideA2": -2,
+ "offsetA": 33,
+ "A_out": [ 999.0, 19.0, 999.0, 0.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 14.0, 999.0, 9.0, 999.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 9.0, 999.0, 6.0, 999.0, 3.0, 999.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_u.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_u.json
new file mode 100644
index 00000000000..b499e7cb6e5
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_u.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0 ],
+ "strideX": 1,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 3.0, 6.0, 9.0, 0.0, 9.0, 14.0, 0.0, 0.0, 19.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyn.json
new file mode 100644
index 00000000000..95d3b0a50dd
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyn.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": -2,
+ "offsetX": 4,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 31.0, 21.0, 11.0, 0.0, 13.0, 7.0, 0.0, 0.0, 3.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyp.json
new file mode 100644
index 00000000000..68d29ef3823
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xnyp.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": -2,
+ "offsetX": 4,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 11.0, 15.0, 19.0, 0.0, 13.0, 13.0, 0.0, 0.0, 7.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyn.json
new file mode 100644
index 00000000000..b1bf41bbbff
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyn.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": -1,
+ "offsetY": 2,
+ "A": [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 7.0, 13.0, 19.0, 0.0, 13.0, 15.0, 0.0, 0.0, 11.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyp.json
new file mode 100644
index 00000000000..f9a3880cb2e
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/fixtures/row_major_xpyp.json
@@ -0,0 +1,18 @@
+{
+ "order": "row-major",
+ "uplo": "upper",
+ "N": 3,
+ "alpha": 1.0,
+ "x": [ 1.0, 2.0, 3.0, 4.0, 5.0 ],
+ "strideX": 2,
+ "offsetX": 0,
+ "y": [ 1.0, 2.0, 3.0 ],
+ "strideY": 1,
+ "offsetY": 0,
+ "A": [ 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 0.0, 0.0, 1.0 ],
+ "lda": 3,
+ "strideA1": 3,
+ "strideA2": 1,
+ "offsetA": 0,
+ "A_out": [ 3.0, 7.0, 11.0, 0.0, 13.0, 21.0, 0.0, 0.0, 31.0 ]
+}
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.js b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.js
new file mode 100644
index 00000000000..334ed8b828f
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.js
@@ -0,0 +1,82 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var proxyquire = require( 'proxyquire' );
+var IS_BROWSER = require( '@stdlib/assert/is-browser' );
+var ssyr2 = 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 ssyr2, '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 ssyr2.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 ssyr2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( ssyr2, 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 ssyr2;
+ var main;
+
+ main = require( './../lib/ssyr2.js' );
+
+ ssyr2 = proxyquire( './../lib', {
+ '@stdlib/utils/try-require': tryRequire
+ });
+
+ t.strictEqual( ssyr2, main, 'returns expected value' );
+ t.end();
+
+ function tryRequire() {
+ return new Error( 'Cannot find module' );
+ }
+});
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ndarray.js
new file mode 100644
index 00000000000..8bb9e87e537
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ndarray.js
@@ -0,0 +1,823 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var ssyr2 = require( './../lib/ndarray.js' );
+
+
+// FIXTURES //
+
+var ru = require( './fixtures/row_major_u.json' );
+var rl = require( './fixtures/row_major_l.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 roa = require( './fixtures/row_major_oa.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 cu = require( './fixtures/column_major_u.json' );
+var cl = require( './fixtures/column_major_l.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 coa = require( './fixtures/column_major_oa.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' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof ssyr2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 13', function test( t ) {
+ t.strictEqual( ssyr2.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 = ru;
+
+ 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() {
+ ssyr2( 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 = ru;
+
+ 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() {
+ ssyr2( data.uplo, 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 = ru;
+
+ 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() {
+ ssyr2( data.uplo, 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 = ru;
+
+ 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() {
+ ssyr2( data.uplo, 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 performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, upper)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ru;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (column-major, upper)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cu;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, lower)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (column-major, lower)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix `A`', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ru;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = ssyr2( data.uplo, 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 `N` is zero or the scalar constant is zero, the function returns the input matrix `A` unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = ssyr2( data.uplo, 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( a, expected, 'returns expected value' );
+
+ out = ssyr2( data.uplo, 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( a, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `N` is zero or the scalar constant is zero, the function returns the input matrix `A` unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = ssyr2( data.uplo, 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( a, expected, 'returns expected value' );
+
+ out = ssyr2( data.uplo, 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( a, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying the strides for the first and the 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function supports specifying the strides for the first and the 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an `A` offset (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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function supports specifying an `A` offset (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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.uplo, 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' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ssyr2.js b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ssyr2.js
new file mode 100644
index 00000000000..9c5bbe8e65d
--- /dev/null
+++ b/lib/node_modules/@stdlib/blas/base/ssyr2/test/test.ssyr2.js
@@ -0,0 +1,589 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2024 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+/* eslint-disable max-len */
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var Float32Array = require( '@stdlib/array/float32' );
+var EPS = require( '@stdlib/constants/float32/eps' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var ssyr2 = require( './../lib/ssyr2.js' );
+
+
+// FIXTURES //
+
+var ru = require( './fixtures/row_major_u.json' );
+var rl = require( './fixtures/row_major_l.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 cu = require( './fixtures/column_major_u.json' );
+var cl = require( './fixtures/column_major_l.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' );
+
+
+// FUNCTIONS //
+
+/**
+* Tests for element-wise approximate equality.
+*
+* @private
+* @param {Object} t - test object
+* @param {Collection} actual - actual values
+* @param {Collection} expected - expected values
+* @param {number} rtol - relative tolerance
+*/
+function isApprox( t, actual, expected, rtol ) {
+ var delta;
+ var tol;
+ var i;
+
+ t.strictEqual( actual.length, expected.length, 'returns expected value' );
+ for ( i = 0; i < expected.length; i++ ) {
+ if ( actual[ i ] === expected[ i ] ) {
+ t.strictEqual( actual[ i ], expected[ i ], 'returns expected value' );
+ } else {
+ delta = abs( actual[ i ] - expected[ i ] );
+ tol = rtol * EPS * abs( expected[ i ] );
+ t.ok( delta <= tol, 'within tolerance. actual: '+actual[ i ]+'. expected: '+expected[ i ]+'. delta: '+delta+'. tol: '+tol+'.' );
+ }
+ }
+}
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof ssyr2, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function has an arity of 10', function test( t ) {
+ t.strictEqual( ssyr2.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 = ru;
+
+ 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() {
+ ssyr2( value, data.uplo, 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 = ru;
+
+ 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() {
+ ssyr2( 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 = ru;
+
+ 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() {
+ ssyr2( data.order, data.uplo, 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 = ru;
+
+ 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() {
+ ssyr2( data.order, data.uplo, 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 = ru;
+
+ 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() {
+ ssyr2( data.order, data.uplo, 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 = ru;
+
+ values = [
+ 2,
+ 1,
+ 0,
+ -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() {
+ ssyr2( data.order, data.uplo, data.N, data.alpha, new Float32Array( data.x ), data.strideX, new Float32Array( data.y ), data.strideY, new Float32Array( data.A ), value );
+ };
+ }
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, upper)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ru;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (column-major, upper)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cu;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (row-major, lower)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function performs the symmetric rank 2 operation `A = α*x*y^T + α*y*x^T + A` (column-major, lower)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A_out );
+
+ out = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function returns a reference to the input matrix `A`', function test( t ) {
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = ru;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ out = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `N` is zero or the scalar constant is zero, the function returns the input matrix `A` unchanged (row-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = rl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = ssyr2( data.order, data.uplo, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( a, expected, 'returns expected value' );
+
+ out = ssyr2( data.order, data.uplo, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( a, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'if `N` is zero or the scalar constant is zero, the function returns the input matrix `A` unchanged (column-major)', function test( t ) {
+ var expected;
+ var data;
+ var out;
+ var a;
+ var x;
+ var y;
+
+ data = cl;
+
+ a = new Float32Array( data.A );
+ x = new Float32Array( data.x );
+ y = new Float32Array( data.y );
+
+ expected = new Float32Array( data.A );
+
+ out = ssyr2( data.order, data.uplo, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( a, expected, 'returns expected value' );
+
+ out = ssyr2( data.order, data.uplo, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ t.deepEqual( a, expected, 'returns expected value' );
+
+ t.end();
+});
+
+tape( 'the function supports specifying 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
+
+tape( 'the function supports specifying 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ 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 = ssyr2( data.order, data.uplo, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda );
+ t.strictEqual( out, a, 'returns expected value' );
+ isApprox( t, a, expected, 2.0 );
+
+ t.end();
+});
diff --git a/lib/node_modules/@stdlib/blas/ext/base/sapxsum/manifest.json b/lib/node_modules/@stdlib/blas/ext/base/sapxsum/manifest.json
index b47a3000a77..c4a950608ab 100644
--- a/lib/node_modules/@stdlib/blas/ext/base/sapxsum/manifest.json
+++ b/lib/node_modules/@stdlib/blas/ext/base/sapxsum/manifest.json
@@ -41,9 +41,9 @@
"@stdlib/blas/ext/base/sapxsumkbn",
"@stdlib/napi/export",
"@stdlib/napi/argv",
- "@stdlib/napi/argv_int64",
- "@stdlib/napi/argv_strided_float32array",
- "@stdlib/napi/argv_float"
+ "@stdlib/napi/argv-int64",
+ "@stdlib/napi/argv-strided-float32array",
+ "@stdlib/napi/argv-float"
]
},
{
diff --git a/lib/node_modules/@stdlib/blas/ext/base/sapxsum/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/sapxsum/src/addon.c
index adc8eccf26c..70d6754c744 100644
--- a/lib/node_modules/@stdlib/blas/ext/base/sapxsum/src/addon.c
+++ b/lib/node_modules/@stdlib/blas/ext/base/sapxsum/src/addon.c
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-#include "stdlib/blas/base/sapxsum.h"
+#include "stdlib/blas/ext/base/sapxsum.h"
#include "stdlib/napi/export.h"
#include "stdlib/napi/argv.h"
#include "stdlib/napi/argv_float.h"
diff --git a/lib/node_modules/@stdlib/lapack/base/README.md b/lib/node_modules/@stdlib/lapack/base/README.md
index bb196bd19aa..79e59692499 100644
--- a/lib/node_modules/@stdlib/lapack/base/README.md
+++ b/lib/node_modules/@stdlib/lapack/base/README.md
@@ -46,6 +46,7 @@ The namespace contains the following:
- [`dlacpy( order, uplo, M, N, A, LDA, B, LDB )`][@stdlib/lapack/base/dlacpy]: copy all or part of a matrix `A` to another matrix `B`.
+- [`dlassq( N, X, strideX, scale, sumsq )`][@stdlib/lapack/base/dlassq]: return an updated sum of squares represented in scaled form.
- [`dlaswp( N, A, LDA, k1, k2, IPIV, incx )`][@stdlib/lapack/base/dlaswp]: perform a series of row interchanges on an input matrix.
- [`dpttrf( N, D, E )`][@stdlib/lapack/base/dpttrf]: compute the `L * D * L^T` factorization of a real symmetric positive definite tridiagonal matrix `A`.
@@ -92,6 +93,8 @@ console.log( objectKeys( lapack ) );
[@stdlib/lapack/base/dlacpy]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/lapack/base/dlacpy
+[@stdlib/lapack/base/dlassq]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/lapack/base/dlassq
+
[@stdlib/lapack/base/dlaswp]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/lapack/base/dlaswp
[@stdlib/lapack/base/dpttrf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/lapack/base/dpttrf
diff --git a/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/base.js
index 183fb4f6802..6eda3d563cc 100644
--- a/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/base.js
+++ b/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/base.js
@@ -38,11 +38,11 @@ var min = require( '@stdlib/math/base/special/fast/min' );
* @param {Float64Array} A - input matrix
* @param {integer} strideA1 - stride of the first dimension of `A`
* @param {integer} strideA2 - stride of the second dimension of `A`
-* @param {PositiveInteger} offsetA - starting index for `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
* @param {Float64Array} B - output matrix
* @param {integer} strideB1 - stride of the first dimension of `B`
* @param {integer} strideB2 - stride of the second dimension of `B`
-* @param {PositiveInteger} offsetB - starting index for `B`
+* @param {NonNegativeInteger} offsetB - starting index for `B`
* @returns {Float64Array} `B`
*
* @example
@@ -173,11 +173,11 @@ function copyAll( M, N, A, strideA1, strideA2, offsetA, B, strideB1, strideB2, o
* @param {Float64Array} A - input matrix
* @param {integer} strideA1 - stride of the first dimension of `A`
* @param {integer} strideA2 - stride of the second dimension of `A`
-* @param {PositiveInteger} offsetA - starting index for `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
* @param {Float64Array} B - output matrix
* @param {integer} strideB1 - stride of the first dimension of `B`
* @param {integer} strideB2 - stride of the second dimension of `B`
-* @param {PositiveInteger} offsetB - starting index for `B`
+* @param {NonNegativeInteger} offsetB - starting index for `B`
* @returns {Float64Array} `B`
*
* @example
@@ -289,11 +289,11 @@ function copyUpper( M, N, A, strideA1, strideA2, offsetA, B, strideB1, strideB2,
* @param {Float64Array} A - input matrix
* @param {integer} strideA1 - stride of the first dimension of `A`
* @param {integer} strideA2 - stride of the second dimension of `A`
-* @param {PositiveInteger} offsetA - starting index for `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
* @param {Float64Array} B - output matrix
* @param {integer} strideB1 - stride of the first dimension of `B`
* @param {integer} strideB2 - stride of the second dimension of `B`
-* @param {PositiveInteger} offsetB - starting index for `B`
+* @param {NonNegativeInteger} offsetB - starting index for `B`
* @returns {Float64Array} `B`
*
* @example
@@ -409,11 +409,11 @@ function copyLower( M, N, A, strideA1, strideA2, offsetA, B, strideB1, strideB2,
* @param {Float64Array} A - input matrix
* @param {integer} strideA1 - stride of the first dimension of `A`
* @param {integer} strideA2 - stride of the second dimension of `A`
-* @param {PositiveInteger} offsetA - starting index for `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
* @param {Float64Array} B - output matrix
* @param {integer} strideB1 - stride of the first dimension of `B`
* @param {integer} strideB2 - stride of the second dimension of `B`
-* @param {PositiveInteger} offsetB - starting index for `B`
+* @param {NonNegativeInteger} offsetB - starting index for `B`
* @returns {Float64Array} `B`
*
* @example
diff --git a/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/ndarray.js b/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/ndarray.js
index a4aee3e1018..66b722fcd1d 100644
--- a/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/ndarray.js
+++ b/lib/node_modules/@stdlib/lapack/base/dlacpy/lib/ndarray.js
@@ -34,11 +34,11 @@ var base = require( './base.js' );
* @param {Float64Array} A - input matrix
* @param {integer} strideA1 - stride of the first dimension of `A`
* @param {integer} strideA2 - stride of the second dimension of `A`
-* @param {PositiveInteger} offsetA - starting index for `A`
+* @param {NonNegativeInteger} offsetA - starting index for `A`
* @param {Float64Array} B - output matrix
* @param {integer} strideB1 - stride of the first dimension of `B`
* @param {integer} strideB2 - stride of the second dimension of `B`
-* @param {PositiveInteger} offsetB - starting index for `B`
+* @param {NonNegativeInteger} offsetB - starting index for `B`
* @returns {Float64Array} `B`
*
* @example
diff --git a/lib/node_modules/@stdlib/lapack/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/docs/types/index.d.ts
index 4d5311c65a7..31df21c8eac 100644
--- a/lib/node_modules/@stdlib/lapack/base/docs/types/index.d.ts
+++ b/lib/node_modules/@stdlib/lapack/base/docs/types/index.d.ts
@@ -21,6 +21,7 @@
/* eslint-disable max-lines */
import dlacpy = require( '@stdlib/lapack/base/dlacpy' );
+import dlassq = require( '@stdlib/lapack/base/dlassq' );
import dlaswp = require( '@stdlib/lapack/base/dlaswp' );
import dpttrf = require( '@stdlib/lapack/base/dpttrf' );
@@ -61,6 +62,35 @@ interface Namespace {
*/
dlacpy: typeof dlacpy;
+ /**
+ * Returns an updated sum of squares represented in scaled form.
+ *
+ * @param N - number of indexed elements
+ * @param X - input array
+ * @param strideX - stride length for `X`
+ * @param scale - scaling factor
+ * @param sumsq - basic sum of squares from which output is factored out
+ * @returns output array
+ *
+ * @example
+ * var Float64Array = require( '@stdlib/array/float64' );
+ *
+ * var X = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
+ *
+ * var out = ns.dlassq( 4, X, 1, 1.0, 0.0, out );
+ * // returns [ 1.0, 30.0 ]
+ *
+ * @example
+ * var Float64Array = require( '@stdlib/array/float64' );
+ *
+ * var X = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
+ * var out = new Float64Array( [ 0.0, 0.0 ] );
+ *
+ * ns.dlassq.ndarray( 4, X, 1, 0, 1.0, 0.0, out, 1, 0 );
+ * // out => [ 1.0, 30.0 ]
+ */
+ dlassq: typeof dlassq;
+
/**
* Performs a series of row interchanges on a matrix `A` using pivot indices stored in `IPIV`.
*
diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/math/base/special/gcd/benchmark/benchmark.native.js
index 59242f690a1..3805c8dd285 100644
--- a/lib/node_modules/@stdlib/math/base/special/gcd/benchmark/benchmark.native.js
+++ b/lib/node_modules/@stdlib/math/base/special/gcd/benchmark/benchmark.native.js
@@ -38,7 +38,7 @@ var opts = {
// MAIN //
-bench( pkg, opts, function benchmark( b ) {
+bench( pkg+'::native', opts, function benchmark( b ) {
var x;
var y;
var z;
diff --git a/tools/make/lib/lint/git/Makefile b/tools/make/lib/lint/git/Makefile
index d7e3d069ade..e6880432b0e 100644
--- a/tools/make/lib/lint/git/Makefile
+++ b/tools/make/lib/lint/git/Makefile
@@ -43,11 +43,11 @@ endif
# @param {string} GIT_COMMIT_MESSAGE - Git commit message text
#
# @example
-# make lint-commit-message
+# make lint-commit-message GIT_COMMIT_MESSAGE='feat: add `foo/bar`'
#/
lint-commit-message:
ifeq ($(GIT_COMMIT_LINTER), commitlint)
- $(QUIET) NODE_ENV="$(NODE_ENV)" NODE_PATH="$(NODE_PATH)" GIT_COMMIT_MESSAGE="$(GIT_COMMIT_MESSAGE)" $(MAKE) -f $(this_file) commitlint-message
+ $(QUIET) NODE_ENV="$(NODE_ENV)" NODE_PATH="$(NODE_PATH)" GIT_COMMIT_MESSAGE='$(GIT_COMMIT_MESSAGE)' $(MAKE) -f $(this_file) commitlint-message
endif
.PHONY: lint-commit-message
diff --git a/tools/make/lib/lint/git/commitlint.mk b/tools/make/lib/lint/git/commitlint.mk
index 5ab2f11f57f..18fa769c46d 100644
--- a/tools/make/lib/lint/git/commitlint.mk
+++ b/tools/make/lib/lint/git/commitlint.mk
@@ -92,10 +92,10 @@ commitlint: $(NODE_MODULES) commitlint-init
# @private
#
# @example
-# make commitlint-message
+# make commitlint-message GIT_COMMIT_MESSAGE='feat: add `foo/bar`'
#/
commitlint-message: $(NODE_MODULES) commitlint-init
- $(QUIET) ( printf "$(GIT_COMMIT_MESSAGE)" | "$(COMMITLINT)" $(COMMITLINT_FLAGS) ) || ( $(MAKE) -f $(this_file) commitlint-cleanup && exit 1 )
+ $(QUIET) ( printf '$(GIT_COMMIT_MESSAGE)' | "$(COMMITLINT)" $(COMMITLINT_FLAGS) ) || ( $(MAKE) -f $(this_file) commitlint-cleanup && exit 1 )
$(QUIET) $(MAKE) -f $(this_file) commitlint-cleanup
.PHONY: commitlint-message