From d6b630d155e4157aec568f7c8e20bbcf7defd150 Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 21 Mar 2026 16:08:44 +0000 Subject: [PATCH 01/43] feat: chbmv base set up --- .../@stdlib/blas/base/chbmv/lib/base.js | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js new file mode 100644 index 000000000000..27237845add1 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -0,0 +1,68 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' ); +var cfill = require( '@stdlib/blas/ext/base/cfill' ).ndarray; +var cscal = require( '@stdlib/blas/base/cscal' ).ndarray; +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' ); +var muladd = require( '@stdlib/complex/float32/base/mul-add' ).assign; + + +// MAIN // + +/** +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are `N` element complex vectors, and `A` is an `N` by `N` Hermitian matrix. +* +* @private +* @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. +* @param {NonNegativeInteger} N - number of elements along each dimension of `A` +* @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of matrix `A`. +* @param {Complex64} alpha - complex scalar constant +* @param {Complex64Array} A - complex 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` +* @param {Complex64Array} x - first complex input vector +* @param {integer} strideX - `x` stride length +* @param {NonNegativeInteger} offsetX - starting index for `x` +* @param {Complex64} beta - complex scalar constant +* @param {Complex64Array} y - second complex input vector +* @param {integer} strideY - `y` stride length +* @param {NonNegativeInteger} offsetY - starting index for `y` +* @returns {Complex64Array} `y` +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var A = new Complex64Array( [ ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv( 'lower', 3, alpha, A, 3, 1, 0, x, 1, 0, beta, y, 1, 0 ); +* // y => [ ] +*/ \ No newline at end of file From 27255cf313368d28c4520b06f17058575909aa6c Mon Sep 17 00:00:00 2001 From: Divit Date: Sun, 22 Mar 2026 12:13:01 +0000 Subject: [PATCH 02/43] branch 1 --- .../@stdlib/blas/base/chbmv/lib/base.js | 109 +++++++++++++++++- 1 file changed, 108 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 27237845add1..665f83ae0fdd 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -65,4 +65,111 @@ var muladd = require( '@stdlib/complex/float32/base/mul-add' ).assign; * * chbmv( 'lower', 3, alpha, A, 3, 1, 0, x, 1, 0, beta, y, 1, 0 ); * // y => [ ] -*/ \ No newline at end of file +*/ +function chemv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len + var realpha; + var imalpha; + var rebeta; + var imbeta; + var retmp1; + var imtmp1; + var retmp2; + var imtmp2; + var viewA; + var viewX; + var viewY; + var isrm; + var cima; + var sign; + var sa0; + var sa1; + var oa2; + var rea; + var ima; + var rex; + var imx; + var ix; + var iy; + var oa; + var ox; + var oy; + var sx; + var sy; + var i0; + var i1; + var ia; + var k; + + // Layout + isrm = isRowMajor( [ strideA1, strideA2 ] ); + + // Decompose scalars + rebeta = realf( beta ); + imbeta = imagf( beta ); + realpha = realf( alpha ); + imalpha = imagf( alpha ); + + // y = beta*y + if ( rebeta === 0.0 && imbeta === 0.0 ) { + cfill( N, 0.0, y, strideY, offsetY ); + } else if ( rebeta !== 1.0 || imbeta !== 0.0 ) { + cscal( N, beta, y, strideY, offsetY ); + } + + // If alpha is zero, early return y + if ( realpha === 0.0 && imalpha === 0.0 ) { + return y; + } + + // Reinterpret arrays to raw numeric views + viewA = reinterpret( A, 0 ); + viewX = reinterpret( x, 0 ); + viewY = reinterpret( y, 0 ); + + if ( isrm ) { + // For row-major matrices, the last dimension has the fastest changing index... + sa0 = strideA2 * 2; // offset increment for innermost loop + sa1 = strideA1 * 2; // offset increment for outermost loop + } else { // isColMajor + // For column-major matrices, the first dimension has the fastest changing index... + sa0 = strideA1 * 2; // offset increment for innermost loop + sa1 = strideA2 * 2; // offset increment for outermost loop + } + + // Adjust sign to account for layout-dependent conjugation + if ( isrm ) { + sign = -1; + } else { + sign = 1; + } + + // Vector indexing base + oa = offsetA * 2; + ox = offsetX * 2; + oy = offsetY * 2; + + // Vector strides + sx = strideX * 2; + sy = strideY * 2; + + if ( ( isrm && uplo === 'upper' ) || ( !isrm && uplo === 'lower' ) ) { + for ( i1 = 0; i1 < N; i1++ ) { + ix = ox + ( i1 * sx ); + rex = viewX[ ix ]; + imx = viewX[ ix + 1 ]; + retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); + imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); + retmp2 = 0.0; + imtmp2 = 0.0; + oa2 = oa + ( i1 * sa1 ); + ia = oa2; + rea = viewA[ ia ]; + iy = oy + ( i1 * sy ); + viewY[ iy ] += f32( retmp1 * rea ); + viewY[ iy + 1 ] += f32( imtmp1 * rea ); + for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { + + } + } + } +} \ No newline at end of file From be378cf474674654b6cce6c0d3dc88a1834f1837 Mon Sep 17 00:00:00 2001 From: Divit Date: Sun, 22 Mar 2026 16:28:37 +0000 Subject: [PATCH 03/43] feat: base implementaion added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 71 ++++++++++++++++--- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 665f83ae0fdd..b2bcbf500d7e 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -28,12 +28,14 @@ var imagf = require( '@stdlib/complex/float32/imag' ); var f32 = require( '@stdlib/number/float64/base/to-float32' ); var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' ); var muladd = require( '@stdlib/complex/float32/base/mul-add' ).assign; +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); // MAIN // /** -* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are `N` element complex vectors, and `A` is an `N` by `N` Hermitian matrix. +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. * * @private * @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. @@ -57,16 +59,16 @@ var muladd = require( '@stdlib/complex/float32/base/mul-add' ).assign; * var Complex64Array = require( '@stdlib/array/complex64' ); * var Complex64 = require( '@stdlib/complex/float32/ctor' ); * -* var A = new Complex64Array( [ ] ); +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); * var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); * var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); * var alpha = new Complex64( 0.5, 0.5 ); * var beta = new Complex64( 0.5, -0.5 ); * -* chbmv( 'lower', 3, alpha, A, 3, 1, 0, x, 1, 0, beta, y, 1, 0 ); -* // y => [ ] +* chbmv( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] */ -function chemv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len +function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len var realpha; var imalpha; var rebeta; @@ -98,7 +100,7 @@ function chemv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var i0; var i1; var ia; - var k; + var m; // Layout isrm = isRowMajor( [ strideA1, strideA2 ] ); @@ -168,8 +170,59 @@ function chemv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o viewY[ iy ] += f32( retmp1 * rea ); viewY[ iy + 1 ] += f32( imtmp1 * rea ); for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { - + m = i0 - i1; + ia = oa2 + ( m * sa0 ); + rea = viewA[ ia ]; + ima = viewA[ ia + 1 ]; + cima = sign * ima; + iy = oy + ( i0 * sy ); + muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + ix = ox + ( i0 * sx ); + rex = viewX[ ix ]; + imx = viewX[ ix + 1 ]; + retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); + imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); } - } + iy = oy + ( i1 * sy ); + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + } + return y; + } + + // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) + for ( i1 = 0; i1 < N; i1++ ) { + ix = ox + ( i1 * sx ); + rex = viewX[ ix ]; + imx = viewX[ ix + 1 ]; + retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); + imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); + retmp2 = 0.0; + imtmp2 = 0.0; + oa2 = oa + ( i1 * sa1 ); + for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { + m = i0 - i1; + ia = oa2 + ( ( K + m ) * sa0 ); + rea = viewA[ ia ]; + ima = viewA[ ia + 1 ]; + cima = sign * ima; + iy = oy + ( i0 * sy ); + muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + ix = ox + ( i0 * sx ); + rex = viewX[ ix ]; + imx = viewX[ ix + 1 ]; + retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); + imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); + } + ia = oa2 + ( K * sa0 ); + rea = viewA[ ia ]; + iy = oy + ( i1 * sy ); + viewY[ iy ] += f32( retmp1 * rea ); + viewY[ iy + 1 ] += f32( imtmp1 * rea ); + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len } -} \ No newline at end of file +} + + +// EXPORTS // + +module.exports = chbmv; From c760434ce649b87a1fb0262b36cbbeae2c2ad1dd Mon Sep 17 00:00:00 2001 From: Divit Date: Sun, 22 Mar 2026 16:30:35 +0000 Subject: [PATCH 04/43] test: basic fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../chbmv/test/fixtures/column_major_l.json | 29 ++++++++++++++++++ .../chbmv/test/fixtures/column_major_u.json | 29 ++++++++++++++++++ .../base/chbmv/test/fixtures/row_major_l.json | 30 +++++++++++++++++++ .../base/chbmv/test/fixtures/row_major_u.json | 30 +++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json new file mode 100644 index 000000000000..b1c9e9fb71ca --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json new file mode 100644 index 000000000000..f6ca17b5e2c9 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "upper", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 1.0, 0.0, 2.0, 2.0, 3.0, 0.0, 4.0, 4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 2.0, 2.0, 4.0, 4.0 ], + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 0.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json new file mode 100644 index 000000000000..9fc396200492 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json @@ -0,0 +1,30 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json new file mode 100644 index 000000000000..1d5f4788988f --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json @@ -0,0 +1,30 @@ +{ + "order": "row-major", + "uplo": "upper", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, 2.0, 3.0, 0.0, 4.0, 4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 2.0, 2.0 ], + [ 3.0, 0.0, 4.0, 4.0 ], + [ 5.0, 0.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 0.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} From 705b23bfe0fd089517aa0ddda1d3f06be5eae37c Mon Sep 17 00:00:00 2001 From: Divit Date: Sun, 22 Mar 2026 17:06:44 +0000 Subject: [PATCH 05/43] feat: main added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/package.json | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/package.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/package.json b/lib/node_modules/@stdlib/blas/base/chbmv/package.json new file mode 100644 index 000000000000..73fcf21dd13d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/package.json @@ -0,0 +1,75 @@ +{ + "name": "@stdlib/blas/base/chbmv", + "version": "0.0.0", + "description": "Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals.", + "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", + "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", + "chbmv", + "hermitian", + "band", + "linear", + "algebra", + "subroutines", + "array", + "ndarray", + "complex", + "complex64", + "complex64array", + "float", + "float32", + "single", + "float32array" + ] +} From b1e9f2f781359fac11022a69e3f7bab813242b55 Mon Sep 17 00:00:00 2001 From: Divit Date: Sun, 22 Mar 2026 17:12:08 +0000 Subject: [PATCH 06/43] feat: main added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/chbmv.js | 126 ++++++++++++++++++ .../@stdlib/blas/base/chbmv/lib/index.js | 79 +++++++++++ .../@stdlib/blas/base/chbmv/lib/main.js | 35 +++++ .../@stdlib/blas/base/chbmv/lib/ndarray.js | 112 ++++++++++++++++ 4 files changed, 352 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/lib/main.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js new file mode 100644 index 000000000000..41f3975b19e7 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js @@ -0,0 +1,126 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 isLayout = require( '@stdlib/blas/base/assert/is-layout' ); +var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' ); +var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' ); +var stride2offset = require( '@stdlib/strided/base/stride2offset' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* +* @param {string} order - storage layout +* @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. +* @param {NonNegativeInteger} N - number of elements along each dimension of `A` +* @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of matrix `A`. +* @param {Complex64} alpha - complex scalar constant +* @param {Complex64Array} A - complex input matrix +* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param {Complex64Array} x - first complex input vector +* @param {integer} strideX - `x` stride length +* @param {Complex64} beta - complex scalar constant +* @param {Complex64Array} y - second complex input vector +* @param {integer} strideY - `y` stride length +* @throws {TypeError} first argument must be a valid order +* @throws {TypeError} second argument must specify whether to reference the lower or upper triangular matrix +* @throws {RangeError} third argument must be a nonnegative integer +* @throws {RangeError} seventh argument must be a valid stride +* @throws {RangeError} ninth argument must be non-zero +* @throws {RangeError} twelfth argument must be non-zero +* @returns {Complex64Array} `y` +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 1, beta, y, 1 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +*/ +function chbmv( order, uplo, N, K, alpha, A, LDA, x, strideX, beta, y, strideY ) { // eslint-disable-line max-params + var realpha; + var imalpha; + var rebeta; + var imbeta; + 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 ( K < 0 ) { + throw new RangeError( format( 'invalid argument. Fourth argument must be a nonnegative integer. Value: `%d`.', K ) ); + } + if ( strideX === 0 ) { + throw new RangeError( format( 'invalid argument. Ninth argument must be non-zero. Value: `%d`.', strideX ) ); + } + if ( strideY === 0 ) { + throw new RangeError( format( 'invalid argument. Twelfth argument must be non-zero. Value: `%d`.', strideY ) ); + } + if ( LDA < ( K + 1 ) ) { + throw new RangeError( format( 'invalid argument. Sixth argument (LDA) must be greater than or equal to (K+1)=%d. Value: `%d`.', K + 1, LDA ) ); + } + rebeta = realf( beta ); + imbeta = imagf( beta ); + realpha = realf( alpha ); + imalpha = imagf( alpha ); + + // Check if we can early return... + if ( N === 0 || ( realpha === 0.0 && imalpha === 0.0 && rebeta === 1.0 && imbeta === 0.0 ) ) { // eslint-disable-line max-len + return y; + } + if ( isColumnMajor( order ) ) { + sa1 = 1; + sa2 = LDA; + } else { // order === 'row-major' + sa1 = LDA; + sa2 = 1; + } + ox = stride2offset( N, strideX ); + oy = stride2offset( N, strideY ); + return base( uplo, N, K, alpha, A, sa1, sa2, 0, x, strideX, ox, beta, y, strideY, oy ); +} + + +// EXPORTS // + +module.exports = chbmv; diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js new file mode 100644 index 000000000000..1748c1be7b9c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js @@ -0,0 +1,79 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* +* @module @stdlib/blas/base/chbmv +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var chbmv = require( '@stdlib/blas/base/chbmv' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 1, beta, y, 1 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* var chbmv = require( '@stdlib/blas/base/chbmv' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.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 chbmv; +var tmp = tryRequire( join( __dirname, './native.js' ) ); + +if ( isError( tmp ) ) { + chbmv = main; +} else { + chbmv = tmp; +} + + +// EXPORTS // + +module.exports = chbmv; + +// exports: { "ndarray": "chbmv.ndarray" } diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/main.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/main.js new file mode 100644 index 000000000000..4b681a5c3957 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/main.js @@ -0,0 +1,35 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 chbmv = require( './chbmv.js' ); +var ndarray = require( './ndarray.js' ); + + +// MAIN // + +setReadOnly( chbmv, 'ndarray', ndarray ); + + +// EXPORTS // + +module.exports = chbmv; diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js new file mode 100644 index 000000000000..88aa5e1448cb --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js @@ -0,0 +1,112 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' ); +var format = require( '@stdlib/string/format' ); +var realf = require( '@stdlib/complex/float32/real' ); +var imagf = require( '@stdlib/complex/float32/imag' ); +var base = require( './base.js' ); + + +// MAIN // + +/** +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* +* @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. +* @param {NonNegativeInteger} N - number of elements along each dimension of `A` +* @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of matrix `A`. +* @param {Complex64} alpha - complex scalar constant +* @param {Complex64Array} A - complex 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` +* @param {Complex64Array} x - first complex input vector +* @param {integer} strideX - `x` stride length +* @param {NonNegativeInteger} offsetX - starting index for `x` +* @param {Complex64} beta - complex scalar constant +* @param {Complex64Array} y - second complex input vector +* @param {integer} strideY - `y` stride length +* @param {NonNegativeInteger} offsetY - starting index for `y` +* @throws {TypeError} first argument must specify whether to reference the lower or upper triangular matrix +* @throws {RangeError} second argument must be a nonnegative integer +* @throws {RangeError} sixth argument must be non-zero +* @throws {RangeError} seventh argument must be non-zero +* @throws {RangeError} tenth argument must be non-zero +* @throws {RangeError} fourteenth argument must be non-zero +* @returns {Complex64Array} `y` +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +*/ +function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len + var realpha; + var imalpha; + var rebeta; + var imbeta; + if ( !isMatrixTriangle( uplo ) ) { + throw new TypeError( format( 'invalid argument. First argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) ); + } + if ( N < 0 ) { + throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', N ) ); + } + if ( K < 0 ) { + throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', K ) ); + } + if ( strideA1 === 0 ) { + throw new RangeError( format( 'invalid argument. Sixth argument must be non-zero. Value: `%d`.', strideA1 ) ); + } + if ( strideA2 === 0 ) { + throw new RangeError( format( 'invalid argument. Seventh argument must be non-zero. Value: `%d`.', strideA2 ) ); + } + if ( strideX === 0 ) { + throw new RangeError( format( 'invalid argument. Tenth argument must be non-zero. Value: `%d`.', strideX ) ); + } + if ( strideY === 0 ) { + throw new RangeError( format( 'invalid argument. Fourteenth argument must be non-zero. Value: `%d`.', strideY ) ); + } + rebeta = realf( beta ); + imbeta = imagf( beta ); + realpha = realf( alpha ); + imalpha = imagf( alpha ); + + // Check if we can early return... + if ( N === 0 || ( realpha === 0.0 && imalpha === 0.0 && rebeta === 1.0 && imbeta === 0.0 ) ) { // eslint-disable-line max-len + return y; + } + return base( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ); +} + + +// EXPORTS // + +module.exports = chbmv; From 416624bed651ef8a7c47c1afe88579f455b7ce62 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 18:04:25 +0000 Subject: [PATCH 07/43] test: test files added --- .../blas/base/chbmv/test/test.chbmv.js | 989 ++++++++++++ .../@stdlib/blas/base/chbmv/test/test.js | 82 + .../blas/base/chbmv/test/test.ndarray.js | 1329 +++++++++++++++++ 3 files changed, 2400 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/test.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js new file mode 100644 index 000000000000..276e5d109ebc --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js @@ -0,0 +1,989 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 isSameComplex64Array = require( '@stdlib/assert/is-same-complex64array' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var chbmv = require( './../lib/chbmv.js' ); + + +// FIXTURES // + +var cu = require( './fixtures/column_major_u.json' ); +var cl = require( './fixtures/column_major_l.json' ); +var cx = require( './fixtures/column_major_x_zeros.json' ); +var cxb = require( './fixtures/column_major_x_zeros_beta_one.json' ); +var ca = require( './fixtures/column_major_alpha_zero.json' ); +var cxnyn = require( './fixtures/column_major_xnyn.json' ); +var cxpyn = require( './fixtures/column_major_xpyn.json' ); +var cxnyp = require( './fixtures/column_major_xnyp.json' ); +var cxpyp = require( './fixtures/column_major_xpyp.json' ); +var ru = require( './fixtures/row_major_u.json' ); +var rl = require( './fixtures/row_major_l.json' ); +var rx = require( './fixtures/row_major_x_zeros.json' ); +var rxb = require( './fixtures/row_major_x_zeros_beta_one.json' ); +var ra = require( './fixtures/row_major_alpha_zero.json' ); +var rxnyn = require( './fixtures/row_major_xnyn.json' ); +var rxpyn = require( './fixtures/row_major_xpyn.json' ); +var rxnyp = require( './fixtures/row_major_xnyp.json' ); +var rxpyp = require( './fixtures/row_major_xpyp.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof chbmv, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 12', function test( t ) { + t.strictEqual( chbmv.length, 12, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided an invalid first argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( value, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid second argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, value, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid third argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, data.uplo, value, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid fourth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, data.uplo, data.N, value, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid seventh argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, data.uplo, data.N, data.K, alpha, a, value, x, data.strideX, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid ninth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, value, beta, y, data.strideY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid twelfth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, value ); + }; + } +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (row-major, lower)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (column-major, lower)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (row-major, upper)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ru; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (column-major, upper)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cu; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function returns a reference to the second input vector (row-major)', function test( t ) { + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function returns a reference to the second input vector (column-major)', function test( t ) { + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `N` is `0`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `N` is `0`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 1.0, 0.0 ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 1.0, 0.0 ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxb; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxb; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0`, the function scales the second input vector by `β` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ra; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0`, the function scales the second input vector by `β` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ca; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the second input vector by `β` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rx; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the second input vector by `β` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cx; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxpyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxpyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxnyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxnyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxpyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxpyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxnyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxnyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.js new file mode 100644 index 000000000000..76a57e0a51e2 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.js @@ -0,0 +1,82 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var proxyquire = require( 'proxyquire' ); +var isBrowser = require( '@stdlib/assert/is-browser' ); +var chbmv = require( './../lib' ); + + +// VARIABLES // + +var opts = { + 'skip': isBrowser +}; + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof chbmv, '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 chbmv.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 chbmv = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( chbmv, mock, 'returns native implementation' ); + t.end(); + + function tryRequire() { + return mock; + } + + function mock() { + // Mock... + } +}); + +tape( 'if a native implementation is not available, the main export is a JavaScript implementation', opts, function test( t ) { + var chbmv; + var main; + + main = require( './../lib/chbmv.js' ); + + chbmv = proxyquire( './../lib', { + '@stdlib/utils/try-require': tryRequire + }); + + t.strictEqual( chbmv, main, 'returns JavaScript implementation' ); + t.end(); + + function tryRequire() { + return new Error( 'Cannot find module' ); + } +}); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js new file mode 100644 index 000000000000..ce85bd321a76 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -0,0 +1,1329 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 isSameComplex64Array = require( '@stdlib/assert/is-same-complex64array' ); +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var chbmv = require( './../lib/ndarray.js' ); + + +// FIXTURES // + +var cu = require( './fixtures/column_major_u.json' ); +var cl = require( './fixtures/column_major_l.json' ); +var cx = require( './fixtures/column_major_x_zeros.json' ); +var cxb = require( './fixtures/column_major_x_zeros_beta_one.json' ); +var ca = require( './fixtures/column_major_alpha_zero.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 cxnyn = require( './fixtures/column_major_xnyn.json' ); +var cxpyn = require( './fixtures/column_major_xpyn.json' ); +var cxnyp = require( './fixtures/column_major_xnyp.json' ); +var cxpyp = require( './fixtures/column_major_xpyp.json' ); +var cap = require( './fixtures/column_major_complex_access_pattern.json' ); +var ru = require( './fixtures/row_major_u.json' ); +var rx = require( './fixtures/row_major_x_zeros.json' ); +var rxb = require( './fixtures/row_major_x_zeros_beta_one.json' ); +var ra = require( './fixtures/row_major_alpha_zero.json' ); +var roa = require( './fixtures/row_major_oa.json' ); +var rl = require( './fixtures/row_major_l.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 rxpyp = require( './fixtures/row_major_xpyp.json' ); +var rxnyn = require( './fixtures/row_major_xnyn.json' ); +var rxpyn = require( './fixtures/row_major_xpyn.json' ); +var rxnyp = require( './fixtures/row_major_xnyp.json' ); +var rap = require( './fixtures/row_major_complex_access_pattern.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof chbmv, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 15', function test( t ) { + t.strictEqual( chbmv.length, 15, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided an invalid first argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( value, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid second argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, value, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid third argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, data.N, value, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid sixth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, data.N, data.K, alpha, a, value, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid seventh argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, value, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid tenth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, value, data.offsetX, beta, y, data.strideY, data.offsetY ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid fourteenth argument', function test( t ) { + var values; + var alpha; + var data; + var beta; + var i; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + 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() { + chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, value, data.offsetY ); + }; + } +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (row-major, lower)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (column-major, lower)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (row-major, upper)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ru; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (column-major, upper)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cu; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function returns a reference to the second input vector (row-major)', function test( t ) { + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function returns a reference to the second input vector (column-major)', function test( t ) { + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `N` is `0`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `N` is `0`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 1.0, 0.0 ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cl; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 1.0, 0.0 ); + + expected = new Complex64Array( data.y ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxb; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxb; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0`, the function scales the second input vector by `β` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ra; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0`, the function scales the second input vector by `β` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ca; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the second input vector by `β` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rx; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the second input vector by `β` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cx; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, '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 alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rsa1sa2; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + 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 alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = csa1sa2; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports a negative stride for the first dimension of `A` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rsa1nsa2; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports a negative stride for the first dimension of `A` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = csa1nsa2; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports a negative stride for the second dimension of `A` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rsa1sa2n; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports a negative stride for the second dimension of `A` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = csa1sa2n; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports negative strides for `A` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rsa1nsa2n; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports negative strides for `A` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = csa1nsa2n; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying an offset parameter for `A` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = roa; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying an offset parameter for `A` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = coa; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxpyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxpyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxnyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxnyp; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxpyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxpyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rxnyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cxnyn; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports complex access patterns (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = rap; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); + +tape( 'the function supports complex access patterns (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = cap; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( data.alpha[0], data.alpha[1] ); + beta = new Complex64( data.beta[0], data.beta[1] ); + + expected = new Complex64Array( data.y_out ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + + t.end(); +}); From 95db3e72ec8802bd03703033415d835ed9773bbb Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 18:28:02 +0000 Subject: [PATCH 08/43] chore: minnor fixes --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js | 1 + .../@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json | 4 ++-- .../@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json | 4 ++-- .../@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json | 4 ++-- .../@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index b2bcbf500d7e..40dcc22357e1 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -220,6 +220,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o viewY[ iy + 1 ] += f32( imtmp1 * rea ); muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len } + return y; } diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json index b1c9e9fb71ca..5cfab2abce43 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_l.json @@ -14,9 +14,9 @@ [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ], - "lda": 3, + "lda": 2, "strideA1": 1, - "strideA2": 3, + "strideA2": 2, "offsetA": 0, "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], "strideX": 1, diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json index f6ca17b5e2c9..0dcedb73fd33 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_u.json @@ -14,9 +14,9 @@ [ 0.0, 0.0, 3.0, 0.0, 4.0, 4.0 ], [ 0.0, 0.0, 0.0, 0.0, 5.0, 0.0 ] ], - "lda": 3, + "lda": 2, "strideA1": 1, - "strideA2": 3, + "strideA2": 2, "offsetA": 0, "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], "strideX": 1, diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json index 9fc396200492..f69dcf3c44f5 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_l.json @@ -15,8 +15,8 @@ [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ], - "lda": 3, - "strideA1": 3, + "lda": 2, + "strideA1": 2, "strideA2": 1, "offsetA": 0, "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json index 1d5f4788988f..b06899c9051d 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_u.json @@ -15,8 +15,8 @@ [ 0.0, 0.0, 3.0, 0.0, 4.0, 4.0 ], [ 0.0, 0.0, 0.0, 0.0, 5.0, 0.0 ] ], - "lda": 3, - "strideA1": 3, + "lda": 2, + "strideA1": 2, "strideA2": 1, "offsetA": 0, "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], From f022e34026683ef936078f3349312a726b90ebf6 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 18:45:58 +0000 Subject: [PATCH 09/43] test: y unchanged and scaling fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../fixtures/column_major_alpha_zero.json | 29 ++++++++++++++++++ .../test/fixtures/column_major_x_zeros.json | 29 ++++++++++++++++++ .../column_major_x_zeros_beta_one.json | 29 ++++++++++++++++++ .../test/fixtures/row_major_alpha_zero.json | 30 +++++++++++++++++++ .../test/fixtures/row_major_x_zeros.json | 30 +++++++++++++++++++ .../fixtures/row_major_x_zeros_beta_one.json | 30 +++++++++++++++++++ 6 files changed, 177 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_alpha_zero.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros_beta_one.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_alpha_zero.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros_beta_one.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_alpha_zero.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_alpha_zero.json new file mode 100644 index 000000000000..44856891862c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_alpha_zero.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.0, 0.0 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros.json new file mode 100644 index 000000000000..d46d3fec7ec7 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros_beta_one.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros_beta_one.json new file mode 100644 index 000000000000..7df9846d4d64 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_x_zeros_beta_one.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 1.0, 0.0 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_alpha_zero.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_alpha_zero.json new file mode 100644 index 000000000000..d166f94ada81 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_alpha_zero.json @@ -0,0 +1,30 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.0, 0.0 ], + "A": [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros.json new file mode 100644 index 000000000000..e5dad3017830 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros.json @@ -0,0 +1,30 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros_beta_one.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros_beta_one.json new file mode 100644 index 000000000000..a05f027817c9 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_x_zeros_beta_one.json @@ -0,0 +1,30 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 1.0, 0.0 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] +} From a69da972b474d597e4cf9fe9353ec9c9c22036c1 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 19:23:36 +0000 Subject: [PATCH 10/43] test: specific input vectors stride fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../test/fixtures/column_major_xnyn.json | 31 ++++++++++++++++++ .../test/fixtures/column_major_xnyp.json | 31 ++++++++++++++++++ .../test/fixtures/column_major_xpyn.json | 31 ++++++++++++++++++ .../test/fixtures/column_major_xpyp.json | 31 ++++++++++++++++++ .../chbmv/test/fixtures/row_major_xnyn.json | 32 +++++++++++++++++++ .../chbmv/test/fixtures/row_major_xnyp.json | 32 +++++++++++++++++++ .../chbmv/test/fixtures/row_major_xpyn.json | 32 +++++++++++++++++++ .../chbmv/test/fixtures/row_major_xpyp.json | 32 +++++++++++++++++++ 8 files changed, 252 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyn.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyp.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyn.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyp.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyn.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyp.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyn.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyp.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyn.json new file mode 100644 index 000000000000..6c68b2c0b30e --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyn.json @@ -0,0 +1,31 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 3.0, 4.0, 0.0, 5.0, -5.0, 6.0, 6.0, 7.0, 0.0, 8.0, -8.0, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 4.0, 0.0, 7.0, 0.0, 9.0, 0.0 ], + [ 2.0, -2.0, 5.0, -5.0, 8.0, -8.0, 0.0, 0.0 ], + [ 3.0, 3.0, 6.0, 6.0, 0.0, 0.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 3, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideY": -1, + "offsetY": 3, + "y_out": [ 13.0, 72.0, -23.0, 66.0, 14.0, 49.0, 9.0, 14.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyp.json new file mode 100644 index 000000000000..61d06e9cb8ac --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xnyp.json @@ -0,0 +1,31 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 3.0, 4.0, 0.0, 5.0, -5.0, 6.0, 6.0, 7.0, 0.0, 8.0, -8.0, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 4.0, 0.0, 7.0, 0.0, 9.0, 0.0 ], + [ 2.0, -2.0, 5.0, -5.0, 8.0, -8.0, 0.0, 0.0 ], + [ 3.0, 3.0, 6.0, 6.0, 0.0, 0.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 3, + "beta": [ 0.5, -0.5 ], + "y": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 9.0, 14.0, 14.0, 49.0, -23.0, 66.0, 13.0, 72.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyn.json new file mode 100644 index 000000000000..19299f10b67b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyn.json @@ -0,0 +1,31 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 3.0, 4.0, 0.0, 5.0, -5.0, 6.0, 6.0, 7.0, 0.0, 8.0, -8.0, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 4.0, 0.0, 7.0, 0.0, 9.0, 0.0 ], + [ 2.0, -2.0, 5.0, -5.0, 8.0, -8.0, 0.0, 0.0 ], + [ 3.0, 3.0, 6.0, 6.0, 0.0, 0.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideY": -1, + "offsetY": 3, + "y_out": [ 13.0, 72.0, -23.0, 66.0, 14.0, 49.0, 9.0, 14.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyp.json new file mode 100644 index 000000000000..531d06996920 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_xpyp.json @@ -0,0 +1,31 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 2.0, -2.0, 3.0, 3.0, 4.0, 0.0, 5.0, -5.0, 6.0, 6.0, 7.0, 0.0, 8.0, -8.0, 0.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 4.0, 0.0, 7.0, 0.0, 9.0, 0.0 ], + [ 2.0, -2.0, 5.0, -5.0, 8.0, -8.0, 0.0, 0.0 ], + [ 3.0, 3.0, 6.0, 6.0, 0.0, 0.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 1, + "strideA2": 3, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 9.0, 14.0, 14.0, 49.0, -23.0, 66.0, 13.0, 72.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyn.json new file mode 100644 index 000000000000..e98d0e06402d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyn.json @@ -0,0 +1,32 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ], + [ 0.0, 0.0, 2.0, -2.0, 4.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0 ], + [ 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 3, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideY": -1, + "offsetY": 3, + "y_out": [ 13.0, 72.0, -23.0, 66.0, 14.0, 49.0, 9.0, 14.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyp.json new file mode 100644 index 000000000000..a360935f192f --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xnyp.json @@ -0,0 +1,32 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ], + [ 0.0, 0.0, 2.0, -2.0, 4.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0 ], + [ 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 3, + "beta": [ 0.5, -0.5 ], + "y": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 9.0, 14.0, 14.0, 49.0, -23.0, 66.0, 13.0, 72.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyn.json new file mode 100644 index 000000000000..2528a96c4422 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyn.json @@ -0,0 +1,32 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ], + [ 0.0, 0.0, 2.0, -2.0, 4.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0 ], + [ 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideY": -1, + "offsetY": 3, + "y_out": [ 13.0, 72.0, -23.0, 66.0, 14.0, 49.0, 9.0, 14.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyp.json new file mode 100644 index 000000000000..1058da20ce7e --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_xpyp.json @@ -0,0 +1,32 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 4, + "K": 2, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 2.0, -2.0, 4.0, 0.0, 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0 ], + [ 0.0, 0.0, 2.0, -2.0, 4.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0 ], + [ 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 3.0, 3.0, 5.0, -5.0, 7.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 6.0, 6.0, 8.0, -8.0, 9.0, 0.0 ] + ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 4.0, 4.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ 9.0, 14.0, 14.0, 49.0, -23.0, 66.0, 13.0, 72.0 ] +} From c7538ce1557fbed05ce6ff0bbe56ef05eeac2e94 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 19:29:49 +0000 Subject: [PATCH 11/43] test: offset for A fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../chbmv/test/fixtures/column_major_oa.json | 29 +++++++++++++++++++ .../chbmv/test/fixtures/row_major_oa.json | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_oa.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_oa.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_oa.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_oa.json new file mode 100644 index 000000000000..917668b2142c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_oa.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 9, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_oa.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_oa.json new file mode 100644 index 000000000000..e7375ad58c46 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_oa.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": 2, + "strideA2": 1, + "offsetA": 6, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} From 3f263fc1aada860133e06d4a31e08d94742d5a1f Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 20:12:25 +0000 Subject: [PATCH 12/43] test: specifing strides for A fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../test/fixtures/column_major_sa1_sa2.json | 28 ++++++++++++++++++ .../test/fixtures/column_major_sa1_sa2n.json | 28 ++++++++++++++++++ .../test/fixtures/column_major_sa1n_sa2.json | 28 ++++++++++++++++++ .../test/fixtures/column_major_sa1n_sa2n.json | 28 ++++++++++++++++++ .../test/fixtures/row_major_sa1_sa2.json | 29 +++++++++++++++++++ .../test/fixtures/row_major_sa1_sa2n.json | 29 +++++++++++++++++++ .../test/fixtures/row_major_sa1n_sa2.json | 29 +++++++++++++++++++ .../test/fixtures/row_major_sa1n_sa2n.json | 29 +++++++++++++++++++ 8 files changed, 228 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2n.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2n.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2n.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2n.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2.json new file mode 100644 index 000000000000..d7e7beb38c57 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2.json @@ -0,0 +1,28 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": 3, + "strideA2": 7, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2n.json new file mode 100644 index 000000000000..b5b85f02d6f8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1_sa2n.json @@ -0,0 +1,28 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 5.0, 0.0, 999.0, 999.0, 0.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0, 999.0, 999.0, 2.0, -2.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": 2, + "strideA2": -8, + "offsetA": 16, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2.json new file mode 100644 index 000000000000..f2b504bd3a76 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2.json @@ -0,0 +1,28 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": -4, + "strideA2": 11, + "offsetA": 4, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2n.json new file mode 100644 index 000000000000..311a3945a608 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_sa1n_sa2n.json @@ -0,0 +1,28 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": -5, + "strideA2": -10, + "offsetA": 25, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2.json new file mode 100644 index 000000000000..0edb815d4aae --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 0.0, 0.0, 999.0, 999.0, 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 5.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": 6, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2n.json new file mode 100644 index 000000000000..b83b332a644a --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1_sa2n.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": 9, + "strideA2": -3, + "offsetA": 3, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2.json new file mode 100644 index 000000000000..3a187bb9ebf8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 4.0, -4.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0, 999.0, 999.0, 1.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": -5, + "strideA2": 2, + "offsetA": 10, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2n.json new file mode 100644 index 000000000000..6b4dc8fba5f2 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_sa1n_sa2n.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": -10, + "strideA2": -4, + "offsetA": 24, + "x": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "beta": [ 0.5, -0.5 ], + "y": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "y_out": [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +} From f8854b26dabc6ca915fe2de9719df344f6e3a608 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 20:19:47 +0000 Subject: [PATCH 13/43] test: complex access fixtures added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../column_major_complex_access_pattern.json | 29 +++++++++++++++++++ .../row_major_complex_access_pattern.json | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_complex_access_pattern.json create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_complex_access_pattern.json diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_complex_access_pattern.json new file mode 100644 index 000000000000..10383bb0f6ac --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/column_major_complex_access_pattern.json @@ -0,0 +1,29 @@ +{ + "order": "column-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0 ], + "A_compact": [ + [ 1.0, 0.0, 3.0, 0.0, 5.0, 0.0 ], + [ 2.0, -2.0, 4.0, -4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "lda": 2, + "strideA1": -6, + "strideA2": -13, + "offsetA": 35, + "x": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 2, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideY": -1, + "offsetY": 2, + "y_out": [ 9.0, 23.0, -8.0, 20.0, -1.0, 5.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_complex_access_pattern.json new file mode 100644 index 000000000000..c6589df2a7e9 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/fixtures/row_major_complex_access_pattern.json @@ -0,0 +1,29 @@ +{ + "order": "row-major", + "uplo": "lower", + "N": 3, + "K": 1, + "alpha": [ 0.5, 0.5 ], + "A": [ 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 5.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 4.0, -4.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 3.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 2.0, -2.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 1.0, 0.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 999.0, 0.0, 0.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0 ], + [ 4.0, -4.0, 5.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 0.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, -2.0, 3.0, 0.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] + ], + "strideA1": -11, + "strideA2": -5, + "offsetA": 30, + "x": [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ], + "strideX": -1, + "offsetX": 2, + "beta": [ 0.5, -0.5 ], + "y": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ], + "strideY": -1, + "offsetY": 2, + "y_out": [ 9.0, 23.0, -8.0, 20.0, -1.0, 5.0 ] +} From 81637b6111a7543c41ca3302dac51951155d5faa Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 20:27:10 +0000 Subject: [PATCH 14/43] chore: tests corrected --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js | 2 -- lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js | 4 ---- 2 files changed, 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js index 276e5d109ebc..b5979c1728d4 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js @@ -234,8 +234,6 @@ tape( 'the function throws an error if provided an invalid seventh argument', fu beta = new Complex64( data.beta[0], data.beta[1] ); values = [ - 2, - 1, 0, -1, -2, diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index ce85bd321a76..4232ede08251 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -27,10 +27,6 @@ var isSameComplex64Array = require( '@stdlib/assert/is-same-complex64array' ); var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); var chbmv = require( './../lib/ndarray.js' ); - - -// FIXTURES // - var cu = require( './fixtures/column_major_u.json' ); var cl = require( './fixtures/column_major_l.json' ); var cx = require( './fixtures/column_major_x_zeros.json' ); From 7ed29984f759a3e779b71c474998093cbdd3f7e5 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 23 Mar 2026 20:28:22 +0000 Subject: [PATCH 15/43] chore: tests corrected --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index 4232ede08251..ce85bd321a76 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -27,6 +27,10 @@ var isSameComplex64Array = require( '@stdlib/assert/is-same-complex64array' ); var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); var chbmv = require( './../lib/ndarray.js' ); + + +// FIXTURES // + var cu = require( './fixtures/column_major_u.json' ); var cl = require( './fixtures/column_major_l.json' ); var cx = require( './fixtures/column_major_x_zeros.json' ); From 4ab70198d7865d833872f129382f22e2c92af5a6 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 11:52:28 +0000 Subject: [PATCH 16/43] docs: types added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../blas/base/chbmv/docs/types/index.d.ts | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts new file mode 100644 index 000000000000..91129ebed941 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts @@ -0,0 +1,147 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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 { Complex64Array } from '@stdlib/types/array'; +import { Layout, MatrixTriangle } from '@stdlib/types/blas'; +import { Complex64 } from '@stdlib/types/complex'; + +/** +* Interface describing `chbmv`. +*/ +interface Routine { + /** + * Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + * + * @param order - storage layout + * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. + * @param N - number of elements along each dimension of `A` + * @param K - number of super-diagonals or sub-diagonals of matrix `A`. + * @param alpha - complex scalar constant + * @param A - complex input matrix + * @param LDA - stride of the first dimension of `A` + * @param x - first complex input vector + * @param strideX - `x` stride length + * @param beta - complex scalar constant + * @param y - second complex input vector + * @param strideY - `y` stride length + * @returns `y` + * + * @example + * var Complex64Array = require( '@stdlib/array/complex64' ); + * var Complex64 = require( '@stdlib/complex/float32/ctor' ); + * + * var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); + * var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); + * var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); + * var alpha = new Complex64( 0.5, 0.5 ); + * var beta = new Complex64( 0.5, -0.5 ); + * + * chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 1, beta, y, 1 ); + * // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] + */ + ( order: Layout, uplo: MatrixTriangle, N: number, K: Number, alpha: Complex64, A: Complex64Array, LDA: number, x: Complex64Array, strideX: number, beta: Complex64, y: Complex64Array, strideY: number ): Complex64Array; + + /** + * Performs the matrix-vector operation `y = α*A*x + β*y`, using alternative indexing semantics. + * + * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. + * @param N - number of elements along each dimension of `A` + * @param K - number of super-diagonals or sub-diagonals of matrix `A`. + * @param alpha - complex scalar constant + * @param A - complex 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` + * @param x - first complex input vector + * @param strideX - `x` stride length + * @param offsetX - starting index for `x` + * @param beta - complex scalar constant + * @param y - second complex input vector + * @param strideY - `y` stride length + * @param offsetY - starting index for `y` + * @returns `y` + * + * @example + * var Complex64Array = require( '@stdlib/array/complex64' ); + * var Complex64 = require( '@stdlib/complex/float32/ctor' ); + * + * var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); + * var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); + * var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); + * var alpha = new Complex64( 0.5, 0.5 ); + * var beta = new Complex64( 0.5, -0.5 ); + * + * chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); + * // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] + */ + ndarray( uplo: MatrixTriangle, N: number, K: Number, alpha: Complex64, A: Complex64Array, strideA1: number, strideA2: number, offsetA: number, x: Complex64Array, strideX: number, offsetX: number, beta: Complex64, y: Complex64Array, strideY: number, offsetY: number ): Complex64Array; +} + +/** +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* +* @param order - storage layout +* @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. +* @param N - number of elements along each dimension of `A` +* @param K - number of super-diagonals or sub-diagonals of matrix `A`. +* @param alpha - complex scalar constant +* @param A - complex input matrix +* @param LDA - stride of the first dimension of `A` +* @param x - first complex input vector +* @param strideX - `x` stride length +* @param beta - complex scalar constant +* @param y - second complex input vector +* @param strideY - `y` stride length +* @returns `y` +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 1, beta, y, 1 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* var Complex64 = require( '@stdlib/complex/float32/ctor' ); +* +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +* var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +* var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +* var alpha = new Complex64( 0.5, 0.5 ); +* var beta = new Complex64( 0.5, -0.5 ); +* +* chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); +* // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +*/ +declare var chbmv: Routine; + + +// EXPORTS // + +export = chbmv; From e74e9772bfc295b4546d8495e86005cf348b3e81 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 12:16:20 +0000 Subject: [PATCH 17/43] docs: types tests added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../blas/base/chbmv/docs/types/test.ts | 580 ++++++++++++++++++ 1 file changed, 580 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/docs/types/test.ts diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/test.ts new file mode 100644 index 000000000000..b9a399ccaf17 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/test.ts @@ -0,0 +1,580 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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 Complex64Array = require( '@stdlib/array/complex64' ); +import Complex64 = require( '@stdlib/complex/float32/ctor' ); +import chbmv = require( './index' ); + + +// TESTS // + +// The function returns a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 1.0, 0.0 ); + const beta = new Complex64( 1.0, 0.0 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectType Complex64Array +} + +// The compiler throws an error if the function is provided a first argument which is not a string... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 10, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( true, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( false, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( null, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( undefined, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( [], 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( {}, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( ( x: number ): number => x, 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a string... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 10, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', true, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', false, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', null, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', undefined, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', [], 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', {}, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', ( x: number ): number => x, 10, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', '10', 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', true, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', false, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', null, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', undefined, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', [], 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', {}, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', ( x: number ): number => x, 10, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, '10', alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, true, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, false, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, null, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, undefined, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, [], alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, {}, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, ( x: number ): number => x, alpha, A, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a Complex64... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, '10', A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, true, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, false, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, null, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, undefined, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, [], A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, {}, A, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, ( x: number ): number => x, A, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, 10, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, '10', 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, true, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, false, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, null, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, undefined, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, [ '1' ], 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, {}, 10, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, ( x: number ): number => x, 10, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, '10', x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, true, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, false, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, null, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, undefined, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, [], x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, {}, x, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, ( x: number ): number => x, x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a Complex64Array... +{ + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, 10, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, '10', 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, true, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, false, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, null, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, undefined, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, [ '1' ], 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, {}, 1, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, ( x: number ): number => x, 1, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, '10', beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, true, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, false, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, null, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, undefined, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, [], beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, {}, beta, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, ( x: number ): number => x, beta, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a Complex64... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, '10', y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, 1.0, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, true, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, false, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, null, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, undefined, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, [], y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, {}, y, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, ( x: number ): number => x, y, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eleventh argument which is not a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, 10, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, '10', 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, true, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, false, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, null, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, undefined, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, [], 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, {}, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, ( x: number ): number => x, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a twelfth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, '10' ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, true ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, false ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, null ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, undefined ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, [] ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, {} ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv(); // $ExpectError + chbmv( 'row-major' ); // $ExpectError + chbmv( 'row-major', 'lower' ); // $ExpectError + chbmv( 'row-major', 'lower', 10 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1 ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y ); // $ExpectError + chbmv( 'row-major', 'lower', 10, 10, alpha, A, 10, x, 1, beta, y, 1, 10 ); // $ExpectError +} + +// Attached to main export is an `ndarray` method which returns a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectType Complex64Array +} + +// The compiler throws an error if the function is provided a first argument which is not a string... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 10, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( true, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( false, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( null, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( undefined, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( [ '1' ], 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( {}, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( ( x: number ): number => x, 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', '10', 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', true, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', false, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', null, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', undefined, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', [], 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', {}, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', ( x: number ): number => x, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, '10', alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, true, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, false, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, null, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, undefined, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, [], alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, {}, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, ( x: number ): number => x, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a Complex64... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, '10', A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, 10, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, true, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, false, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, null, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, undefined, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, [], A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, {}, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, ( x: number ): number => x, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, 10, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, '10', 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, true, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, false, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, null, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, undefined, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, [], 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, {}, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, ( x: number ): number => x, 10, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, '10', 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, true, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, false, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, null, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, undefined, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, [], 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, {}, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, ( x: number ): number => x, 1, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, '10', 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, true, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, false, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, null, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, undefined, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, [], 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, {}, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, ( x: number ): number => x, 0, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, '10', x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, true, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, false, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, null, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, undefined, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, [], x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, {}, x, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, ( x: number ): number => x, x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a Complex64Array... +{ + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, 10, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, '10', 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, true, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, false, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, null, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, undefined, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, [], 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, {}, 1, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, ( x: number ): number => x, 1, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, '10', 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, true, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, false, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, null, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, undefined, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, [], 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, {}, 0, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, ( x: number ): number => x, 0, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eleventh argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, '10', beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, true, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, false, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, null, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, undefined, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, [], beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, {}, beta, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, ( x: number ): number => x, beta, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a twelfth argument which is not a Complex64... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, '10', y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, 10, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, true, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, false, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, null, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, undefined, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, [], y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, {}, y, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, ( x: number ): number => x, y, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a thirteenth argument which is not a Complex64Array... +{ + const x = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, 10, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, '10', 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, true, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, false, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, null, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, undefined, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, [], 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, {}, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, ( x: number ): number => x, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourteenth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, '10', 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, true, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, false, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, null, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, undefined, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, [], 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, {}, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifteenth argument which is not a number... +{ + const x = new Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, '10' ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, true ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, false ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, null ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, undefined ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, [] ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, {} ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 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 Complex64Array( 10 ); + const y = new Complex64Array( 10 ); + const A = new Complex64Array( 20 ); + const alpha = new Complex64( 0.5, 0.5 ); + const beta = new Complex64( 0.5, -0.5 ); + + chbmv.ndarray(); // $ExpectError + chbmv.ndarray( 'lower' ); // $ExpectError + chbmv.ndarray( 'lower', 10 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1 ); // $ExpectError + chbmv.ndarray( 'lower', 10, 10, alpha, A, 10, 1, 0, x, 1, 0, beta, y, 1, 0, 10 ); // $ExpectError +} From 594ac207a8395cb1cc63ee21b6ffd206cad40bc8 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 16:30:51 +0000 Subject: [PATCH 18/43] docs: repl.txt added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/docs/repl.txt | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt new file mode 100644 index 000000000000..1d229a4f23ba --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt @@ -0,0 +1,189 @@ + +{{alias}}( order, uplo, N, K, α, A, lda, x, sx, β, y, sy ) + Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` + are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by + `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + + Indexing is relative to the first index. To introduce an offset, use typed + array views. + + If `N` is equal to 0, the function returns `y` unchanged. + + If `α` equals `0 + 0i` and `β` equals `1 + 0i`, the function returns `y` + unchanged. + + Parameters + ---------- + order: string + Row-major (C-style) or column-major (Fortran-style) order. + + uplo: string + Specifies whether the upper or lower triangular matrix of `A` is + supplied. Must be either 'upper' or 'lower'. + + N: integer + Number of elements along each dimension of `A`. + + K: integer + Number of super-diagonals or sub-diagonals of matrix `A`. + + α: Complex64 + Complex scalar constant. + + A: Complex64Array + Complex input matrix. + + lda: integer + Stride of the first dimension of `A` (a.k.a., leading dimension of the + matrix `A`). + + x: Complex64Array + First complex input vector. + + sx: integer + Index increment for `x`. + + β: Complex64 + Complex scalar constant. + + y: Complex64Array + Second complex input vector. + + sy: integer + Index increment for `y`. + + Returns + ------- + y: Complex64Array + Second complex input vector. + + Examples + -------- + // Standard usage: + > var x = new {{alias:@stdlib/array/complex64}}([1.0,1.0,2.0,2.0,3.0,3.0]); + > var y = new {{alias:@stdlib/array/complex64}}([3.0,3.0,2.0,2.0,1.0,1.0]); + > var buf1 = [0.0,0.0,1.0,0.0,2.0,-2.0]; + > var buf2 = [3.0,0.0,4.0,-4.0,5.0,0.0]; + > var buf = buf1.concat( buf2 ); + > var A = new {{alias:@stdlib/array/complex64}}( buf ); + > var alpha = new {{alias:@stdlib/complex/float32/ctor}}(0.5,0.5); + > var beta = new {{alias:@stdlib/complex/float32/ctor}}(0.5,-0.5); + > var ord = 'row-major'; + > var uplo = 'lower'; + > {{alias}}( ord, uplo, 3, 1, alpha, A, 2, x, 1, beta, y, 1 ) + [-1.0,5.0,-8.0,20.0,9.0,23.0] + + // Advanced indexing: + > x = new {{alias:@stdlib/array/complex64}}([3.0,3.0,2.0,2.0,1.0,1.0]); + > y = new {{alias:@stdlib/array/complex64}}([1.0,1.0,2.0,2.0,3.0,3.0]); + > buf1 = [0.0,0.0,1.0,0.0,2.0,-2.0]; + > buf2 = [3.0,0.0,4.0,-4.0,5.0,0.0]; + > buf = buf1.concat( buf2 ); + > A = new {{alias:@stdlib/array/complex64}}( buf ); + > alpha = new {{alias:@stdlib/complex/float32/ctor}}(0.5,0.5); + > beta = new {{alias:@stdlib/complex/float32/ctor}}(0.5,-0.5); + > ord = 'row-major'; + > uplo = 'lower'; + > {{alias}}( ord, uplo, 3, 1, alpha, A, 2, x, -1, beta, y, -1 ) + [9.0,23.0,-8.0,20.0,-1.0,5.0] + + // Using typed array views: + > var x0buf = [0.0,0.0,3.0,3.0,2.0,2.0,1.0,1.0]; + > var x0 = new {{alias:@stdlib/array/complex64}}( x0buf ); + > var y0buf = [0.0,0.0,1.0,1.0,2.0,2.0,3.0,3.0]; + > var y0 = new {{alias:@stdlib/array/complex64}}( y0buf ); + > var x0bytes = x0.BYTES_PER_ELEMENT*1; + > var x1 = new {{alias:@stdlib/array/complex64}}( x0.buffer, x0bytes ); + > var y0bytes = y0.BYTES_PER_ELEMENT*1; + > var y1 = new {{alias:@stdlib/array/complex64}}( y0.buffer, y0bytes ); + > buf1 = [0.0,0.0,1.0,0.0,2.0,-2.0]; + > buf2 = [3.0,0.0,4.0,-4.0,5.0,0.0]; + > buf = buf1.concat( buf2 ); + > A = new {{alias:@stdlib/array/complex64}}( buf ); + > alpha = new {{alias:@stdlib/complex/float32/ctor}}(0.5,0.5); + > beta = new {{alias:@stdlib/complex/float32/ctor}}(0.5,-0.5); + > ord = 'row-major'; + > uplo = 'lower'; + > {{alias}}( ord, uplo, 3, 1, alpha, A, 2, x1, -1, beta, y1, -1 ) + [9.0,23.0,-8.0,20.0,-1.0,5.0] + + +{{alias}}.ndarray( uplo, N, K, α, A, sa1, sa2, oa, x, sx, ox, β, y, sy, oy ) + Performs the matrix-vector operation `y = α*A*x + β*y` using alternative + indexing semantics and, where `α` and `β` are complex scalars, `x` and `y` + are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` + sub-diagonals or super-diagonals. + + While typed array views mandate a view offset based on the underlying buffer + , the offset parameters support indexing semantics based on starting + indices. + + Parameters + ---------- + uplo: string + Specifies whether the upper or lower triangular matrix of `A` is + supplied. Must be either 'upper' or 'lower'. + + N: integer + Number of columns in `A`. + + K: integer + Number of super-diagonals or sub-diagonals of matrix `A`. + + α: Complex64 + Complex scalar constant. + + A: Complex64Array + Complex input matrix. + + sa1: integer + Stride of the first dimension of `A`. + + sa2: integer + Stride of the second dimension of `A`. + + oa: integer + Starting index (offset) for `A`. + + x: Complex64Array + First complex input vector. + + sx: integer + Index increment for `x`. + + ox: integer + Starting index (offset) for `x`. + + β: Complex64 + Complex scalar constant. + + y: Complex64Array + Second complex input vector. + + sy: integer + Index increment for `y`. + + oy: integer + Starting index (offset) for `y`. + + Returns + ------- + y: Complex64Array + Second complex input vector. + + Examples + -------- + > x = new {{alias:@stdlib/array/complex64}}([1.0,1.0,2.0,2.0,3.0,3.0]); + > y = new {{alias:@stdlib/array/complex64}}([3.0,3.0,2.0,2.0,1.0,1.0]); + > buf1 = [0.0,0.0,1.0,0.0,2.0,-2.0]; + > buf2 = [3.0,0.0,4.0,-4.0,5.0,0.0]; + > buf = buf1.concat( buf2 ); + > A = new {{alias:@stdlib/array/complex64}}( buf ); + > alpha = new {{alias:@stdlib/complex/float32/ctor}}(0.5,0.5); + > beta = new {{alias:@stdlib/complex/float32/ctor}}(0.5,-0.5); + > uplo = 'lower'; + > {{alias}}.ndarray(uplo,3,1,alpha,A,2,1,0,x,1,0,beta,y,1,0) + [-1.0,5.0,-8.0,20.0,9.0,23.0] + + See Also + -------- From c233b630a70292ae774d5361f7170e493c73e1d0 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 17:20:00 +0000 Subject: [PATCH 19/43] docs: example added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/expamles/index.js | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js new file mode 100644 index 000000000000..8deade348d1b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js @@ -0,0 +1,70 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ); +var filledarrayBy = require( '@stdlib/array/filled-by' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var logEach = require( '@stdlib/console/log-each' ); +var chgmv = require( './../lib' ); + +var alpha; +var beta; +var N; +var K; +var x; +var y; +var A; + + +// FUNCTIONS // + +/** +* Generates a random complex number with discrete uniform real and imaginary parts. +* +* @private +* @returns {Complex64} random complex number +* +* @example +* var z = rand(); +* // returns a +*/ +function rand() { + return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); +} + +N = 3; +K = 1; + +x = filledarrayBy( N, 'complex64', rand ); +y = filledarrayBy( N, 'complex64', rand ); +A = filledarrayBy( N*(K+1), 'complex64', rand ); + +alpha = new Complex64( 2.0, 3.0 ); +beta = new Complex64( 3.0, -2.0 ); + +chgmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); + +// Print the results: +logEach( '(%s)', y ); + +chgmv.ndarray( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 1, 0 ); + +// Print the results: +logEach( '(%s)', y ); From e5b1963d31402342d96b16079b9faf359e029c4a Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 17:39:09 +0000 Subject: [PATCH 20/43] bench: benchmark added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../blas/base/chbmv/benchmark/benchmark.js | 127 ++++++++++++++++++ .../base/chbmv/benchmark/benchmark.ndarray.js | 127 ++++++++++++++++++ 2 files changed, 254 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js new file mode 100644 index 000000000000..c99b1fb8d35b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js @@ -0,0 +1,127 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var chbmv = require( './../lib/chbmv.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 alpha; + var beta; + var xbuf; + var ybuf; + var Abuf; + var x; + var y; + var A; + var K; + + K = N - 1; + + xbuf = uniform( N*2, -100.0, 100.0, options ); + x = new Complex64Array( xbuf.buffer ); + ybuf = uniform( N*2, -100.0, 100.0, options ); + y = new Complex64Array( ybuf.buffer ); + Abuf = uniform( (N*(K+1))*2, -100.0, 100.0, options ); + A = new Complex64Array( Abuf.buffer ); + + alpha = new Complex64( 0.5, 0.5 ); + beta = new Complex64( 0.5, -0.5 ); + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = chbmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); + 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 min; + var max; + var N; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( N ); + bench( format( '%s:size=%d', pkg, N*N ), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js new file mode 100644 index 000000000000..0f0b376e8e8a --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js @@ -0,0 +1,127 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var chgmv = 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 alpha; + var beta; + var xbuf; + var ybuf; + var Abuf; + var x; + var y; + var A; + var K; + + K = N - 1; + + xbuf = uniform( N*2, -100.0, 100.0, options ); + x = new Complex64Array( xbuf.buffer ); + ybuf = uniform( N*2, -100.0, 100.0, options ); + y = new Complex64Array( ybuf.buffer ); + Abuf = uniform( (N*(K+1))*2, -100.0, 100.0, options ); + A = new Complex64Array( Abuf.buffer ); + + alpha = new Complex64( 0.5, 0.5 ); + beta = new Complex64( 0.5, -0.5 ); + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + var z; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = chgmv( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 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 min; + var max; + var N; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + N = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( N ); + bench( format( '%s:ndarray:size=%d', pkg, N*N ), f ); + } +} + +main(); From 9ccf0178e06504b51bd0f44229215f77b19622b5 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 17:47:32 +0000 Subject: [PATCH 21/43] chore: typos fixed --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/examples/index.js | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js new file mode 100644 index 000000000000..8deade348d1b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js @@ -0,0 +1,70 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ); +var filledarrayBy = require( '@stdlib/array/filled-by' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var logEach = require( '@stdlib/console/log-each' ); +var chgmv = require( './../lib' ); + +var alpha; +var beta; +var N; +var K; +var x; +var y; +var A; + + +// FUNCTIONS // + +/** +* Generates a random complex number with discrete uniform real and imaginary parts. +* +* @private +* @returns {Complex64} random complex number +* +* @example +* var z = rand(); +* // returns a +*/ +function rand() { + return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); +} + +N = 3; +K = 1; + +x = filledarrayBy( N, 'complex64', rand ); +y = filledarrayBy( N, 'complex64', rand ); +A = filledarrayBy( N*(K+1), 'complex64', rand ); + +alpha = new Complex64( 2.0, 3.0 ); +beta = new Complex64( 3.0, -2.0 ); + +chgmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); + +// Print the results: +logEach( '(%s)', y ); + +chgmv.ndarray( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 1, 0 ); + +// Print the results: +logEach( '(%s)', y ); From bd612ecbf43cb788639c1f05c65d92f718491ab6 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 17:56:27 +0000 Subject: [PATCH 22/43] chore: typo fixed --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/expamles/index.js | 70 ------------------- .../@stdlib/blas/base/chbmv/package.json | 2 +- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js deleted file mode 100644 index 8deade348d1b..000000000000 --- a/lib/node_modules/@stdlib/blas/base/chbmv/expamles/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2026 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ); -var filledarrayBy = require( '@stdlib/array/filled-by' ); -var Complex64 = require( '@stdlib/complex/float32/ctor' ); -var logEach = require( '@stdlib/console/log-each' ); -var chgmv = require( './../lib' ); - -var alpha; -var beta; -var N; -var K; -var x; -var y; -var A; - - -// FUNCTIONS // - -/** -* Generates a random complex number with discrete uniform real and imaginary parts. -* -* @private -* @returns {Complex64} random complex number -* -* @example -* var z = rand(); -* // returns a -*/ -function rand() { - return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); -} - -N = 3; -K = 1; - -x = filledarrayBy( N, 'complex64', rand ); -y = filledarrayBy( N, 'complex64', rand ); -A = filledarrayBy( N*(K+1), 'complex64', rand ); - -alpha = new Complex64( 2.0, 3.0 ); -beta = new Complex64( 3.0, -2.0 ); - -chgmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); - -// Print the results: -logEach( '(%s)', y ); - -chgmv.ndarray( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 1, 0 ); - -// Print the results: -logEach( '(%s)', y ); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/package.json b/lib/node_modules/@stdlib/blas/base/chbmv/package.json index 73fcf21dd13d..a090177fd92a 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/package.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/package.json @@ -38,7 +38,7 @@ "node": ">=0.10.0", "npm": ">2.7.0" }, -"os": [ + "os": [ "aix", "darwin", "freebsd", From eaf4a76b1217935a63e88ebd9b64e98ae7b3ba21 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 24 Mar 2026 18:14:16 +0000 Subject: [PATCH 23/43] docs: readme added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/README.md | 298 ++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/chbmv/README.md diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/README.md b/lib/node_modules/@stdlib/blas/base/chbmv/README.md new file mode 100644 index 000000000000..2e5523435e59 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/chbmv/README.md @@ -0,0 +1,298 @@ + + +# chbmv + +> Performs the matrix-vector operation `y = α*A*x + β*y` for complex-valued data. + +
+ +## Usage + +```javascript +var chbmv = require( '@stdlib/blas/base/chbmv' ); +``` + +#### chbmv( order, uplo, N, K, α, A, LDA, x, sx, β, y, sy ) + +Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + +```javascript +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 1, beta, y, 1 ); +// y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +``` + +The function has the following parameters: + +- **order**: storage layout. +- **uplo**: specifies whether the upper or lower triangular part of the matrix `A` is supplied. +- **N**: specifies number of elements along each dimension of `A` +- **K**: specifies number of super-diagonals or sub-diagonals of matrix `A`. +- **α**: complex scalar constant. +- **A**: complex input matrix stored in linear memory as a [`Complex64Array`][@stdlib/array/complex64]. +- **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). +- **x**: complex input vector [`Complex64Array`][@stdlib/array/complex64]. +- **sx**: stride length for `x`. +- **β**: complex scalar constant. +- **y**: output [`Complex64Array`][@stdlib/array/complex64]. +- **sy**: stride length for `y`. + +The stride parameters determine how elements are accessed. For example, to iterate over every other element in `x` and `y`, + +```javascript +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var x = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0 ] ); // eslint-disable-line max-params, max-len +var y = new Complex64Array( [ 3.0, 3.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0 ] ); // eslint-disable-line max-params, max-len +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 3, beta, y, 2 ); +// y => [ -1.0, 5.0, 0.0, 0.0, -8.0, 20.0, 0.0, 0.0, 9.0, 23.0 ] +``` + +Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. + + + +```javascript +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +// Initial arrays... +var x0 = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +var y0 = new Complex64Array( [ 0.0, 0.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); // eslint-disable-line max-params, max-len +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +// Create offset views... +var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd complex element +var y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd complex element + +chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x1, 1, beta, y1, 1 ); +// y1 => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] +``` + + + +#### chbmv.ndarray( uplo, N, K, α, A, sa1, sa2, oa, x, sx, ox, β, y, sy, oy ) + +Performs the matrix-vector operation `y = α*A*x + β*y` using alternative indexing semantics, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + +```javascript +var Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 0, beta, y, 1, 0 ); +// y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.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 Complex64Array = require( '@stdlib/array/complex64' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); + +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var x = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); +var y = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0, 3.0 ] ); // eslint-disable-line max-params, max-len + +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +chbmv.ndarray( 'lower', 3, 1, alpha, A, 1, 2, 0, x, 1, 1, beta, y, -1, 4 ); +// y => [ 9.0, 23.0, 0.0, 0.0, -8.0, 20.0, 0.0, 0.0, -1.0, 5.0 ] +``` + +
+ + + +
+ +## Notes + +- `chbmv()` corresponds to the [BLAS][blas] level 2 function [`chbmv`][chbmv]. + +
+ + + +
+ +## Examples + + + +```javascript +var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ); +var Complex64 = require( '@stdlib/complex/float32/ctor' ); +var filledarrayBy = require( '@stdlib/array/filled-by' ); +var logEach = require( '@stdlib/console/log-each' ); +var chbmv = require( '@stdlib/blas/base/chbmv' ); + +function rand() { + return new Complex64( discreteUniform( 0, 255 ), discreteUniform( -128, 127 ) ); // eslint-disable-line max-params, max-len +} + +var N = 3; +var K = 1; + +var A = filledarrayBy( N*(K+1), 'complex64', rand ); +var x = filledarrayBy( N, 'complex64', rand ); +var y = filledarrayBy( N, 'complex64', rand ); + +var alpha = new Complex64( 0.5, 0.5 ); +var beta = new Complex64( 0.5, -0.5 ); + +chbmv( 'row-major', 'lower', N, 1, alpha, A, (K+1), x, 1, beta, y, 1 ); + +// Print the results: +logEach( '(%s)', x ); + +chbmv.ndarray( 'lower', N, 1, alpha, A, (K+1), 1, 0, x, 1, 0, beta, y, 1, 0 ); + +// Print the results: +logEach( '(%s)', x ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +TODO +``` + +#### TODO + +TODO. + +```c +TODO +``` + +TODO + +```c +TODO +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +TODO +``` + +
+ + + +
+ + + + + + + + + + + + + + From 207603f9fe25b25210c0be21190e59e490a4a112 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 1 Apr 2026 13:24:42 +0000 Subject: [PATCH 24/43] feat: cache locality imporved --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 40dcc22357e1..27f0c9e3d4d9 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -169,9 +169,10 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o iy = oy + ( i1 * sy ); viewY[ iy ] += f32( retmp1 * rea ); viewY[ iy + 1 ] += f32( imtmp1 * rea ); + m = -i1; + oa2 = oa + ( i1 * sa1 ) + ( m * sa0 ); for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { - m = i0 - i1; - ia = oa2 + ( m * sa0 ); + ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; @@ -198,10 +199,10 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - oa2 = oa + ( i1 * sa1 ); + m = K - i1; + oa2 = oa + ( i1 * sa1 ) + ( m * sa0 ); for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { - m = i0 - i1; - ia = oa2 + ( ( K + m ) * sa0 ); + ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; @@ -213,7 +214,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); } - ia = oa2 + ( K * sa0 ); + ia = oa2 + ( i1 * sa0 ); rea = viewA[ ia ]; iy = oy + ( i1 * sy ); viewY[ iy ] += f32( retmp1 * rea ); From 1395e8cb718a9ad7601e71e6f09d24cfaf0c4001 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 1 Apr 2026 13:46:34 +0000 Subject: [PATCH 25/43] chore: oa3 variable added --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 27f0c9e3d4d9..25c1d3241a85 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -86,6 +86,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var sa0; var sa1; var oa2; + var oa3; var rea; var ima; var rex; @@ -163,14 +164,14 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - oa2 = oa + ( i1 * sa1 ); - ia = oa2; + oa3 = oa + ( i1 * sa1 ); + ia = oa3; rea = viewA[ ia ]; iy = oy + ( i1 * sy ); viewY[ iy ] += f32( retmp1 * rea ); viewY[ iy + 1 ] += f32( imtmp1 * rea ); m = -i1; - oa2 = oa + ( i1 * sa1 ) + ( m * sa0 ); + oa2 = oa3 + ( m * sa0 ); for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; @@ -199,8 +200,9 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; + oa3 = oa + ( i1 * sa1 ); m = K - i1; - oa2 = oa + ( i1 * sa1 ) + ( m * sa0 ); + oa2 = oa3 + ( m * sa0 ); for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; @@ -214,7 +216,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); } - ia = oa2 + ( i1 * sa0 ); + ia = oa3 + ( K * sa0 ); rea = viewA[ ia ]; iy = oy + ( i1 * sy ); viewY[ iy ] += f32( retmp1 * rea ); From bf51472f22b5f9333cc8a9c7cfaee36e934a0233 Mon Sep 17 00:00:00 2001 From: Divit Date: Thu, 9 Apr 2026 14:10:27 +0000 Subject: [PATCH 26/43] docs: update link tp chbmv --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/README.md b/lib/node_modules/@stdlib/blas/base/chbmv/README.md index 2e5523435e59..a406ad51247b 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/README.md +++ b/lib/node_modules/@stdlib/blas/base/chbmv/README.md @@ -143,7 +143,7 @@ var y = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0, 3.0 ] var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); -chbmv.ndarray( 'lower', 3, 1, alpha, A, 1, 2, 0, x, 1, 1, beta, y, -1, 4 ); +chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 1, beta, y, -2, 4 ); // y => [ 9.0, 23.0, 0.0, 0.0, -8.0, 20.0, 0.0, 0.0, -1.0, 5.0 ] ``` @@ -287,7 +287,7 @@ TODO [blas]: http://www.netlib.org/blas -[chbmv]: https://www.netlib.org/lapack/explore-html/d7/dda/group__gemv_ga44c85a0d7ecd60a6bc8ca27b222d7792.html#ga44c85a0d7ecd60a6bc8ca27b222d7792 +[chbmv]: https://www.netlib.org/lapack/explore-html/da/dd4/group__hbmv_gaf3753b609f411bbc719b8de9f9606e12.html#gaf3753b609f411bbc719b8de9f9606e12 [mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray From fc8ca6542a108cd22b6d4bcf3a1a9e5eca809a1b Mon Sep 17 00:00:00 2001 From: Divit Date: Thu, 9 Apr 2026 14:14:21 +0000 Subject: [PATCH 27/43] test: cover zero-beta branch in ndarray --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../blas/base/chbmv/test/test.chbmv.js | 54 +++++++++++++++++++ .../blas/base/chbmv/test/test.ndarray.js | 54 +++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js index b5979c1728d4..d94f38f0713b 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js @@ -594,6 +594,60 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec t.end(); }); +tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vector (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ra; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 0.0, 0.0 ); + + expected = new Complex64Array( data.y.length ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.deepEqual( out, expected, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vector (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ca; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 0.0, 0.0 ); + + expected = new Complex64Array( data.y.length ); + + out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); + t.deepEqual( out, expected, true, 'returns expected value' ); + + t.end(); +}); + tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { var expected; var alpha; diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index ce85bd321a76..a85db4759ee4 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -600,6 +600,60 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec t.end(); }); +tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vector (row-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ra; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 0.0, 0.0 ); + + expected = new Complex64Array( data.y.length ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.deepEqual( out, expected, true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vector (column-major)', function test( t ) { + var expected; + var alpha; + var data; + var beta; + var out; + var a; + var x; + var y; + + data = ca; + + a = new Complex64Array( data.A ); + x = new Complex64Array( data.x ); + y = new Complex64Array( data.y ); + + alpha = new Complex64( 0.0, 0.0 ); + beta = new Complex64( 0.0, 0.0 ); + + expected = new Complex64Array( data.y.length ); + + out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); + t.deepEqual( out, expected, true, 'returns expected value' ); + + t.end(); +}); + tape( 'if `x` contains only zeros and `β` is `1`, the function returns the second input vector unchanged (row-major)', function test( t ) { var expected; var alpha; From eb547e935bd807f8e40b81fd1921dfb7982c1b5e Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 06:21:44 +0000 Subject: [PATCH 28/43] test: remove strideA1 and strideA2 validations and tests --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/chbmv.js | 1 + .../@stdlib/blas/base/chbmv/lib/ndarray.js | 9 +-- .../blas/base/chbmv/test/test.ndarray.js | 70 ------------------- 3 files changed, 2 insertions(+), 78 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js index 41f3975b19e7..8e37bf46d128 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js @@ -50,6 +50,7 @@ var base = require( './base.js' ); * @throws {TypeError} first argument must be a valid order * @throws {TypeError} second argument must specify whether to reference the lower or upper triangular matrix * @throws {RangeError} third argument must be a nonnegative integer +* @throws {RangeError} fourth argument must be a nonnegative integer * @throws {RangeError} seventh argument must be a valid stride * @throws {RangeError} ninth argument must be non-zero * @throws {RangeError} twelfth argument must be non-zero diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js index 88aa5e1448cb..83ec070044e1 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js @@ -49,8 +49,7 @@ var base = require( './base.js' ); * @param {NonNegativeInteger} offsetY - starting index for `y` * @throws {TypeError} first argument must specify whether to reference the lower or upper triangular matrix * @throws {RangeError} second argument must be a nonnegative integer -* @throws {RangeError} sixth argument must be non-zero -* @throws {RangeError} seventh argument must be non-zero +* @throws {RangeError} third argument must be a nonnegative integer * @throws {RangeError} tenth argument must be non-zero * @throws {RangeError} fourteenth argument must be non-zero * @returns {Complex64Array} `y` @@ -82,12 +81,6 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o if ( K < 0 ) { throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', K ) ); } - if ( strideA1 === 0 ) { - throw new RangeError( format( 'invalid argument. Sixth argument must be non-zero. Value: `%d`.', strideA1 ) ); - } - if ( strideA2 === 0 ) { - throw new RangeError( format( 'invalid argument. Seventh argument must be non-zero. Value: `%d`.', strideA2 ) ); - } if ( strideX === 0 ) { throw new RangeError( format( 'invalid argument. Tenth argument must be non-zero. Value: `%d`.', strideX ) ); } diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index a85db4759ee4..61ec6c1cc58e 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -188,76 +188,6 @@ tape( 'the function throws an error if provided an invalid third argument', func } }); -tape( 'the function throws an error if provided an invalid sixth argument', function test( t ) { - var values; - var alpha; - var data; - var beta; - var i; - var a; - var x; - var y; - - data = rl; - - a = new Complex64Array( data.A ); - x = new Complex64Array( data.x ); - y = new Complex64Array( data.y ); - - alpha = new Complex64( data.alpha[0], data.alpha[1] ); - beta = new Complex64( data.beta[0], data.beta[1] ); - - 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() { - chbmv( data.uplo, data.N, data.K, alpha, a, value, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - }; - } -}); - -tape( 'the function throws an error if provided an invalid seventh argument', function test( t ) { - var values; - var alpha; - var data; - var beta; - var i; - var a; - var x; - var y; - - data = rl; - - a = new Complex64Array( data.A ); - x = new Complex64Array( data.x ); - y = new Complex64Array( data.y ); - - alpha = new Complex64( data.alpha[0], data.alpha[1] ); - beta = new Complex64( data.beta[0], data.beta[1] ); - - 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() { - chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, value, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - }; - } -}); - tape( 'the function throws an error if provided an invalid tenth argument', function test( t ) { var values; var alpha; From 4b1bb9338a53ce325a94f60631077b43f774ad16 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 16:58:20 +0000 Subject: [PATCH 29/43] refactor: improve float32 precision for addition assignment --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 25c1d3241a85..da5f87718e9f 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -168,8 +168,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o ia = oa3; rea = viewA[ ia ]; iy = oy + ( i1 * sy ); - viewY[ iy ] += f32( retmp1 * rea ); - viewY[ iy + 1 ] += f32( imtmp1 * rea ); + viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); + viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); m = -i1; oa2 = oa3 + ( m * sa0 ); for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { @@ -182,8 +182,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o ix = ox + ( i0 * sx ); rex = viewX[ ix ]; imx = viewX[ ix + 1 ]; - retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); - imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); + retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); + imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); } iy = oy + ( i1 * sy ); muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len @@ -213,14 +213,14 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o ix = ox + ( i0 * sx ); rex = viewX[ ix ]; imx = viewX[ ix + 1 ]; - retmp2 += f32( ( rea * rex ) + ( cima * imx ) ); - imtmp2 += f32( ( rea * imx ) - ( cima * rex ) ); + retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); + imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); } ia = oa3 + ( K * sa0 ); rea = viewA[ ia ]; iy = oy + ( i1 * sy ); - viewY[ iy ] += f32( retmp1 * rea ); - viewY[ iy + 1 ] += f32( imtmp1 * rea ); + viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); + viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len } return y; From 58d128c467732ea900baf18d05350a04b1d2cc8f Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 17:44:10 +0000 Subject: [PATCH 30/43] refactor: update index recalculation to stride addition --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 66 ++++++++++++------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index da5f87718e9f..84327bbb1b4c 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -91,6 +91,10 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var ima; var rex; var imx; + var ix0; + var ix1; + var iy0; + var iy1; var ix; var iy; var oa; @@ -101,7 +105,6 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var i0; var i1; var ia; - var m; // Layout isrm = isRowMajor( [ strideA1, strideA2 ] ); @@ -156,72 +159,91 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o sy = strideY * 2; if ( ( isrm && uplo === 'upper' ) || ( !isrm && uplo === 'lower' ) ) { + oa3 = oa; + ix1 = ox; + iy1 = oy; for ( i1 = 0; i1 < N; i1++ ) { - ix = ox + ( i1 * sx ); - rex = viewX[ ix ]; - imx = viewX[ ix + 1 ]; + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - oa3 = oa + ( i1 * sa1 ); ia = oa3; rea = viewA[ ia ]; - iy = oy + ( i1 * sy ); + iy = iy1; viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); - m = -i1; - oa2 = oa3 + ( m * sa0 ); + ia = oa3 + sa0; + ix = ix1 + sx; + iy = iy1 + sy; for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { - ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; - iy = oy + ( i0 * sy ); muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len - ix = ox + ( i0 * sx ); rex = viewX[ ix ]; imx = viewX[ ix + 1 ]; retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); + ia += sa0; + ix += sx; + iy += sy; } - iy = oy + ( i1 * sy ); + iy = iy1; muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + ix1 += sx; + iy1 += sy; + oa3 += sa1; } return y; } // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) + oa3 = oa; + oa2 = oa + ( K * sa0 ); + ix1 = ox; + iy1 = oy; + ix0 = ox; + iy0 = oy; for ( i1 = 0; i1 < N; i1++ ) { - ix = ox + ( i1 * sx ); - rex = viewX[ ix ]; - imx = viewX[ ix + 1 ]; + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - oa3 = oa + ( i1 * sa1 ); - m = K - i1; - oa2 = oa3 + ( m * sa0 ); + ia = oa2; + ix = ix0; + iy = iy0; for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { - ia = oa2 + ( i0 * sa0 ); rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; - iy = oy + ( i0 * sy ); muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len - ix = ox + ( i0 * sx ); rex = viewX[ ix ]; imx = viewX[ ix + 1 ]; retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); + ia += sa0; + ix += sx; + iy += sy; } ia = oa3 + ( K * sa0 ); rea = viewA[ ia ]; - iy = oy + ( i1 * sy ); + iy = iy1; viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + oa2 += ( sa1 - sa0 ); + if ( i1 >= K ) { + oa2 += sa0; + ix0 += sx; + iy0 += sy; + } + oa3 += sa1; + ix1 += sx; + iy1 += sy; } return y; } From a4a8638c70630f78b6ad156f7946a31331911d2a Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 17:56:41 +0000 Subject: [PATCH 31/43] refactor: update branch 1 poniters --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 84327bbb1b4c..1e5b1f1876c6 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -158,10 +158,11 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o sx = strideX * 2; sy = strideY * 2; + oa3 = oa; + ix1 = ox; + iy1 = oy; + if ( ( isrm && uplo === 'upper' ) || ( !isrm && uplo === 'lower' ) ) { - oa3 = oa; - ix1 = ox; - iy1 = oy; for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; imx = viewX[ ix1 + 1 ]; @@ -171,27 +172,25 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp2 = 0.0; ia = oa3; rea = viewA[ ia ]; - iy = iy1; - viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); - viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); + viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); + viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); ia = oa3 + sa0; - ix = ix1 + sx; - iy = iy1 + sy; + ix0 = ix1 + sx; + iy0 = iy1 + sy; for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; - muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len - rex = viewX[ ix ]; - imx = viewX[ ix + 1 ]; + muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0 + 1 ], viewY, 1, iy0 ); // eslint-disable-line max-len + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); ia += sa0; - ix += sx; - iy += sy; + ix0 += sx; + iy0 += sy; } - iy = iy1; - muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len ix1 += sx; iy1 += sy; oa3 += sa1; @@ -200,10 +199,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o } // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) - oa3 = oa; oa2 = oa + ( K * sa0 ); - ix1 = ox; - iy1 = oy; ix0 = ox; iy0 = oy; for ( i1 = 0; i1 < N; i1++ ) { @@ -231,10 +227,9 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o } ia = oa3 + ( K * sa0 ); rea = viewA[ ia ]; - iy = iy1; - viewY[ iy ] = f32( viewY[ iy ] + ( retmp1 * rea ) ); - viewY[ iy + 1 ] = f32( viewY[ iy + 1 ] + ( imtmp1 * rea ) ); - muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len + viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); + viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len oa2 += ( sa1 - sa0 ); if ( i1 >= K ) { oa2 += sa0; From fe98043f95bdb344832187b31f338323cbf027ec Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 18:11:45 +0000 Subject: [PATCH 32/43] refactor: update branch 2 poniters --- .../@stdlib/blas/base/chbmv/lib/base.js | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 1e5b1f1876c6..f5b851cb6a97 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -93,8 +93,10 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var imx; var ix0; var ix1; + var ix2; var iy0; var iy1; + var iy2; var ix; var iy; var oa; @@ -200,8 +202,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) oa2 = oa + ( K * sa0 ); - ix0 = ox; - iy0 = oy; + ix2 = ox; + iy2 = oy; for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; imx = viewX[ ix1 + 1 ]; @@ -210,20 +212,20 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o retmp2 = 0.0; imtmp2 = 0.0; ia = oa2; - ix = ix0; - iy = iy0; + ix0 = ix2; + iy0 = iy2; for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; - muladd( retmp1, imtmp1, rea, cima, viewY[ iy ], viewY[ iy + 1 ], viewY, 1, iy ); // eslint-disable-line max-len - rex = viewX[ ix ]; - imx = viewX[ ix + 1 ]; + muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0 + 1 ], viewY, 1, iy0 ); // eslint-disable-line max-len + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); ia += sa0; - ix += sx; - iy += sy; + ix0 += sx; + iy0 += sy; } ia = oa3 + ( K * sa0 ); rea = viewA[ ia ]; @@ -233,8 +235,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o oa2 += ( sa1 - sa0 ); if ( i1 >= K ) { oa2 += sa0; - ix0 += sx; - iy0 += sy; + ix2 += sx; + iy2 += sy; } oa3 += sa1; ix1 += sx; From 4d484d286918f8304e12806d8bac80b6185c4195 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 18:58:30 +0000 Subject: [PATCH 33/43] refactor: update branch 2 poniters --- .../@stdlib/blas/base/chbmv/lib/base.js | 36 +++++++------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index f5b851cb6a97..2ae099191c05 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -71,6 +71,7 @@ var min = require( '@stdlib/math/base/special/min' ); function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len var realpha; var imalpha; + var i0start; var rebeta; var imbeta; var retmp1; @@ -86,19 +87,14 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var sa0; var sa1; var oa2; - var oa3; var rea; var ima; var rex; var imx; var ix0; var ix1; - var ix2; var iy0; var iy1; - var iy2; - var ix; - var iy; var oa; var ox; var oy; @@ -160,7 +156,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o sx = strideX * 2; sy = strideY * 2; - oa3 = oa; + oa2 = oa; ix1 = ox; iy1 = oy; @@ -172,11 +168,11 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - ia = oa3; + ia = oa2; rea = viewA[ ia ]; viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); - ia = oa3 + sa0; + ia = oa2 + sa0; ix0 = ix1 + sx; iy0 = iy1 + sy; for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { @@ -195,15 +191,12 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len ix1 += sx; iy1 += sy; - oa3 += sa1; + oa2 += sa1; } return y; } // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) - oa2 = oa + ( K * sa0 ); - ix2 = ox; - iy2 = oy; for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; imx = viewX[ ix1 + 1 ]; @@ -211,10 +204,11 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - ia = oa2; - ix0 = ix2; - iy0 = iy2; - for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { + var i0start = max( 0, i1 - K ); + ia = oa2 + ( ( K - i1 + i0start ) * sa0 ); // offset calculation from band storage + ix0 = ox + ( i0start * sx ); + iy0 = oy + ( i0start * sy ); + for ( i0 = i0start; i0 < i1; i0++ ) { rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; @@ -227,20 +221,14 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o ix0 += sx; iy0 += sy; } - ia = oa3 + ( K * sa0 ); + ia = oa2 + ( K * sa0 ); rea = viewA[ ia ]; viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len - oa2 += ( sa1 - sa0 ); - if ( i1 >= K ) { - oa2 += sa0; - ix2 += sx; - iy2 += sy; - } - oa3 += sa1; ix1 += sx; iy1 += sy; + oa2 += sa1; } return y; } From 0233b3ccc0ebd5f9ac4daebda6196fb21d9acf69 Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 19:07:41 +0000 Subject: [PATCH 34/43] refactor: update branch 2 poniters --- lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 2ae099191c05..d99bf7d64a1a 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -78,6 +78,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var imtmp1; var retmp2; var imtmp2; + var i0end; var viewA; var viewX; var viewY; @@ -172,10 +173,11 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o rea = viewA[ ia ]; viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); + i0end = min( N, i1 + K + 1 ); ia = oa2 + sa0; ix0 = ix1 + sx; iy0 = iy1 + sy; - for ( i0 = i1 + 1; i0 < min( N, i1 + K + 1 ); i0++ ) { + for ( i0 = i1 + 1; i0 < i0end; i0++ ) { rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; cima = sign * ima; @@ -204,8 +206,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); retmp2 = 0.0; imtmp2 = 0.0; - var i0start = max( 0, i1 - K ); - ia = oa2 + ( ( K - i1 + i0start ) * sa0 ); // offset calculation from band storage + i0start = max( 0, i1 - K ); + ia = oa2 + ( ( K - i1 + i0start ) * sa0 ); ix0 = ox + ( i0start * sx ); iy0 = oy + ( i0start * sy ); for ( i0 = i0start; i0 < i1; i0++ ) { From b7dd47d6fceb9f5976486fc2667fdc86623c9fcb Mon Sep 17 00:00:00 2001 From: Divit Date: Wed, 15 Apr 2026 19:11:24 +0000 Subject: [PATCH 35/43] refactor: update branch 2 poniters --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index d99bf7d64a1a..4bd0a0699596 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -173,10 +173,10 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o rea = viewA[ ia ]; viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); - i0end = min( N, i1 + K + 1 ); ia = oa2 + sa0; ix0 = ix1 + sx; iy0 = iy1 + sy; + i0end = min( N, i1 + K + 1 ); for ( i0 = i1 + 1; i0 < i0end; i0++ ) { rea = viewA[ ia ]; ima = viewA[ ia + 1 ]; From 4b26d077455a037713ac566ebf510953b60721f9 Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 18 Apr 2026 06:13:15 +0000 Subject: [PATCH 36/43] chore: clean up in benchmark --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/benchmark/benchmark.js | 6 +++--- .../@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js index c99b1fb8d35b..bfdeb7d5ee2a 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.js @@ -59,7 +59,7 @@ function createBenchmark( N ) { var A; var K; - K = N - 1; + K = N-1; xbuf = uniform( N*2, -100.0, 100.0, options ); x = new Complex64Array( xbuf.buffer ); @@ -86,12 +86,12 @@ function createBenchmark( N ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { z = chbmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); - if ( isnanf( z[ i% ( z.length ) ] ) ) { + if ( isnanf( z[ i%z.length ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnanf( z[ i % ( z.length ) ] ) ) { + if ( isnanf( z[ i%z.length ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js index 0f0b376e8e8a..0e476ac2f97e 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/benchmark/benchmark.ndarray.js @@ -59,7 +59,7 @@ function createBenchmark( N ) { var A; var K; - K = N - 1; + K = N-1; xbuf = uniform( N*2, -100.0, 100.0, options ); x = new Complex64Array( xbuf.buffer ); @@ -86,12 +86,12 @@ function createBenchmark( N ) { b.tic(); for ( i = 0; i < b.iterations; i++ ) { z = chgmv( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 1, 0 ); - if ( isnanf( z[ i % ( z.length ) ] ) ) { + if ( isnanf( z[ i%z.length ] ) ) { b.fail( 'should not return NaN' ); } } b.toc(); - if ( isnanf( z[ i % ( z.length ) ] ) ) { + if ( isnanf( z[ i%z.length ] ) ) { b.fail( 'should not return NaN' ); } b.pass( 'benchmark finished' ); From 28675da0caed4c25a4450e1667c3748b1927a11e Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 18 Apr 2026 06:24:01 +0000 Subject: [PATCH 37/43] chore: clean up in docs --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/docs/repl.txt | 40 +++++++++---------- .../blas/base/chbmv/docs/types/index.d.ts | 36 ++++++++--------- .../@stdlib/blas/base/chbmv/examples/index.js | 4 +- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt index 1d229a4f23ba..adbe683ce4ad 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/base/chbmv/docs/repl.txt @@ -1,13 +1,13 @@ {{alias}}( order, uplo, N, K, α, A, lda, x, sx, β, y, sy ) Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` - are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by - `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian + band matrix with `K` super-diagonals. Indexing is relative to the first index. To introduce an offset, use typed array views. - If `N` is equal to 0, the function returns `y` unchanged. + If `N` is equal to `0`, the function returns `y` unchanged. If `α` equals `0 + 0i` and `β` equals `1 + 0i`, the function returns `y` unchanged. @@ -28,26 +28,26 @@ Number of super-diagonals or sub-diagonals of matrix `A`. α: Complex64 - Complex scalar constant. + Scalar constant. A: Complex64Array - Complex input matrix. + Input matrix. lda: integer Stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). x: Complex64Array - First complex input vector. + First input vector. sx: integer Index increment for `x`. β: Complex64 - Complex scalar constant. + Scalar constant. y: Complex64Array - Second complex input vector. + Second input vector. sy: integer Index increment for `y`. @@ -55,7 +55,7 @@ Returns ------- y: Complex64Array - Second complex input vector. + Second input vector. Examples -------- @@ -110,12 +110,12 @@ {{alias}}.ndarray( uplo, N, K, α, A, sa1, sa2, oa, x, sx, ox, β, y, sy, oy ) Performs the matrix-vector operation `y = α*A*x + β*y` using alternative - indexing semantics and, where `α` and `β` are complex scalars, `x` and `y` - are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` - sub-diagonals or super-diagonals. + indexing semantics and, where `α` and `β` are scalars, `x` and `y` are + vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` + super-diagonals. - While typed array views mandate a view offset based on the underlying buffer - , the offset parameters support indexing semantics based on starting + While typed array views mandate a view offset based on the underlying + buffer, the offset parameters support indexing semantics based on starting indices. Parameters @@ -131,10 +131,10 @@ Number of super-diagonals or sub-diagonals of matrix `A`. α: Complex64 - Complex scalar constant. + Scalar constant. A: Complex64Array - Complex input matrix. + Input matrix. sa1: integer Stride of the first dimension of `A`. @@ -146,7 +146,7 @@ Starting index (offset) for `A`. x: Complex64Array - First complex input vector. + First input vector. sx: integer Index increment for `x`. @@ -155,10 +155,10 @@ Starting index (offset) for `x`. β: Complex64 - Complex scalar constant. + Scalar constant. y: Complex64Array - Second complex input vector. + Second input vector. sy: integer Index increment for `y`. @@ -169,7 +169,7 @@ Returns ------- y: Complex64Array - Second complex input vector. + Second input vector. Examples -------- diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts index 91129ebed941..331e7926d372 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/chbmv/docs/types/index.d.ts @@ -29,19 +29,19 @@ import { Complex64 } from '@stdlib/types/complex'; */ interface Routine { /** - * Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. + * Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @param order - storage layout * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param N - number of elements along each dimension of `A` * @param K - number of super-diagonals or sub-diagonals of matrix `A`. - * @param alpha - complex scalar constant - * @param A - complex input matrix + * @param alpha - scalar constant + * @param A - input matrix * @param LDA - stride of the first dimension of `A` - * @param x - first complex input vector + * @param x - first input vector * @param strideX - `x` stride length - * @param beta - complex scalar constant - * @param y - second complex input vector + * @param beta - scalar constant + * @param y - second input vector * @param strideY - `y` stride length * @returns `y` * @@ -61,21 +61,21 @@ interface Routine { ( order: Layout, uplo: MatrixTriangle, N: number, K: Number, alpha: Complex64, A: Complex64Array, LDA: number, x: Complex64Array, strideX: number, beta: Complex64, y: Complex64Array, strideY: number ): Complex64Array; /** - * Performs the matrix-vector operation `y = α*A*x + β*y`, using alternative indexing semantics. + * Performs the matrix-vector operation `y = α*A*x + β*y`, using alternative indexing semantics and where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param N - number of elements along each dimension of `A` * @param K - number of super-diagonals or sub-diagonals of matrix `A`. - * @param alpha - complex scalar constant - * @param A - complex input matrix + * @param alpha - scalar constant + * @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` - * @param x - first complex input vector + * @param x - first input vector * @param strideX - `x` stride length * @param offsetX - starting index for `x` - * @param beta - complex scalar constant - * @param y - second complex input vector + * @param beta - scalar constant + * @param y - second input vector * @param strideY - `y` stride length * @param offsetY - starting index for `y` * @returns `y` @@ -97,19 +97,19 @@ interface Routine { } /** -* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @param order - storage layout * @param uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param N - number of elements along each dimension of `A` * @param K - number of super-diagonals or sub-diagonals of matrix `A`. -* @param alpha - complex scalar constant -* @param A - complex input matrix +* @param alpha - scalar constant +* @param A - input matrix * @param LDA - stride of the first dimension of `A` -* @param x - first complex input vector +* @param x - first input vector * @param strideX - `x` stride length -* @param beta - complex scalar constant -* @param y - second complex input vector +* @param beta - scalar constant +* @param y - second input vector * @param strideY - `y` stride length * @returns `y` * diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js index 8deade348d1b..f919622eded0 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js @@ -62,9 +62,9 @@ beta = new Complex64( 3.0, -2.0 ); chgmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 ); // Print the results: -logEach( '(%s)', y ); +logEach( '%s', y ); chgmv.ndarray( 'lower', N, K, alpha, A, 1, (K+1), 0, x, 1, 0, beta, y, 1, 0 ); // Print the results: -logEach( '(%s)', y ); +logEach( '%s', y ); From da76f7067701715d195078708e59814ee1e76656 Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 18 Apr 2026 06:42:20 +0000 Subject: [PATCH 38/43] chore: clean up --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/lib/base.js | 105 ++++++++---------- .../@stdlib/blas/base/chbmv/lib/chbmv.js | 25 ++--- .../@stdlib/blas/base/chbmv/lib/index.js | 3 +- .../@stdlib/blas/base/chbmv/lib/ndarray.js | 15 +-- 4 files changed, 58 insertions(+), 90 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index 4bd0a0699596..db38dc5d001d 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -35,22 +35,22 @@ var min = require( '@stdlib/math/base/special/min' ); // MAIN // /** -* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @private * @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param {NonNegativeInteger} N - number of elements along each dimension of `A` * @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of matrix `A`. -* @param {Complex64} alpha - complex scalar constant -* @param {Complex64Array} A - complex input matrix +* @param {Complex64} alpha - scalar constant +* @param {Complex64Array} 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` -* @param {Complex64Array} x - first complex input vector +* @param {Complex64Array} x - first input vector * @param {integer} strideX - `x` stride length * @param {NonNegativeInteger} offsetX - starting index for `x` -* @param {Complex64} beta - complex scalar constant -* @param {Complex64Array} y - second complex input vector +* @param {Complex64} beta - scalar constant +* @param {Complex64Array} y - second input vector * @param {integer} strideY - `y` stride length * @param {NonNegativeInteger} offsetY - starting index for `y` * @returns {Complex64Array} `y` @@ -105,9 +105,18 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o var i1; var ia; - // Layout - isrm = isRowMajor( [ strideA1, strideA2 ] ); + // Note on variable naming convention: sa#, ix#, i# where # corresponds to the loop number, with `0` being the innermost loop... + isrm = isRowMajor( [ strideA1, strideA2 ] ); + if ( isrm ) { + // For row-major matrices, the last dimension has the fastest changing index... + sa0 = strideA2 * 2; // stride for innermost loop + sa1 = strideA1 * 2; // stride for outermost loop + } else { // isColMajor + // For column-major matrices, the first dimension has the fastest changing index... + sa0 = strideA1 * 2; // stride for innermost loop + sa1 = strideA2 * 2; // stride for outermost loop + } // Decompose scalars rebeta = realf( beta ); imbeta = imagf( beta ); @@ -120,114 +129,96 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o } else if ( rebeta !== 1.0 || imbeta !== 0.0 ) { cscal( N, beta, y, strideY, offsetY ); } - - // If alpha is zero, early return y if ( realpha === 0.0 && imalpha === 0.0 ) { return y; } - - // Reinterpret arrays to raw numeric views + // Reinterpret arrays to real-valued views viewA = reinterpret( A, 0 ); viewX = reinterpret( x, 0 ); viewY = reinterpret( y, 0 ); - - if ( isrm ) { - // For row-major matrices, the last dimension has the fastest changing index... - sa0 = strideA2 * 2; // offset increment for innermost loop - sa1 = strideA1 * 2; // offset increment for outermost loop - } else { // isColMajor - // For column-major matrices, the first dimension has the fastest changing index... - sa0 = strideA1 * 2; // offset increment for innermost loop - sa1 = strideA2 * 2; // offset increment for outermost loop - } - - // Adjust sign to account for layout-dependent conjugation if ( isrm ) { sign = -1; } else { sign = 1; } - - // Vector indexing base oa = offsetA * 2; ox = offsetX * 2; oy = offsetY * 2; - - // Vector strides sx = strideX * 2; sy = strideY * 2; - oa2 = oa; ix1 = ox; iy1 = oy; + // Form: y = α*A*x + y if ( ( isrm && uplo === 'upper' ) || ( !isrm && uplo === 'lower' ) ) { for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; - imx = viewX[ ix1 + 1 ]; - retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); - imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); + imx = viewX[ ix1+1 ]; + retmp1 = f32(f32(realpha*rex) - f32(imalpha*imx)); + imtmp1 = f32(f32(realpha*imx) + f32(imalpha*rex)); retmp2 = 0.0; imtmp2 = 0.0; ia = oa2; rea = viewA[ ia ]; - viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); - viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); + viewY[ iy1 ] = f32(viewY[ iy1 ] + f32(retmp1*rea)); + viewY[ iy1+1 ] = f32(viewY[ iy1+1 ] + f32(imtmp1*rea)); ia = oa2 + sa0; ix0 = ix1 + sx; iy0 = iy1 + sy; - i0end = min( N, i1 + K + 1 ); + i0end = min(N, i1+K+1); for ( i0 = i1 + 1; i0 < i0end; i0++ ) { rea = viewA[ ia ]; - ima = viewA[ ia + 1 ]; + ima = viewA[ ia+1 ]; cima = sign * ima; - muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0 + 1 ], viewY, 1, iy0 ); // eslint-disable-line max-len + muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0+1 ], viewY, 1, iy0 ); // eslint-disable-line max-len rex = viewX[ ix0 ]; - imx = viewX[ ix0 + 1 ]; - retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); - imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); + imx = viewX[ ix0+1 ]; + retmp2 = f32(retmp2 + f32(rea*rex) + f32(cima*imx)); + imtmp2 = f32(imtmp2 + f32(rea*imx) - f32(cima*rex)); ia += sa0; ix0 += sx; iy0 += sy; } - muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1+1 ], viewY, 1, iy1 ); // eslint-disable-line max-len ix1 += sx; iy1 += sy; oa2 += sa1; } return y; } + // Form: y = α*A^T*x + y // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; - imx = viewX[ ix1 + 1 ]; - retmp1 = f32( ( realpha * rex ) - ( imalpha * imx ) ); - imtmp1 = f32( ( realpha * imx ) + ( imalpha * rex ) ); + imx = viewX[ ix1+1 ]; + retmp1 = f32(f32(realpha*rex) - f32(imalpha*imx)); + imtmp1 = f32(f32(realpha*imx) + f32(imalpha*rex)); retmp2 = 0.0; imtmp2 = 0.0; - i0start = max( 0, i1 - K ); - ia = oa2 + ( ( K - i1 + i0start ) * sa0 ); - ix0 = ox + ( i0start * sx ); - iy0 = oy + ( i0start * sy ); + i0start = max(0, i1-K); + ia = oa2 + ((K-i1+i0start)*sa0); + ix0 = ox + (i0start*sx); + iy0 = oy + (i0start*sy); for ( i0 = i0start; i0 < i1; i0++ ) { rea = viewA[ ia ]; - ima = viewA[ ia + 1 ]; + ima = viewA[ ia+1 ]; cima = sign * ima; - muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0 + 1 ], viewY, 1, iy0 ); // eslint-disable-line max-len + muladd( retmp1, imtmp1, rea, cima, viewY[ iy0 ], viewY[ iy0+1 ], viewY, 1, iy0 ); // eslint-disable-line max-len rex = viewX[ ix0 ]; - imx = viewX[ ix0 + 1 ]; - retmp2 = f32( retmp2 + f32( ( rea * rex ) + ( cima * imx ) ) ); - imtmp2 = f32( imtmp2 + f32( ( rea * imx ) - ( cima * rex ) ) ); + imx = viewX[ ix0+1 ]; + retmp2 = f32(retmp2 + f32(rea*rex) + f32(cima*imx)); + imtmp2 = f32(imtmp2 + f32(rea*imx) - f32(cima*rex)); ia += sa0; ix0 += sx; iy0 += sy; } - ia = oa2 + ( K * sa0 ); + ia = oa2 + (K*sa0); rea = viewA[ ia ]; - viewY[ iy1 ] = f32( viewY[ iy1 ] + ( retmp1 * rea ) ); - viewY[ iy1 + 1 ] = f32( viewY[ iy1 + 1 ] + ( imtmp1 * rea ) ); - muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1 + 1 ], viewY, 1, iy1 ); // eslint-disable-line max-len + viewY[ iy1 ] = f32(viewY[ iy1 ] + f32(retmp1*rea)); + viewY[ iy1+1 ] = f32(viewY[ iy1+1 ] + f32(imtmp1*rea)); + muladd( realpha, imalpha, retmp2, imtmp2, viewY[ iy1 ], viewY[ iy1+1 ], viewY, 1, iy1 ); // eslint-disable-line max-len ix1 += sx; iy1 += sy; oa2 += sa1; diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js index 8e37bf46d128..f6e4c842a8d5 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/chbmv.js @@ -24,8 +24,6 @@ var isLayout = require( '@stdlib/blas/base/assert/is-layout' ); var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' ); var isColumnMajor = require( '@stdlib/ndarray/base/assert/is-column-major-string' ); var stride2offset = require( '@stdlib/strided/base/stride2offset' ); -var realf = require( '@stdlib/complex/float32/real' ); -var imagf = require( '@stdlib/complex/float32/imag' ); var format = require( '@stdlib/string/format' ); var base = require( './base.js' ); @@ -33,19 +31,19 @@ var base = require( './base.js' ); // MAIN // /** -* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @param {string} order - storage layout * @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param {NonNegativeInteger} N - number of elements along each dimension of `A` * @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of matrix `A`. -* @param {Complex64} alpha - complex scalar constant -* @param {Complex64Array} A - complex input matrix +* @param {Complex64} alpha - scalar constant +* @param {Complex64Array} A - input matrix * @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -* @param {Complex64Array} x - first complex input vector +* @param {Complex64Array} x - first input vector * @param {integer} strideX - `x` stride length -* @param {Complex64} beta - complex scalar constant -* @param {Complex64Array} y - second complex input vector +* @param {Complex64} beta - scalar constant +* @param {Complex64Array} y - second input vector * @param {integer} strideY - `y` stride length * @throws {TypeError} first argument must be a valid order * @throws {TypeError} second argument must specify whether to reference the lower or upper triangular matrix @@ -70,10 +68,6 @@ var base = require( './base.js' ); * // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] */ function chbmv( order, uplo, N, K, alpha, A, LDA, x, strideX, beta, y, strideY ) { // eslint-disable-line max-params - var realpha; - var imalpha; - var rebeta; - var imbeta; var sa1; var sa2; var ox; @@ -100,13 +94,8 @@ function chbmv( order, uplo, N, K, alpha, A, LDA, x, strideX, beta, y, strideY ) if ( LDA < ( K + 1 ) ) { throw new RangeError( format( 'invalid argument. Sixth argument (LDA) must be greater than or equal to (K+1)=%d. Value: `%d`.', K + 1, LDA ) ); } - rebeta = realf( beta ); - imbeta = imagf( beta ); - realpha = realf( alpha ); - imalpha = imagf( alpha ); - // Check if we can early return... - if ( N === 0 || ( realpha === 0.0 && imalpha === 0.0 && rebeta === 1.0 && imbeta === 0.0 ) ) { // eslint-disable-line max-len + if ( N === 0 ) { return y; } if ( isColumnMajor( order ) ) { diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js index 1748c1be7b9c..7b6b8fc6b639 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* BLAS level 2 routine to performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* BLAS level 2 routine to performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @module @stdlib/blas/base/chbmv * @@ -64,7 +64,6 @@ var main = require( './main.js' ); var chbmv; var tmp = tryRequire( join( __dirname, './native.js' ) ); - if ( isError( tmp ) ) { chbmv = main; } else { diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js index 83ec070044e1..6efff5771d67 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/ndarray.js @@ -22,15 +22,13 @@ var isMatrixTriangle = require( '@stdlib/blas/base/assert/is-matrix-triangle' ); var format = require( '@stdlib/string/format' ); -var realf = require( '@stdlib/complex/float32/real' ); -var imagf = require( '@stdlib/complex/float32/imag' ); var base = require( './base.js' ); // MAIN // /** -* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +* Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. * * @param {string} uplo - specifies whether `A` is an upper or lower triangular part of matrix is supplied. * @param {NonNegativeInteger} N - number of elements along each dimension of `A` @@ -68,10 +66,6 @@ var base = require( './base.js' ); * // y => [ -1.0, 5.0, -8.0, 20.0, 9.0, 23.0 ] */ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ) { // eslint-disable-line max-params, max-len - var realpha; - var imalpha; - var rebeta; - var imbeta; if ( !isMatrixTriangle( uplo ) ) { throw new TypeError( format( 'invalid argument. First argument must specify whether to reference the lower or upper triangular matrix. Value: `%s`.', uplo ) ); } @@ -87,13 +81,8 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o if ( strideY === 0 ) { throw new RangeError( format( 'invalid argument. Fourteenth argument must be non-zero. Value: `%d`.', strideY ) ); } - rebeta = realf( beta ); - imbeta = imagf( beta ); - realpha = realf( alpha ); - imalpha = imagf( alpha ); - // Check if we can early return... - if ( N === 0 || ( realpha === 0.0 && imalpha === 0.0 && rebeta === 1.0 && imbeta === 0.0 ) ) { // eslint-disable-line max-len + if ( N === 0 ) { return y; } return base( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, offsetX, beta, y, strideY, offsetY ); From 30a3ae376766a94b4645a5272a1589208f13f83c Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 18 Apr 2026 06:49:40 +0000 Subject: [PATCH 39/43] chore: clean up --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index db38dc5d001d..a360a43f7b26 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -187,8 +187,6 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o } return y; } - // Form: y = α*A^T*x + y - // ( isrm && uplo === 'lower' ) || ( !isrm && uplo === 'upper' ) for ( i1 = 0; i1 < N; i1++ ) { rex = viewX[ ix1 ]; From 71a2ad0bae4f15ce4f25f522262d86bf286565b0 Mon Sep 17 00:00:00 2001 From: Divit Date: Sat, 18 Apr 2026 06:58:29 +0000 Subject: [PATCH 40/43] chore: clean up in readme --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/README.md | 52 ++++++++++++------- .../@stdlib/blas/base/chbmv/package.json | 2 +- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/README.md b/lib/node_modules/@stdlib/blas/base/chbmv/README.md index a406ad51247b..cb9f0e7e9f9b 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/README.md +++ b/lib/node_modules/@stdlib/blas/base/chbmv/README.md @@ -32,15 +32,18 @@ var chbmv = require( '@stdlib/blas/base/chbmv' ); #### chbmv( order, uplo, N, K, α, A, LDA, x, sx, β, y, sy ) -Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. + + ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); -var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); + var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); @@ -54,24 +57,27 @@ The function has the following parameters: - **uplo**: specifies whether the upper or lower triangular part of the matrix `A` is supplied. - **N**: specifies number of elements along each dimension of `A` - **K**: specifies number of super-diagonals or sub-diagonals of matrix `A`. -- **α**: complex scalar constant. -- **A**: complex input matrix stored in linear memory as a [`Complex64Array`][@stdlib/array/complex64]. +- **α**: scalar constant. +- **A**: input matrix stored in linear memory as a [`Complex64Array`][@stdlib/array/complex64]. - **LDA**: stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`). -- **x**: complex input vector [`Complex64Array`][@stdlib/array/complex64]. +- **x**: input vector [`Complex64Array`][@stdlib/array/complex64]. - **sx**: stride length for `x`. -- **β**: complex scalar constant. +- **β**: scalar constant. - **y**: output [`Complex64Array`][@stdlib/array/complex64]. - **sy**: stride length for `y`. The stride parameters determine how elements are accessed. For example, to iterate over every other element in `x` and `y`, + + ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); -var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len -var x = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0 ] ); // eslint-disable-line max-params, max-len -var y = new Complex64Array( [ 3.0, 3.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0 ] ); // eslint-disable-line max-params, max-len +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); +var x = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0 ] ); +var y = new Complex64Array( [ 3.0, 3.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0 ] ); + var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); @@ -83,14 +89,17 @@ Note that indexing is relative to the first index. To introduce an offset, use [ + + ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); // Initial arrays... var x0 = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); -var y0 = new Complex64Array( [ 0.0, 0.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); // eslint-disable-line max-params, max-len -var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var y0 = new Complex64Array( [ 0.0, 0.0, 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); + var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); @@ -106,15 +115,18 @@ chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x1, 1, beta, y1, 1 ); #### chbmv.ndarray( uplo, N, K, α, A, sa1, sa2, oa, x, sx, ox, β, y, sy, oy ) -Performs the matrix-vector operation `y = α*A*x + β*y` using alternative indexing semantics, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals. +Performs the matrix-vector operation `y = α*A*x + β*y` using alternative indexing semantics, where `α` and `β` are scalars, `x` and `y` are vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` super-diagonals. + + ```javascript var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); -var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); var x = new Complex64Array( [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); var y = new Complex64Array( [ 3.0, 3.0, 2.0, 2.0, 1.0, 1.0 ] ); + var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); @@ -132,13 +144,15 @@ The function has the following additional parameters: 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 Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); -var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); // eslint-disable-line max-params, max-len +var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); var x = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] ); -var y = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0, 3.0 ] ); // eslint-disable-line max-params, max-len +var y = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0, 3.0 ] ); var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); @@ -167,6 +181,8 @@ chbmv.ndarray( 'lower', 3, 1, alpha, A, 2, 1, 0, x, 1, 1, beta, y, -2, 4 ); + + ```javascript var discreteUniform = require( '@stdlib/random/base/discrete-uniform' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); @@ -175,7 +191,7 @@ var logEach = require( '@stdlib/console/log-each' ); var chbmv = require( '@stdlib/blas/base/chbmv' ); function rand() { - return new Complex64( discreteUniform( 0, 255 ), discreteUniform( -128, 127 ) ); // eslint-disable-line max-params, max-len + return new Complex64( discreteUniform( 0, 255 ), discreteUniform( -128, 127 ) ); } var N = 3; @@ -191,12 +207,12 @@ var beta = new Complex64( 0.5, -0.5 ); chbmv( 'row-major', 'lower', N, 1, alpha, A, (K+1), x, 1, beta, y, 1 ); // Print the results: -logEach( '(%s)', x ); +logEach( '%s', x ); chbmv.ndarray( 'lower', N, 1, alpha, A, (K+1), 1, 0, x, 1, 0, beta, y, 1, 0 ); // Print the results: -logEach( '(%s)', x ); +logEach( '%s', x ); ``` diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/package.json b/lib/node_modules/@stdlib/blas/base/chbmv/package.json index a090177fd92a..3fb802523b50 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/package.json +++ b/lib/node_modules/@stdlib/blas/base/chbmv/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/blas/base/chbmv", "version": "0.0.0", - "description": "Performs the matrix-vector operation `y = α*A*x + β*y`, where `α` and `β` are complex scalars, `x` and `y` are complex vectors, and `A` is an `N` by `N` Hermitian band matrix with `K` sub-diagonals or super-diagonals.", + "description": "Performs the matrix-vector operation `y = α*A*x + β*y`.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", From 8488a4467cd240cf6a8c3df875d9886bbdd1de0e Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Apr 2026 14:47:25 +0000 Subject: [PATCH 41/43] chore: clean up --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/README.md | 6 +- .../@stdlib/blas/base/chbmv/lib/base.js | 6 +- .../blas/base/chbmv/test/test.chbmv.js | 100 ++++++------ .../blas/base/chbmv/test/test.ndarray.js | 148 +++++++++--------- 4 files changed, 130 insertions(+), 130 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/README.md b/lib/node_modules/@stdlib/blas/base/chbmv/README.md index cb9f0e7e9f9b..a819183cb135 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/README.md +++ b/lib/node_modules/@stdlib/blas/base/chbmv/README.md @@ -20,7 +20,7 @@ limitations under the License. # chbmv -> Performs the matrix-vector operation `y = α*A*x + β*y` for complex-valued data. +> Performs the matrix-vector operation `y = α*A*x + β*y`.
@@ -75,13 +75,13 @@ var Complex64Array = require( '@stdlib/array/complex64' ); var Complex64 = require( '@stdlib/complex/float32/ctor' ); var A = new Complex64Array( [ 0.0, 0.0, 1.0, 0.0, 2.0, -2.0, 3.0, 0.0, 4.0, -4.0, 5.0, 0.0 ] ); -var x = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 3.0, 3.0 ] ); +var x = new Complex64Array( [ 1.0, 1.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 3.0, 3.0 ] ); var y = new Complex64Array( [ 3.0, 3.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 1.0, 1.0 ] ); var alpha = new Complex64( 0.5, 0.5 ); var beta = new Complex64( 0.5, -0.5 ); -chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 3, beta, y, 2 ); +chbmv( 'row-major', 'lower', 3, 1, alpha, A, 2, x, 2, beta, y, 2 ); // y => [ -1.0, 5.0, 0.0, 0.0, -8.0, 20.0, 0.0, 0.0, 9.0, 23.0 ] ``` diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js index a360a43f7b26..1710e523fb25 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/lib/base.js @@ -117,7 +117,7 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o sa0 = strideA1 * 2; // stride for innermost loop sa1 = strideA2 * 2; // stride for outermost loop } - // Decompose scalars + // Decompose scalars into real and imaginary components: rebeta = realf( beta ); imbeta = imagf( beta ); realpha = realf( alpha ); @@ -125,14 +125,14 @@ function chbmv( uplo, N, K, alpha, A, strideA1, strideA2, offsetA, x, strideX, o // y = beta*y if ( rebeta === 0.0 && imbeta === 0.0 ) { - cfill( N, 0.0, y, strideY, offsetY ); + cfill( N, alpha, y, strideY, offsetY ); } else if ( rebeta !== 1.0 || imbeta !== 0.0 ) { cscal( N, beta, y, strideY, offsetY ); } if ( realpha === 0.0 && imalpha === 0.0 ) { return y; } - // Reinterpret arrays to real-valued views + // Reinterpret arrays as real-valued views of interleaved real and imaginary components: viewA = reinterpret( A, 0 ); viewX = reinterpret( x, 0 ); viewY = reinterpret( y, 0 ); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js index d94f38f0713b..da36d5277dd9 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js @@ -344,8 +344,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -372,8 +372,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -400,8 +400,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -428,8 +428,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -453,7 +453,7 @@ tape( 'the function returns a reference to the second input vector (row-major)', beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); t.end(); }); @@ -477,7 +477,7 @@ tape( 'the function returns a reference to the second input vector (column-major beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); t.end(); }); @@ -504,8 +504,8 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (ro expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -532,8 +532,8 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (co expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -560,8 +560,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -588,8 +588,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -613,10 +613,10 @@ tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vecto alpha = new Complex64( 0.0, 0.0 ); beta = new Complex64( 0.0, 0.0 ); - expected = new Complex64Array( data.y.length ); + expected = new Complex64Array( y.length ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.deepEqual( out, expected, true, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -640,10 +640,10 @@ tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vecto alpha = new Complex64( 0.0, 0.0 ); beta = new Complex64( 0.0, 0.0 ); - expected = new Complex64Array( data.y.length ); + expected = new Complex64Array( y.length ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.deepEqual( out, expected, true, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -670,8 +670,8 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -698,8 +698,8 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -726,8 +726,8 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (row- expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -754,8 +754,8 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (colu expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -782,8 +782,8 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -810,8 +810,8 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -838,8 +838,8 @@ tape( 'the function supports specifying `x` and `y` strides (row-major)', functi expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -866,8 +866,8 @@ tape( 'the function supports specifying `x` and `y` strides (column-major)', fun expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -894,8 +894,8 @@ tape( 'the function supports specifying a negative `x` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -922,8 +922,8 @@ tape( 'the function supports specifying a negative `x` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -950,8 +950,8 @@ tape( 'the function supports specifying a negative `y` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -978,8 +978,8 @@ tape( 'the function supports specifying a negative `y` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1006,8 +1006,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (row-ma expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1034,8 +1034,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (column expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index 61ec6c1cc58e..3cb9aa3ff8fc 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -280,8 +280,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -308,8 +308,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -336,8 +336,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -364,8 +364,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -389,7 +389,7 @@ tape( 'the function returns a reference to the second input vector (row-major)', beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); t.end(); }); @@ -413,7 +413,7 @@ tape( 'the function returns a reference to the second input vector (column-major beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); t.end(); }); @@ -440,8 +440,8 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (ro expected = new Complex64Array( data.y ); out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -468,8 +468,8 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (co expected = new Complex64Array( data.y ); out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -496,8 +496,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -524,8 +524,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -549,10 +549,10 @@ tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vecto alpha = new Complex64( 0.0, 0.0 ); beta = new Complex64( 0.0, 0.0 ); - expected = new Complex64Array( data.y.length ); + expected = new Complex64Array( y.length ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.deepEqual( out, expected, true, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -576,10 +576,10 @@ tape( 'if `α` is `0` and `β` is `0`, the function zeros the second input vecto alpha = new Complex64( 0.0, 0.0 ); beta = new Complex64( 0.0, 0.0 ); - expected = new Complex64Array( data.y.length ); + expected = new Complex64Array( y.length ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.deepEqual( out, expected, true, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -606,8 +606,8 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -634,8 +634,8 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -662,8 +662,8 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (row- expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -690,8 +690,8 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (colu expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -718,8 +718,8 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -746,8 +746,8 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -774,8 +774,8 @@ tape( 'the function supports specifying the strides of the first and second dime expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -802,8 +802,8 @@ tape( 'the function supports specifying the strides of the first and second dime expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -830,8 +830,8 @@ tape( 'the function supports a negative stride for the first dimension of `A` (r expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -858,8 +858,8 @@ tape( 'the function supports a negative stride for the first dimension of `A` (c expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -886,8 +886,8 @@ tape( 'the function supports a negative stride for the second dimension of `A` ( expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -914,8 +914,8 @@ tape( 'the function supports a negative stride for the second dimension of `A` ( expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -942,8 +942,8 @@ tape( 'the function supports negative strides for `A` (row-major)', function tes expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -970,8 +970,8 @@ tape( 'the function supports negative strides for `A` (column-major)', function expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -998,8 +998,8 @@ tape( 'the function supports specifying an offset parameter for `A` (row-major)' expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1026,8 +1026,8 @@ tape( 'the function supports specifying an offset parameter for `A` (column-majo expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1054,8 +1054,8 @@ tape( 'the function supports specifying `x` and `y` strides (row-major)', functi expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1082,8 +1082,8 @@ tape( 'the function supports specifying `x` and `y` strides (column-major)', fun expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1110,8 +1110,8 @@ tape( 'the function supports specifying a negative `x` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1138,8 +1138,8 @@ tape( 'the function supports specifying a negative `x` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1166,8 +1166,8 @@ tape( 'the function supports specifying a negative `y` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1194,8 +1194,8 @@ tape( 'the function supports specifying a negative `y` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1222,8 +1222,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (row-ma expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1250,8 +1250,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (column expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1278,8 +1278,8 @@ tape( 'the function supports complex access patterns (row-major)', function test expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); @@ -1306,8 +1306,8 @@ tape( 'the function supports complex access patterns (column-major)', function t expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( isSameComplex64Array( out, y ), true, 'returns expected values' ); - t.deepEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); t.end(); }); From ac97c3e0242835bac5b9642290cfea342c345746 Mon Sep 17 00:00:00 2001 From: Divit Date: Tue, 21 Apr 2026 17:09:51 +0000 Subject: [PATCH 42/43] chore: fix test message --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../blas/base/chbmv/test/test.chbmv.js | 60 ++++----- .../blas/base/chbmv/test/test.ndarray.js | 124 +++++++++--------- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js index da36d5277dd9..9cce25d7bee0 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.chbmv.js @@ -344,8 +344,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -372,8 +372,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -400,8 +400,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -428,8 +428,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -453,7 +453,7 @@ tape( 'the function returns a reference to the second input vector (row-major)', beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); @@ -477,7 +477,7 @@ tape( 'the function returns a reference to the second input vector (column-major beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); @@ -504,7 +504,7 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (ro expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -532,7 +532,7 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (co expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, 0, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -560,8 +560,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -588,8 +588,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -670,7 +670,7 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -698,7 +698,7 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -726,7 +726,7 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (row- expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -754,7 +754,7 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (colu expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -782,7 +782,7 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -810,7 +810,7 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -838,7 +838,7 @@ tape( 'the function supports specifying `x` and `y` strides (row-major)', functi expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -866,7 +866,7 @@ tape( 'the function supports specifying `x` and `y` strides (column-major)', fun expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -894,7 +894,7 @@ tape( 'the function supports specifying a negative `x` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -922,7 +922,7 @@ tape( 'the function supports specifying a negative `x` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -950,7 +950,7 @@ tape( 'the function supports specifying a negative `y` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -978,7 +978,7 @@ tape( 'the function supports specifying a negative `y` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -1006,7 +1006,7 @@ tape( 'the function supports specifying negative strides for `x` and `y` (row-ma expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -1034,7 +1034,7 @@ tape( 'the function supports specifying negative strides for `x` and `y` (column expected = new Complex64Array( data.y_out ); out = chbmv( data.order, data.uplo, data.N, data.K, alpha, a, data.lda, x, data.strideX, beta, y, data.strideY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js index 3cb9aa3ff8fc..dc96b8b1d224 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/test/test.ndarray.js @@ -280,8 +280,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -308,8 +308,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -336,8 +336,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (ro expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -364,8 +364,8 @@ tape( 'the function performs the matrix-vector operation `y = α*A*x + β*y` (co expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -389,7 +389,7 @@ tape( 'the function returns a reference to the second input vector (row-major)', beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); @@ -413,7 +413,7 @@ tape( 'the function returns a reference to the second input vector (column-major beta = new Complex64( data.beta[0], data.beta[1] ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.end(); }); @@ -440,7 +440,7 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (ro expected = new Complex64Array( data.y ); out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -468,7 +468,7 @@ tape( 'if `N` is `0`, the function returns the second input vector unchanged (co expected = new Complex64Array( data.y ); out = chbmv( data.uplo, 0, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -496,8 +496,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -524,8 +524,8 @@ tape( 'if `α` is `0` and `β` is `1`, the function returns the second input vec expected = new Complex64Array( data.y ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -606,7 +606,7 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -634,7 +634,7 @@ tape( 'if `x` contains only zeros and `β` is `1`, the function returns the seco expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -662,7 +662,7 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (row- expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -690,7 +690,7 @@ tape( 'if `α` is `0`, the function scales the second input vector by `β` (colu expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -718,7 +718,7 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -746,7 +746,7 @@ tape( 'if `x` contains only zeros and `β` is not `1`, the function scales the s expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); @@ -774,8 +774,8 @@ tape( 'the function supports specifying the strides of the first and second dime expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -802,8 +802,8 @@ tape( 'the function supports specifying the strides of the first and second dime expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -830,8 +830,8 @@ tape( 'the function supports a negative stride for the first dimension of `A` (r expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -858,8 +858,8 @@ tape( 'the function supports a negative stride for the first dimension of `A` (c expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -886,8 +886,8 @@ tape( 'the function supports a negative stride for the second dimension of `A` ( expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -914,8 +914,8 @@ tape( 'the function supports a negative stride for the second dimension of `A` ( expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -942,8 +942,8 @@ tape( 'the function supports negative strides for `A` (row-major)', function tes expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -970,8 +970,8 @@ tape( 'the function supports negative strides for `A` (column-major)', function expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -998,8 +998,8 @@ tape( 'the function supports specifying an offset parameter for `A` (row-major)' expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1026,8 +1026,8 @@ tape( 'the function supports specifying an offset parameter for `A` (column-majo expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1054,8 +1054,8 @@ tape( 'the function supports specifying `x` and `y` strides (row-major)', functi expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1082,8 +1082,8 @@ tape( 'the function supports specifying `x` and `y` strides (column-major)', fun expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1110,8 +1110,8 @@ tape( 'the function supports specifying a negative `x` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1138,8 +1138,8 @@ tape( 'the function supports specifying a negative `x` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1166,8 +1166,8 @@ tape( 'the function supports specifying a negative `y` stride (row-major)', func expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1194,8 +1194,8 @@ tape( 'the function supports specifying a negative `y` stride (column-major)', f expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1222,8 +1222,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (row-ma expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1250,8 +1250,8 @@ tape( 'the function supports specifying negative strides for `x` and `y` (column expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1278,8 +1278,8 @@ tape( 'the function supports complex access patterns (row-major)', function test expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); @@ -1306,8 +1306,8 @@ tape( 'the function supports complex access patterns (column-major)', function t expected = new Complex64Array( data.y_out ); out = chbmv( data.uplo, data.N, data.K, alpha, a, data.strideA1, data.strideA2, data.offsetA, x, data.strideX, data.offsetX, beta, y, data.strideY, data.offsetY ); - t.strictEqual( out, y, 'returns expected values' ); - t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected values' ); + t.strictEqual( out, y, 'returns expected value' ); + t.strictEqual( isSameComplex64Array( out, expected ), true, 'returns expected value' ); t.end(); }); From 44570881854e36695164373c804f7cf86995f356 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 27 Apr 2026 07:26:57 +0000 Subject: [PATCH 43/43] docs: update js example --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/chbmv/examples/index.js | 35 ++++--------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js index f919622eded0..d42cdf679b39 100644 --- a/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/chbmv/examples/index.js @@ -24,40 +24,19 @@ var Complex64 = require( '@stdlib/complex/float32/ctor' ); var logEach = require( '@stdlib/console/log-each' ); var chgmv = require( './../lib' ); -var alpha; -var beta; -var N; -var K; -var x; -var y; -var A; - - -// FUNCTIONS // - -/** -* Generates a random complex number with discrete uniform real and imaginary parts. -* -* @private -* @returns {Complex64} random complex number -* -* @example -* var z = rand(); -* // returns a -*/ function rand() { return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) ); } -N = 3; -K = 1; +var N = 3; +var K = 1; -x = filledarrayBy( N, 'complex64', rand ); -y = filledarrayBy( N, 'complex64', rand ); -A = filledarrayBy( N*(K+1), 'complex64', rand ); +var x = filledarrayBy( N, 'complex64', rand ); +var y = filledarrayBy( N, 'complex64', rand ); +var A = filledarrayBy( N*(K+1), 'complex64', rand ); -alpha = new Complex64( 2.0, 3.0 ); -beta = new Complex64( 3.0, -2.0 ); +var alpha = new Complex64( 2.0, 3.0 ); +var beta = new Complex64( 3.0, -2.0 ); chgmv( 'row-major', 'lower', N, K, alpha, A, (K+1), x, 1, beta, y, 1 );