From 7a0ef6ce031f0c809a715eab1fb5097087e36413 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 16:05:10 +0000 Subject: [PATCH 1/9] add license --- .../@stdlib/blas/base/ctbsv/lib/base.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js new file mode 100644 index 000000000000..415f5c25c2d3 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js @@ -0,0 +1,17 @@ +/** +* @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. +*/ From 6d1f80c62d34b6842508a882bab78d71f3f35d72 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 18:47:00 +0000 Subject: [PATCH 2/9] test: add branch 1 fixtures --- 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_u_nt_nu.json | 26 ++++++++++++++++++ .../test/fixtures/column_major_u_nt_u.json | 26 ++++++++++++++++++ .../ctbsv/test/fixtures/row_major_l_t_nu.json | 27 +++++++++++++++++++ .../ctbsv/test/fixtures/row_major_l_t_u.json | 27 +++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_u.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_u.json diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_nu.json new file mode 100644 index 000000000000..78a6a6e1c96a --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_nu.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "upper", + "trans": "no-transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 2.0, 2.0, 4.0, 4.0 ], + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 10.0, 0.0, 36.0, 0.0, 30.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_u.json new file mode 100644 index 000000000000..e10e7f933cfb --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_nt_u.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "upper", + "trans": "no-transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 2.0, 2.0, 4.0, 4.0 ], + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 9.0, 2.0, 26.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_nu.json new file mode 100644 index 000000000000..fa10e19d1d83 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_nu.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "lower", + "trans": "transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 1.0 ], + [ 2.0, 2.0, 3.0, 3.0 ], + [ 4.0, 4.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 10.0, 0.0, 36.0, 0.0, 30.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_u.json new file mode 100644 index 000000000000..5a10bc6d4145 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_t_u.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "lower", + "trans": "transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 1.0, 3.0, 4.0, 4.0, 1.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 1.0 ], + [ 2.0, 2.0, 1.0, 3.0 ], + [ 4.0, 4.0, 1.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 1.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 1.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 9.0, 2.0, 26.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} From ace9abe5c79639dcca7aa6108105202504d32749 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 18:47:45 +0000 Subject: [PATCH 3/9] feat: add branch 1 logic --- .../@stdlib/blas/base/ctbsv/lib/base.js | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js index 415f5c25c2d3..3062a02a1cc9 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js @@ -15,3 +15,158 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +'use strict'; + +// MODULES // + +var reinterpret = require( '@stdlib/strided/base/reinterpret-complex64' ); +var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' ); +var f32 = require( '@stdlib/number/float64/base/to-float32' ); +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); + + +// MAIN // + +/** +* Solves one of the systems of equations `A*x = b` or `A^T*x = b` or `x = A^H*x` where `b` and `x` are `N` element complex vectors and `A` is an `N` by `N` unit, or non-unit, upper or lower triangular complex band matrix, with ( `K` + 1 ) diagonals. +* +* @private +* @param {string} uplo - specifies whether `A` is an upper or lower triangular matrix +* @param {string} trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed +* @param {string} diag - specifies whether `A` has a unit diagonal +* @param {NonNegativeInteger} N - number of elements along each dimension of `A` +* @param {NonNegativeInteger} K - number of super-diagonals or sub-diagonals of the matrix `A` +* @param {Complex64Array} A - input complex 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 - input complex vector +* @param {integer} strideX - stride length for `x` +* @param {NonNegativeInteger} offsetX - starting index for `x` +* @returns {Complex64Array} `x` +* +* @example +* var Complex64Array = require( '@stdlib/array/complex64' ); +* +* var A = new Complex64Array( [ ] ); +* var x = new Complex64Array( [ ] ); +* +* ctbsv( 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, 1, 0, x, 1, 0 ); +* // x => [ ] +*/ +function ctbmv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, strideX, offsetX ) { // eslint-disable-line max-params, max-len + var nonunit; + var viewA; + var viewX; + var retmp; + var imtmp; + var magsq; + var remul; + var immul; + var isrm; + var sign; + var rex; + var imx; + var rea; + var ima; + var ix0; + var ix1; + var sa0; + var sa1; + var oa2; + var ox; + var sx; + var oa; + var i0; + var i1; + var ia; + + // Layout + isrm = isRowMajor( [ strideA1, strideA2 ] ); + nonunit = ( diag === 'non-unit' ); + + // Reinterpret arrays to raw numeric views + viewA = reinterpret( A, 0 ); + viewX = reinterpret( x, 0 ); + + // Set sign to handle conjugation: flip the imaginary part for conjugate-transpose + if ( trans === 'conjugate-transpose' ) { + sign = -1; + } else { + sign = 1; + } + + 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 + } + + // Vector indexing base + oa = offsetA * 2; + ox = offsetX * 2; + + // Vector strides + sx = strideX * 2; + + if ( + ( !isrm && uplo === 'upper' && trans === 'no-transpose' ) || + ( isrm && uplo === 'lower' && trans !== 'no-transpose' ) + ) { + for ( i1 = N - 1; i1 >= 0; i1-- ) { + ix1 = ox + ( i1 * sx ); + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; + retmp = rex; + imtmp = imx; + oa2 = oa + ( i1 * sa1 ) + ( K * sa0 ); + for ( i0 = i1 + 1; i0 <= min( N - 1, i1 + K ); i0++ ) { + ix0 = ox + ( i0 * sa0); + ia = oa2 + ( ( i0 - i1 ) * ( sa1 - sa0 ) ); + rea = viewA[ ia ]; + ima = sign * viewA[ ia + 1 ]; + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; + retmp -= f32( ( rea * rex ) - ( ima * imx ) ); + imtmp -= f32( ( rea * imx ) + ( ima * rex ) ); + } + if ( nonunit ) { + rea = viewA[ oa2 ]; + ima = sign * viewA[ oa2 + 1 ]; + magsq = f32( ( rea * rea ) + ( ima * ima ) ); + remul = f32( ( retmp * rea ) + ( imtmp * ima ) ); + immul = f32( ( imtmp * rea ) - ( retmp * ima ) ); + retmp = f32( remul / magsq ); + imtmp = f32( immul / magsq ); + } + viewX[ ix1 ] = retmp; + viewX[ ix1 + 1 ] = imtmp; + } + return x; + } + if ( + ( !isrm && uplo === 'lower' && trans === 'no-transpose' ) || + ( isrm && uplo === 'upper' && trans !== 'no-transpose' ) + ) { + + } + if ( + ( !isrm && uplo === 'upper' && trans !== 'no-transpose' ) || + ( isrm && uplo === 'lower' && trans === 'no-transpose' ) + ) { + + } + // ( !isrm && uplo === 'lower' && trans !== 'no-transpose' ) || ( isrm && uplo === 'upper' && trans === 'no-transpose' ) + +} + + +// EXPORTS // + +module.exports = ctbmv; \ No newline at end of file From d679e2464a2e8746bebcc1438b336c5720d28844 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 18:55:40 +0000 Subject: [PATCH 4/9] feat: add branch 2 logic --- .../@stdlib/blas/base/ctbsv/lib/base.js | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js index 3062a02a1cc9..cb317e2145f3 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js @@ -154,7 +154,36 @@ function ctbmv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, stri ( !isrm && uplo === 'lower' && trans === 'no-transpose' ) || ( isrm && uplo === 'upper' && trans !== 'no-transpose' ) ) { - + for ( i1 = 0; i1 < N; i1++ ) { + ix1 = ox + ( i1 * sx ); + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; + retmp = rex; + imtmp = imx; + oa2 = oa + ( i1 * sa1 ); + for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { + ix0 = ox + ( i0 * sx ); + ia = oa2 + ( ( i0 - i1 ) * ( sa1 - sa0 ) ); + rea = viewA[ ia ]; + ima = sign * viewA[ ia + 1 ]; + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; + retmp -= f32( ( rea * rex ) - ( ima * imx ) ); + imtmp -= f32( ( rea * imx ) + ( ima * rex ) ); + } + if ( nonunit ) { + rea = viewA[ oa2 ]; + ima = sign * viewA[ oa2 + 1 ]; + magsq = f32( ( rea * rea ) + ( ima * ima ) ); + remul = f32( ( retmp * rea ) + ( imtmp * ima ) ); + immul = f32( ( imtmp * rea ) - ( retmp * ima ) ); + retmp = f32( remul / magsq ); + imtmp = f32( immul / magsq ); + } + viewX[ ix1 ] = retmp; + viewX[ ix1 + 1 ] = imtmp; + } + return x; } if ( ( !isrm && uplo === 'upper' && trans !== 'no-transpose' ) || From 1a64e4f4fcc6c4cacf572c4188aef4267b9d13a1 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 18:56:09 +0000 Subject: [PATCH 5/9] test: add branch 2 fixtures --- 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_l_nt_nu.json | 26 ++++++++++++++++++ .../test/fixtures/column_major_l_nt_u.json | 26 ++++++++++++++++++ .../ctbsv/test/fixtures/row_major_u_t_nu.json | 27 +++++++++++++++++++ .../ctbsv/test/fixtures/row_major_u_t_u.json | 27 +++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_u.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_u.json diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_nu.json new file mode 100644 index 000000000000..fe7bc14a57c7 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_nu.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "lower", + "trans": "no-transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ], + [ 2.0, 2.0, 4.0, 4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_u.json new file mode 100644 index 000000000000..09f00ead132c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_nt_u.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "lower", + "trans": "no-transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ], + [ 2.0, 2.0, 4.0, 4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_nu.json new file mode 100644 index 000000000000..76f5ce2487c3 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_nu.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "upper", + "trans": "transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 2.0, 2.0 ], + [ 3.0, 3.0, 4.0, 4.0 ], + [ 5.0, 5.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_u.json new file mode 100644 index 000000000000..cb8b58079cef --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_t_u.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "upper", + "trans": "transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 2.0, 2.0 ], + [ 3.0, 3.0, 4.0, 4.0 ], + [ 5.0, 5.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} From 61b17686de2461f98a9dd75c8c63626b12da7962 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 19:05:41 +0000 Subject: [PATCH 6/9] test: add branch 3 fixtures --- 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_u_t_nu.json | 26 ++++++++++++++++++ .../test/fixtures/column_major_u_t_u.json | 26 ++++++++++++++++++ .../test/fixtures/row_major_l_nt_nu.json | 27 +++++++++++++++++++ .../ctbsv/test/fixtures/row_major_l_nt_u.json | 27 +++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_u.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_nu.json new file mode 100644 index 000000000000..9c1dea61dff3 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_nu.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "upper", + "trans": "transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 2.0, 2.0, 4.0, 4.0 ], + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_u.json new file mode 100644 index 000000000000..7fdcad729f00 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_u_t_u.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "upper", + "trans": "transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 2.0, 2.0, 4.0, 4.0 ], + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json new file mode 100644 index 000000000000..5d317fb39fb8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "lower", + "trans": "no-transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 1.0 ], + [ 2.0, 2.0, 3.0, 3.0 ], + [ 4.0, 4.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json new file mode 100644 index 000000000000..6a460a46900b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "lower", + "trans": "no-transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], + "A_compact": [ + [ 0.0, 0.0, 1.0, 1.0 ], + [ 2.0, 2.0, 3.0, 3.0 ], + [ 4.0, 4.0, 5.0, 5.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} From 2daf6e009d1bcdfc516c827919e16575c0be7969 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 19:06:00 +0000 Subject: [PATCH 7/9] feat: add branch 3 logic --- .../@stdlib/blas/base/ctbsv/lib/base.js | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js index cb317e2145f3..8d7f1e1dc731 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js @@ -189,7 +189,36 @@ function ctbmv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, stri ( !isrm && uplo === 'upper' && trans !== 'no-transpose' ) || ( isrm && uplo === 'lower' && trans === 'no-transpose' ) ) { - + for ( i1 = 0; i1 < N; i1++ ) { + ix1 = ox + ( i1 * sx ); + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; + retmp = rex; + imtmp = imx; + oa2 = oa + ( i1 * sa1 ) + ( K * sa0 ); + for ( i0 = max( 0, i1 - K ); i0 < i1; i0++ ) { + ix0 = ox + ( i0 * sx ); + ia = oa2 + ( ( i0 - i1 ) * sa0 ); + rea = viewA[ ia ]; + ima = sign * viewA[ ia + 1 ]; + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; + retmp -= f32( ( rea * rex ) - ( ima * imx ) ); + imtmp -= f32( ( rea * imx ) + ( ima * rex ) ); + } + if ( nonunit ) { + rea = viewA[ oa2 ]; + ima = sign * viewA[ oa2 + 1 ]; + magsq = f32( ( rea * rea ) + ( ima * ima ) ); + remul = f32( ( retmp * rea ) + ( imtmp * ima ) ); + immul = f32( ( imtmp * rea ) - ( retmp * ima ) ); + retmp = f32( remul / magsq ); + imtmp = f32( immul / magsq ); + } + viewX[ ix1 ] = retmp; + viewX[ ix1 + 1 ] = imtmp; + } + return x; } // ( !isrm && uplo === 'lower' && trans !== 'no-transpose' ) || ( isrm && uplo === 'upper' && trans === 'no-transpose' ) From 40cd6888826ffade6c7eb3a66480d4f2c0615f0a Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 19:22:24 +0000 Subject: [PATCH 8/9] feat: add branch 4 logic --- 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/ctbsv/lib/base.js | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js index 8d7f1e1dc731..dfad738d08d0 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/lib/base.js @@ -50,13 +50,13 @@ var min = require( '@stdlib/math/base/special/min' ); * @example * var Complex64Array = require( '@stdlib/array/complex64' ); * -* var A = new Complex64Array( [ ] ); -* var x = new Complex64Array( [ ] ); +* var A = new Complex64Array( [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ] ); +* var x = new Complex64Array( [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ] ); * * ctbsv( 'lower', 'no-transpose', 'non-unit', 3, 1, A, 2, 1, 0, x, 1, 0 ); -* // x => [ ] +* // x => [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] */ -function ctbmv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, strideX, offsetX ) { // eslint-disable-line max-params, max-len +function ctbsv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, strideX, offsetX ) { // eslint-disable-line max-params, max-len var nonunit; var viewA; var viewX; @@ -221,10 +221,39 @@ function ctbmv( uplo, trans, diag, N, K, A, strideA1, strideA2, offsetA, x, stri return x; } // ( !isrm && uplo === 'lower' && trans !== 'no-transpose' ) || ( isrm && uplo === 'upper' && trans === 'no-transpose' ) - + for ( i1 = N - 1; i1 >= 0; i1-- ) { + ix1 = ox + ( i1 * sx ); + rex = viewX[ ix1 ]; + imx = viewX[ ix1 + 1 ]; + retmp = rex; + imtmp = imx; + oa2 = oa + ( i1 * sa1 ); + for ( i0 = min( N - 1, i1 + K ); i0 > i1; i0-- ) { + ix0 = ox + ( i0 * sx ); + ia = oa2 + ( ( i0 - i1 ) * sa0 ); + rea = viewA[ ia ]; + ima = sign * viewA[ ia + 1 ]; + rex = viewX[ ix0 ]; + imx = viewX[ ix0 + 1 ]; + retmp -= f32( ( rea * rex ) - ( ima * imx ) ); + imtmp -= f32( ( rea * imx ) + ( ima * rex ) ); + } + if ( nonunit ) { + rea = viewA[ oa2 ]; + ima = sign * viewA[ oa2 + 1 ]; + magsq = f32( ( rea * rea ) + ( ima * ima ) ); + remul = f32( ( retmp * rea ) + ( imtmp * ima ) ); + immul = f32( ( imtmp * rea ) - ( retmp * ima ) ); + retmp = f32( remul / magsq ); + imtmp = f32( immul / magsq ); + } + viewX[ ix1 ] = retmp; + viewX[ ix1 + 1 ] = imtmp; + } + return x; } // EXPORTS // -module.exports = ctbmv; \ No newline at end of file +module.exports = ctbsv; From ffa6fe4384ed8959e2ad5c392e829b14029d37f5 Mon Sep 17 00:00:00 2001 From: Divit Date: Mon, 13 Apr 2026 19:23:03 +0000 Subject: [PATCH 9/9] test: add branch 4 fixtures --- 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_l_t_nu.json | 26 ++++++++++++++++++ .../test/fixtures/column_major_l_t_u.json | 26 ++++++++++++++++++ .../test/fixtures/row_major_l_nt_nu.json | 4 +-- .../ctbsv/test/fixtures/row_major_l_nt_u.json | 4 +-- .../test/fixtures/row_major_u_nt_nu.json | 27 +++++++++++++++++++ .../ctbsv/test/fixtures/row_major_u_nt_u.json | 27 +++++++++++++++++++ 6 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_u.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_nu.json create mode 100644 lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_u.json diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_nu.json new file mode 100644 index 000000000000..4dcfb1bf06f6 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_nu.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "lower", + "trans": "transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ], + [ 2.0, 2.0, 4.0, 4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 0.0, 10.0, 0.0, 36.0, 0.0, 30.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_u.json new file mode 100644 index 000000000000..d839d8fc9843 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/column_major_l_t_u.json @@ -0,0 +1,26 @@ +{ + "order": "column-major", + "uplo": "lower", + "trans": "transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 3.0, 3.0, 5.0, 5.0 ], + [ 2.0, 2.0, 4.0, 4.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 0.0, 0.0, 0.0, 0.0 ], + [ 2.0, 2.0, 3.0, 3.0, 0.0, 0.0 ], + [ 0.0, 0.0, 4.0, 4.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "x": [ 1.0, 9.0, 2.0, 26.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json index 5d317fb39fb8..6a460a46900b 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_nu.json @@ -2,7 +2,7 @@ "order": "row-major", "uplo": "lower", "trans": "no-transpose", - "diag": "unit", + "diag": "non-unit", "N": 3, "K": 1, "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], @@ -20,7 +20,7 @@ "strideA1": 2, "strideA2": 1, "offsetA": 0, - "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], + "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], "strideX": 1, "offsetX": 0, "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json index 6a460a46900b..5d317fb39fb8 100644 --- a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_l_nt_u.json @@ -2,7 +2,7 @@ "order": "row-major", "uplo": "lower", "trans": "no-transpose", - "diag": "non-unit", + "diag": "unit", "N": 3, "K": 1, "A": [ 0.0, 0.0, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0 ], @@ -20,7 +20,7 @@ "strideA1": 2, "strideA2": 1, "offsetA": 0, - "x": [ 0.0, 2.0, 0.0, 16.0, 0.0, 46.0 ], + "x": [ 1.0, 1.0, 2.0, 6.0, 3.0, 19.0 ], "strideX": 1, "offsetX": 0, "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_nu.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_nu.json new file mode 100644 index 000000000000..a612b4464be0 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_nu.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "upper", + "trans": "no-transpose", + "diag": "non-unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 2.0, 2.0 ], + [ 3.0, 3.0, 4.0, 4.0 ], + [ 5.0, 5.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 0.0, 10.0, 0.0, 36.0, 0.0, 30.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_u.json b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_u.json new file mode 100644 index 000000000000..f36032709763 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/ctbsv/test/fixtures/row_major_u_nt_u.json @@ -0,0 +1,27 @@ +{ + "order": "row-major", + "uplo": "upper", + "trans": "no-transpose", + "diag": "unit", + "N": 3, + "K": 1, + "A": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 0.0, 0.0 ], + "A_compact": [ + [ 1.0, 1.0, 2.0, 2.0 ], + [ 3.0, 3.0, 4.0, 4.0 ], + [ 5.0, 5.0, 0.0, 0.0 ] + ], + "A_mat": [ + [ 1.0, 1.0, 2.0, 2.0, 0.0, 0.0 ], + [ 0.0, 0.0, 3.0, 3.0, 4.0, 4.0 ], + [ 0.0, 0.0, 0.0, 0.0, 5.0, 5.0 ] + ], + "LDA": 2, + "strideA1": 2, + "strideA2": 1, + "offsetA": 0, + "x": [ 1.0, 9.0, 2.0, 26.0, 3.0, 3.0 ], + "strideX": 1, + "offsetX": 0, + "x_out": [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] +}