From d9647e4d316d84255a7977474019b4cd4009d1f9 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Sat, 3 Oct 2026 03:24:15 +0200 Subject: [PATCH] feat: add lapack/base/dgbtf2 Implement one complete JavaScript/C/native unblocked band LU routine with validated views, output-only stepwise pivots and reference-backed regression coverage. Assisted-by: OpenAI Codex agents --- .../@stdlib/lapack/base/dgbtf2/NOTICE | 56 + .../@stdlib/lapack/base/dgbtf2/README.md | 319 ++ .../lapack/base/dgbtf2/benchmark/benchmark.js | 143 + .../dgbtf2/benchmark/benchmark.ndarray.js | 143 + .../lapack/base/dgbtf2/benchmark/c/Makefile | 146 + .../base/dgbtf2/benchmark/c/benchmark.c | 168 + .../@stdlib/lapack/base/dgbtf2/binding.gyp | 265 + .../@stdlib/lapack/base/dgbtf2/docs/repl.txt | 143 + .../lapack/base/dgbtf2/docs/types/index.d.ts | 149 + .../lapack/base/dgbtf2/docs/types/test.ts | 82 + .../lapack/base/dgbtf2/examples/c/Makefile | 146 + .../lapack/base/dgbtf2/examples/c/example.c | 65 + .../lapack/base/dgbtf2/examples/index.js | 55 + .../@stdlib/lapack/base/dgbtf2/include.gypi | 70 + .../include/stdlib/lapack/base/dgbtf2.h | 66 + .../@stdlib/lapack/base/dgbtf2/lib/base.js | 229 + .../lapack/base/dgbtf2/lib/can_use_native.js | 121 + .../@stdlib/lapack/base/dgbtf2/lib/factory.js | 116 + .../@stdlib/lapack/base/dgbtf2/lib/index.js | 32 + .../@stdlib/lapack/base/dgbtf2/lib/main.js | 33 + .../@stdlib/lapack/base/dgbtf2/lib/native.js | 35 + .../lapack/base/dgbtf2/lib/validate.js | 226 + .../@stdlib/lapack/base/dgbtf2/manifest.json | 98 + .../@stdlib/lapack/base/dgbtf2/package.json | 76 + .../@stdlib/lapack/base/dgbtf2/src/Makefile | 70 + .../@stdlib/lapack/base/dgbtf2/src/addon.c | 158 + .../@stdlib/lapack/base/dgbtf2/src/dgbtf2.c | 53 + .../lapack/base/dgbtf2/src/dgbtf2_ndarray.c | 145 + .../@stdlib/lapack/base/dgbtf2/src/panel.h | 134 + .../@stdlib/lapack/base/dgbtf2/src/validate.h | 306 ++ .../base/dgbtf2/test/fixtures/reference.json | 4308 +++++++++++++++++ .../lapack/base/dgbtf2/test/helpers.js | 290 ++ .../@stdlib/lapack/base/dgbtf2/test/test.js | 42 + .../lapack/base/dgbtf2/test/test.native.js | 64 + .../lapack/base/dgbtf2/test/test_api.js | 175 + 35 files changed, 8727 insertions(+) create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/NOTICE create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/README.md create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.ndarray.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/binding.gyp create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/include.gypi create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/include/stdlib/lapack/base/dgbtf2.h create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/base.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/can_use_native.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/factory.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/index.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/main.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/native.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/validate.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/manifest.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/package.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/Makefile create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/addon.c create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2.c create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2_ndarray.c create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/panel.h create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/src/validate.h create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/test/fixtures/reference.json create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/test/helpers.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.native.js create mode 100644 lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test_api.js diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/NOTICE b/lib/node_modules/@stdlib/lapack/base/dgbtf2/NOTICE new file mode 100644 index 000000000000..a9636d49bc1a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/NOTICE @@ -0,0 +1,56 @@ +DGBTF2 derives from unchanged Reference-LAPACK SRC/dgbtf2.f at commit +2e5d9c1273435fbd953adb294ed603e4789afaba. Private GER retains the +DGER update order of Jack Dongarra, Jeremy Du Croz, Sven Hammarling +and Richard Hanson. The reference algorithm includes no reciprocal +safe-minimum branch. The private first-absolute-maximum helper retains +IDAMAX first-tie comparisons (Jack Dongarra, LINPACK, March 1978). +The original full BSD license follows. + +Copyright (c) 1992-2025 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +Copyright (c) 2000-2025 The University of California Berkeley. All + rights reserved. +Copyright (c) 2006-2025 The University of Colorado Denver. All rights + reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/README.md b/lib/node_modules/@stdlib/lapack/base/dgbtf2/README.md new file mode 100644 index 000000000000..bdc31dad0bea --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/README.md @@ -0,0 +1,319 @@ + + +# dgbtf2 + +> Compute an unblocked LU factorization of a real general band matrix. + +
+ +Factors a real `M`-by-`N` general band matrix in place using partial pivoting. The compact storage reserves additional band rows for fill. The function returns numeric `INFO` separately from the positive 1-based stepwise pivot outputs. + +
+ + + +
+ +## Usage + +```javascript +var dgbtf2 = require( '@stdlib/lapack/base/dgbtf2' ); +``` + +#### dgbtf2( order, M, N, KL, KU, AB, LDAB, PIV ) + +Returns zero or the position of the first exactly-zero computed U pivot. A positive status still produces subsequent pivot steps. + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); + +var AB = new Float64Array( [ 0.0, 2.0, 0.0 ] ); +var PIV = new Int32Array( 3 ); + +var info = dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, PIV ); +// returns 1 +// PIV => [ 1, 2, 3 ] +// AB => [ 0.0, 2.0, 0.0 ] +``` + +The function has the following parameters: + +- **order**: `'row-major'` (`101`) or `'column-major'` (`102`). +- **M**: nonnegative safe integer row count, at most `2147483647`. +- **N**: nonnegative safe integer column count, at most `2147483647`. +- **KL**: nonnegative safe integer lower bandwidth, at most `2147483647`. +- **KU**: nonnegative safe integer upper bandwidth, at most `2147483647`. +- **AB**: input/output `Float64Array` containing the full `H`-by-`N` compact band view, where `H=2*KL+KU+1`. +- **LDAB**: leading dimension; at least `H` for column-major or `max(1,N)` for row-major. +- **PIV**: output `Int32Array` with `K=min(M,N)` active entries. + +`KL` and `KU` may exceed the matrix dimensions. Let `KV=KL+KU`. Dense input `A(i,j)` occupies band row `KV+i-j` when `max(0,j-KU)<=i<=min(M-1,j+KL)`. For band row `b` and matrix column `j`, row-major indexing is `AB[b*LDAB+j]`; column-major indexing is `AB[b+j*LDAB]`. The top `KL` band rows reserve fill capacity and are not original matrix input. Computed U occupies rows `0` through `KV`, and stored multipliers lie below the diagonal band row. + + + +#### dgbtf2.ndarray( M, N, KL, KU, AB, strideAB1, strideAB2, offsetAB, PIV, stridePIV, offsetPIV ) + +Uses explicit element indexing for the full compact band view and stepwise pivots. + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); + +var AB = new Float64Array( [ 9.0, 0.0, 2.0, 0.0, 9.0 ] ); +var PIV = new Int32Array( [ 8, -99, -99, -99, 8 ] ); + +var info = dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 3, PIV, -1, 3 ); +// returns 1 +// PIV => [ 8, 3, 2, 1, 8 ] +// AB => [ 9.0, 0.0, 2.0, 0.0, 9.0 ] +``` + +The matrix slot is `AB[offsetAB+b*strideAB1+j*strideAB2]`, and pivot step `i` is stored at `PIV[offsetPIV+i*stridePIV]`. Strides and offsets are relative to the actual typed-array views, including their byte offsets. Positive and negative independent strides are supported. Mutable zero strides with an extent greater than one, colliding matrix cells and unsafe exact-index arithmetic are rejected before writes. + +
+ + + +
+ +## Notes + +- At zero-based step `j`, `PIV[j]` lies in `[j+1,min(M,j+KL+1)]` and records that step's row interchange. Repetitions are valid: `[2,2,3,4]` exchanges rows 1 and 2 on the first step, then leaves the remaining rows at their respective steps. These outputs are not a final permutation and do not encode rook or signed block pivots. +- Incoming pivot values are ignored. All `K` outputs are produced for nonnegative `INFO`, including singular matrices. Positive `INFO` identifies the first exactly-zero computed U pivot; the routine continues subsequent steps. Zero `INFO` is not a numerical stability or accuracy certificate. +- Source-defined ignored compact slots, padding and guards remain unchanged. Input fill capacity is not treated as original matrix input. Defined factorization results follow the reference for finite active band inputs with finite intermediate arithmetic. The original reciprocal path is retained; sufficiently tiny nonzero pivots may overflow even with finite inputs. No universal active nonfinite parity is promised. +- Active arrays require intrinsic ordinary `ArrayBuffer` backing. Currently valid resizable ordinary buffers are supported using their actual extent. `SharedArrayBuffer` views, including cloned shared backing, are rejected. Shadowed properties do not override intrinsic array metadata; proxies and detached or currently undersized views fail validation. +- Backing stores must remain stable and exclusively accessed throughout the synchronous call: do not resize, detach, transfer, reenter or mutate them concurrently through foreign code. The complete active compact view must fit and be injective. Conservative AB/PIV indexed-byte envelopes must be disjoint; disjoint subviews of one ordinary buffer are allowed. +- Distinct foreign ordinary `ArrayBuffer` objects may expose aliased physical storage that the pure JavaScript path cannot detect. Such storage is outside the caller contract. The native bridge also checks actual indexed pointer envelopes; this does not certify hidden aliases of separate virtual mappings. +- Empty matrices validate layout, `M/N/KL/KU`, exact `KV/H`, and the main layout-specific `LDAB`, then return zero. Arrays, unused ndarray metadata and native dispatch are not accessed, and no output is written. Column-major `LDAB>=H` and row-major `LDAB>=max(1,N)` still apply. Public empty calls are checked before native-width narrowing; raw C/native entrypoints use their separate configured integer domains. +- Native eligibility is checked before writes. Unused singleton strides may be normalized to one after validating the original views; used strides remain unchanged. An otherwise valid public call outside the conservative selected native eligibility domain uses JavaScript before dispatch. Physical alias errors do not trigger fallback. Mixed-width native pivots are output-only staged before writes and copied back for every nonnegative status. +- Invalid selectors, active intrinsic brands and backing stores throw `TypeError`. Invalid scalar values, geometry, bounds, collisions or index/helper arithmetic throw `RangeError` before routine-owned writes. Native allocation failures throw `Error`. TypeScript annotations do not encode these runtime preconditions. +- The JavaScript engine floor in package metadata is proposed for pure JavaScript use. A compiled addon has a separate Node-API/toolchain requirement; one Linux/Node runtime check does not establish compatibility with every supported platform. + +
+ + + +
+ +## Examples + +```javascript +'use strict'; + +// MODULES // + +var assert = require( 'assert' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); +var dgbtf2 = require( '@stdlib/lapack/base/dgbtf2' ); + + +// MAIN // + +// Four compact band rows; the first row is additional fill capacity: +var AB = new Float64Array( 16 ); +AB.set( [ 999, 999, 999, 999 ], 0 ); +AB.set( [ 999, 2, 2, 1 ], 4 ); +AB.set( [ 1, 3, 5, 7 ], 8 ); +AB.set( [ -4, 2, 3, 999 ], 12 ); +var PIV = new Int32Array( 4 ); +var info = dgbtf2( 'row-major', 4, 4, 1, 1, AB, 4, PIV ); +assert.strictEqual( info, 0 ); +assert.strictEqual( Array.prototype.join.call( PIV, ',' ), '2,2,3,4' ); +assert.strictEqual( AB[ 8 ], -4.0 ); +assert.strictEqual( AB[ 12 ], -0.25 ); +assert.strictEqual( AB[ 0 ], 999.0 ); +assert.strictEqual( AB[ 1 ], 999.0 ); +assert.strictEqual( AB[ 15 ], 999.0 ); +console.log( 'INFO: %d; stepwise PIV: %s', info, Array.prototype.join.call( PIV, ', ' ) ); + +// A zero first pivot records INFO=1, yet later pivot outputs are produced: +AB = new Float64Array( [ 9, 0, 2, 0, 9 ] ); +PIV = new Int32Array( [ 8, -99, -99, -99, 8 ] ); +info = dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 3, PIV, -1, 3 ); +assert.strictEqual( info, 1 ); +assert.strictEqual( Array.prototype.join.call( PIV, ',' ), '8,3,2,1,8' ); +assert.strictEqual( Array.prototype.join.call( AB, ',' ), '9,0,2,0,9' ); +console.log( 'Strided INFO: %d; guarded PIV: %s', info, Array.prototype.join.call( PIV, ', ' ) ); +``` + +
+ + + + + +
+ +## C APIs + +
+ +### Usage + +```c +#include "stdlib/lapack/base/dgbtf2.h" +``` + +#### c_dgbtf2( order, M, N, KL, KU, AB, LDAB, PIV ) + +Factors the full compact band view and writes positive 1-based stepwise pivots. Capacities and exclusive valid allocation lifetimes are caller preconditions. + +```c +LAPACK_INT API_SUFFIX(c_dgbtf2)( const LAPACK_LAYOUT order, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT LDAB, LAPACK_INT *PIV ); +``` + +Negative rejected positions are order `-1`, M `-2`, N `-3`, KL `-4`, KU `-5`, AB `-6`, LDAB `-7`, PIV `-8`. Exact `KV` overflow maps to KU and `H` overflow to KL. An invalid leading-dimension minimum maps to LDAB; active compact geometry, pointer arithmetic and helper-stride guards map to AB. + + + +#### c_dgbtf2_ndarray( M, N, KL, KU, AB, strideAB1, strideAB2, offsetAB, PIV, stridePIV, offsetPIV ) + +Uses explicit element strides and offsets. + +```c +LAPACK_INT API_SUFFIX(c_dgbtf2_ndarray)( const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT strideAB1, const LAPACK_INT strideAB2, const LAPACK_INT offsetAB, LAPACK_INT *PIV, const LAPACK_INT stridePIV, const LAPACK_INT offsetPIV ); +``` + +Negative positions are M `-1`, N `-2`, KL `-3`, KU `-4`, AB `-5`, strideAB1 `-6`, strideAB2 `-7`, offsetAB `-8`, PIV `-9`, stridePIV `-10`, offsetPIV `-11`. Matrix collisions and a used diagonal helper stride map to strideAB2; pointer-envelope overlap maps to PIV. The allocation-free C routines return mathematical `INFO` or negative argument statuses. The JavaScript native adapter throws `Error` if output staging allocation fails; it does not return an allocation status as `INFO`. + +Validation checks the scalar quartet, exact `KV/H`, main leading dimension and empty return before positive-only loop transients or array metadata. Positive calls validate full injective AB/PIV geometry, exact configured integer and pointer-byte endpoints, helper count/trip arithmetic, and physical indexed-byte envelope disjointness before writes. `LAPACK_INT`, called BLAS/Fortran integer widths and API64 suffixes are independent configuration choices. Raw C cannot infer allocation capacity and does not widen its configured empty domain. For a valid empty call no pointers or unused ndarray strides/offsets are accessed and nothing is written. Package-local first-absolute-maximum and ordered rank-one updates avoid allocating during factorization and preserve logical reference arithmetic across layouts. + +
+ + + +
+ +### Examples + +```c +#include "stdlib/lapack/base/dgbtf2.h" +#include "stdlib/lapack/base/shared.h" +#include + +int main( void ) { + double AB[] = { 0.0, 2.0, 0.0 }; + LAPACK_INT PIV[ 3 ] = { -99, -99, -99 }; + LAPACK_INT info; + + info = API_SUFFIX(c_dgbtf2)( LAPACK_ROW_MAJOR, 3, 3, 0, 0, AB, 3, PIV ); + if ( info != 1 || PIV[ 0 ] != 1 || PIV[ 1 ] != 2 || PIV[ 2 ] != 3 ) { + return 1; + } + printf( "INFO: %d; later step PIV: %d\n", (int)info, (int)PIV[ 2 ] ); + return 0; +} +``` + +
+ + + +
+ + + +
+ +## References + +The factorization is adapted from [Reference-LAPACK `DGBTF2`][lapack-source] at commit `2e5d9c1273435fbd953adb294ed603e4789afaba`. Package-local helpers follow reference [first absolute maximum `IDAMAX`][idamax-source] and [ordered rank-one update `DGER`][dger-source], retaining their original attribution and source-order semantics: Jack Dongarra's LINPACK `IDAMAX` (11 March 1978), and `DGER` by Jack Dongarra, Jeremy Du Croz, Sven Hammarling and Richard Hanson (1986). The original copyright, conditions and disclaimer are retained in [NOTICE][lapack-notice] and reproduced below for source and binary distributions. The public API, compact row-major indexing, prevalidation and empty behavior are package adaptations; they do not imply an upstream-adopted interface or reference defect correction. + +```text +Copyright (c) 1992-2025 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +Copyright (c) 2000-2025 The University of California Berkeley. All + rights reserved. +Copyright (c) 2006-2025 The University of Colorado Denver. All rights + reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +``` + +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.js new file mode 100644 index 000000000000..3e23020a9a35 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.js @@ -0,0 +1,143 @@ +/** +* @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 Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dgbtf2 = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a bounded reset-and-factor benchmark. +* +* @private +* @param {PositiveInteger} N - column count +* @param {boolean} tall - whether to add two rows +* @param {boolean} singular - whether the first column is zero +* @returns {Function} benchmark function +*/ +function createBenchmark( N, tall, singular ) { + var original; + var PIV; + var AB; + var M; + var r; + var c; + var i; + var j; + + M = ( tall ) ? N+2 : N; + original = new Float64Array( 4*N ); + AB = new Float64Array( 4*N ); + PIV = new Int32Array( N ); + r = N; + c = 1; + for ( i = 0; i < original.length; i++ ) { + original[ i ] = 999.0; + } + for ( j = 0; j < N; j++ ) { + original[ (2*r)+(j*c) ] = ( singular && j === 0 ) ? 0.0 : N+4.0; + if ( j > 0 ) { + original[ r+(j*c) ] = 0.5; + } + if ( j+1 < M ) { + original[ (3*r)+(j*c) ] = ( singular && j === 0 ) ? 0.0 : 0.25; + } + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var expectedInfo; + var info; + var i; + + expectedInfo = ( singular ) ? 1 : 0; + info = -9; + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + // Reset the compact band input before each factorization: + AB.set( original ); + info = dgbtf2( 'row-major', M, N, 1, 1, AB, N, PIV ); + if ( info !== expectedInfo ) { + b.fail( 'should produce the expected factorization status' ); + break; + } + } + b.toc(); + for ( i = 0; i < N; i++ ) { + if ( PIV[ i ] !== i+1 ) { + b.fail( 'should produce the complete identity swap history' ); + break; + } + } + if ( AB[ 0 ] !== 999.0 ) { + b.fail( 'should preserve the unused fill corner' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var options; + var sizes; + var name; + var fcn; + var i; + var j; + var k; + + options = { + 'iterations': 200, + 'repeats': 2 + }; + sizes = [ 8, 16 ]; + for ( i = 0; i < sizes.length; i++ ) { + for ( j = 0; j < 2; j++ ) { + for ( k = 0; k < 2; k++ ) { + name = format( '%s:N=%d:shape=%s:first=%s', pkg, sizes[ i ], ( j ) ? 'tall' : 'square', ( k ) ? 'zero' : 'positive' ); + fcn = createBenchmark( sizes[ i ], j === 1, k === 1 ); + bench( name, options, fcn ); + } + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.ndarray.js new file mode 100644 index 000000000000..cc667f863745 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/benchmark.ndarray.js @@ -0,0 +1,143 @@ +/** +* @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 Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; +var dgbtf2 = require( './../lib' ); + + +// FUNCTIONS // + +/** +* Creates a bounded reset-and-factor benchmark. +* +* @private +* @param {PositiveInteger} N - column count +* @param {boolean} tall - whether to add two rows +* @param {boolean} singular - whether the first column is zero +* @returns {Function} benchmark function +*/ +function createBenchmark( N, tall, singular ) { + var original; + var PIV; + var AB; + var M; + var r; + var c; + var i; + var j; + + M = ( tall ) ? N+2 : N; + original = new Float64Array( 4*N ); + AB = new Float64Array( 4*N ); + PIV = new Int32Array( N ); + r = 1; + c = 4; + for ( i = 0; i < original.length; i++ ) { + original[ i ] = 999.0; + } + for ( j = 0; j < N; j++ ) { + original[ (2*r)+(j*c) ] = ( singular && j === 0 ) ? 0.0 : N+4.0; + if ( j > 0 ) { + original[ r+(j*c) ] = 0.5; + } + if ( j+1 < M ) { + original[ (3*r)+(j*c) ] = ( singular && j === 0 ) ? 0.0 : 0.25; + } + } + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var expectedInfo; + var info; + var i; + + expectedInfo = ( singular ) ? 1 : 0; + info = -9; + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + // Reset the compact band input before each factorization: + AB.set( original ); + info = dgbtf2.ndarray( M, N, 1, 1, AB, r, c, 0, PIV, 1, 0 ); + if ( info !== expectedInfo ) { + b.fail( 'should produce the expected factorization status' ); + break; + } + } + b.toc(); + for ( i = 0; i < N; i++ ) { + if ( PIV[ i ] !== i+1 ) { + b.fail( 'should produce the complete identity swap history' ); + break; + } + } + if ( AB[ 0 ] !== 999.0 ) { + b.fail( 'should preserve the unused fill corner' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var options; + var sizes; + var name; + var fcn; + var i; + var j; + var k; + + options = { + 'iterations': 200, + 'repeats': 2 + }; + sizes = [ 8, 16 ]; + for ( i = 0; i < sizes.length; i++ ) { + for ( j = 0; j < 2; j++ ) { + for ( k = 0; k < 2; k++ ) { + name = format( '%s:ndarray:N=%d:shape=%s:first=%s', pkg, sizes[ i ], ( j ) ? 'tall' : 'square', ( k ) ? 'zero' : 'positive' ); + fcn = createBenchmark( sizes[ i ], j === 1, k === 1 ); + bench( name, options, fcn ); + } + } + } +} + +main(); diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/Makefile b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/benchmark.c new file mode 100644 index 000000000000..a7b594f844c1 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/benchmark/c/benchmark.c @@ -0,0 +1,168 @@ +/** +* @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. +*/ + +#include "stdlib/lapack/base/dgbtf2.h" +#include "stdlib/lapack/base/shared.h" +#include +#include +#include +#include + +#define ITERATIONS 200 +#define REPEATS 2 + +/** +* Returns a clock time in seconds. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Resets and factors a bounded band matrix, then validates its outputs. +* +* @param N column count +* @param tall whether to add two rows +* @param ndarray whether to use explicit column-major indexing +* @param singular whether the first column is zero +* @return elapsed seconds or -1 on failure +*/ +static double benchmark( const LAPACK_INT N, const int tall, const int ndarray, const int singular ) { + double *original; + double *AB; + LAPACK_INT *PIV; + LAPACK_INT M; + LAPACK_INT r; + LAPACK_INT c; + LAPACK_INT expectedInfo; + LAPACK_INT info; + LAPACK_INT i; + LAPACK_INT j; + double elapsed; + double t; + int k; + + M = tall ? N+2 : N; + r = ndarray ? 1 : N; + c = ndarray ? 4 : 1; + original = (double *)malloc( (size_t)(4*N) * sizeof( double ) ); + AB = (double *)malloc( (size_t)(4*N) * sizeof( double ) ); + PIV = (LAPACK_INT *)malloc( (size_t)N * sizeof( LAPACK_INT ) ); + if ( original == NULL || AB == NULL || PIV == NULL ) { + fprintf( stderr, "Error allocating bounded benchmark buffers.\n" ); + free( original ); + free( AB ); + free( PIV ); + return -1.0; + } + for ( i = 0; i < 4*N; i++ ) { + original[ i ] = 999.0; + } + for ( j = 0; j < N; j++ ) { + PIV[ j ] = -99; + original[ (2*r)+(j*c) ] = ( singular && j == 0 ) ? 0.0 : (double)N+4.0; + if ( j > 0 ) { + original[ r+(j*c) ] = 0.5; + } + if ( j+1 < M ) { + original[ (3*r)+(j*c) ] = ( singular && j == 0 ) ? 0.0 : 0.25; + } + } + expectedInfo = singular ? 1 : 0; + info = -9; + t = tic(); + for ( k = 0; k < ITERATIONS; k++ ) { + // Include resetting the compact input in the measured workload: + memcpy( AB, original, (size_t)(4*N) * sizeof( double ) ); + if ( ndarray ) { + info = API_SUFFIX(c_dgbtf2_ndarray)( M, N, 1, 1, AB, r, c, 0, PIV, 1, 0 ); + } else { + info = API_SUFFIX(c_dgbtf2)( LAPACK_ROW_MAJOR, M, N, 1, 1, AB, N, PIV ); + } + if ( info != expectedInfo ) { + break; + } + } + elapsed = tic() - t; + if ( info != expectedInfo || AB[ 0 ] != 999.0 ) { + elapsed = -1.0; + } + for ( i = 0; i < N; i++ ) { + if ( PIV[ i ] != i+1 ) { + elapsed = -1.0; + } + } + free( original ); + free( AB ); + free( PIV ); + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + const LAPACK_INT sizes[] = { 8, 16 }; + double elapsed; + int count; + int passing; + int i; + int tall; + int ndarray; + int singular; + int r; + + count = 0; + passing = 0; + printf( "TAP version 13\n" ); + for ( i = 0; i < 2; i++ ) { + for ( tall = 0; tall < 2; tall++ ) { + for ( ndarray = 0; ndarray < 2; ndarray++ ) { + for ( singular = 0; singular < 2; singular++ ) { + for ( r = 0; r < REPEATS; r++ ) { + count += 1; + printf( "# c::dgbtf2:N=%d:tall=%d:ndarray=%d:singular=%d\n", (int)sizes[ i ], tall, ndarray, singular ); + elapsed = benchmark( sizes[ i ], tall, ndarray, singular ); + if ( elapsed < 0.0 ) { + printf( "not ok %d benchmark failed\n", count ); + } else { + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " ...\n" ); + printf( "ok %d benchmark finished\n", count ); + passing += 1; + } + } + } + } + } + } + printf( "1..%d\n", count ); + printf( "# total %d\n", count ); + printf( "# pass %d\n", passing ); + if ( passing == count ) { + printf( "# ok\n" ); + return EXIT_SUCCESS; + } + return EXIT_FAILURE; +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/binding.gyp b/lib/node_modules/@stdlib/lapack/base/dgbtf2/binding.gyp new file mode 100644 index 000000000000..864d9109e892 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/binding.gyp @@ -0,0 +1,265 @@ +# @license Apache-2.0 +# +# Copyright (c) 2018 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Fortran compiler (to override -Dfortran_compiler=): + 'fortran_compiler%': 'gfortran', + + # Fortran compiler flags: + 'fflags': [ + # Specify the Fortran standard to which a program is expected to conform: + '-std=f95', + + # Indicate that the layout is free-form source code: + '-ffree-form', + + # Aggressive optimization: + '-O3', + + # Enable commonly used warning options: + '-Wall', + + # Warn if source code contains problematic language features: + '-Wextra', + + # Warn if a procedure is called without an explicit interface: + '-Wimplicit-interface', + + # Do not transform names of entities specified in Fortran source files by appending underscores (i.e., don't mangle names, thus allowing easier usage in C wrappers): + '-fno-underscoring', + + # Warn if source code contains Fortran 95 extensions and C-language constructs: + '-pedantic', + + # Compile but do not link (output is an object file): + '-c', + ], + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + + # Define custom build actions for particular inputs: + 'rules': [ + { + # Define a rule for processing Fortran files: + 'extension': 'f', + + # Define the pathnames to be used as inputs when performing processing: + 'inputs': [ + # Full path of the current input: + '<(RULE_INPUT_PATH)' + ], + + # Define the outputs produced during processing: + 'outputs': [ + # Store an output object file in a directory for placing intermediate results (only accessible within a single target): + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).<(obj)' + ], + + # Define the rule for compiling Fortran based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + + # Rule to compile Fortran on Windows: + { + 'rule_name': 'compile_fortran_windows', + 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Windows...', + + 'process_outputs_as_sources': 0, + + # Define the command-line invocation: + 'action': [ + '<(fortran_compiler)', + '<@(fflags)', + '<@(_inputs)', + '-o', + '<@(_outputs)', + ], + }, + + # Rule to compile Fortran on non-Windows: + { + 'rule_name': 'compile_fortran_linux', + 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Linux...', + + 'process_outputs_as_sources': 1, + + # Define the command-line invocation: + 'action': [ + '<(fortran_compiler)', + '<@(fflags)', + '-fPIC', # generate platform-independent code + '<@(_inputs)', + '-o', + '<@(_outputs)', + ], + } + ], # end condition (OS=="win") + ], # end conditions + }, # end rule (extension=="f") + ], # end rules + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/repl.txt b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/repl.txt new file mode 100644 index 000000000000..bccedcc369a2 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/repl.txt @@ -0,0 +1,143 @@ +{{alias}}( order, M, N, KL, KU, AB, LDAB, PIV ) + Computes an unblocked LU factorization of a real general band matrix. + + H=2KL+KU+1 and KV=KL+KU. The full compact AB view is H-by-N; + dense input A(i,j) occupies band row KV+i-j. Top KL rows reserve + fill capacity, not original matrix input. Source-defined unused + slots and guards remain unchanged. KL/KU may exceed dimensions. + + Returns numeric INFO and writes min(M,N) positive 1-based stepwise + row-swap outputs. Repeated pivots are valid, not a final permutation. + Positive INFO is the first exactly-zero U pivot; later steps continue. + INFO=0 is not a stability certificate. Finite active inputs and + finite intermediate arithmetic define reference-comparison scope; + the original tiny-pivot reciprocal may overflow. + + Active arrays require intrinsic ordinary ArrayBuffer backing, + including currently valid resizable backing. SharedArrayBuffer + views are rejected. Stable exclusive backing is required throughout + the synchronous call: no resize, detach, transfer or foreign mutation. + Shadow properties do not change intrinsic metadata. Full AB must + fit and be injective; AB/PIV indexed-byte envelopes are disjoint. + Distinct foreign ordinary buffers sharing physical storage are + outside the pure JavaScript caller contract. + + Validate layout, M/N/KL/KU, exact H/KV and LDAB before empty return. + For M=0 or N=0, return zero without accessing arrays/unused ndarray + metadata, native dispatch, allocations or writes. Column-major + LDAB>=H and row-major LDAB>=max(1,N) still apply. Raw native/C use + their configured integer domain; valid wide public empty scalars + are not narrowed into a native call. + + TypeError rejects invalid selectors, active brands and backing; + RangeError rejects geometry/integer/arithmetic errors before writes. + Native allocation failure throws Error. Native eligibility is checked + before writes; unused singleton strides may be normalized to one. + Output-only native pivots are staged before writes across widths. + + Parameters + ---------- + order: string|number + Row-major (101) or column-major (102) compact-band layout. + + M: integer + Nonnegative safe row count, at most 2147483647. + + N: integer + Nonnegative safe column count, at most 2147483647. + + KL: integer + Nonnegative safe lower bandwidth, at most 2147483647. + + KU: integer + Nonnegative safe upper bandwidth, at most 2147483647. + + AB: Float64Array + Full input/output H-by-N compact band view. + + LDAB: integer + At least H column-major or max(1,N) row-major, including empty. + + PIV: Int32Array + Positive min(M,N) 1-based stepwise pivot outputs. + + Returns + ------- + info: number + Zero or the first exactly-zero U pivot position. + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [ 0, 2, 0 ] ); + > var P = new {{alias:@stdlib/array/int32}}( 3 ); + > {{alias}}( 'row-major', 3, 3, 0, 0, A, 3, P ) + 1 + > P + [ 1, 2, 3 ] + > A + [ 0, 2, 0 ] + + +{{alias}}.ndarray( M, N, KL, KU, AB, r, c, oa, PIV, sp, op ) + Factors using explicit element strides/offsets relative to each view. + + AB[oa+b*r+j*c] contains band row b/column j; PIV[op+i*sp] receives + step i. Signed independent strides are supported; mutable broadcasts + with extent greater than one and colliding band cells are rejected. + For an empty matrix, validate M/N/KL/KU and H/KV, then return zero + without array or unused metadata access, native dispatch or writes. + All active backing/envelope/finite-domain rules above apply. + + Parameters + ---------- + M: integer + Nonnegative safe row count, at most 2147483647. + + N: integer + Nonnegative safe column count, at most 2147483647. + + KL: integer + Nonnegative safe lower bandwidth, at most 2147483647. + + KU: integer + Nonnegative safe upper bandwidth, at most 2147483647. + + AB: Float64Array + Full input/output H-by-N compact band view. + + r: integer + Band-row element stride. + + c: integer + Matrix-column element stride. + + oa: integer + Band starting index. + + PIV: Int32Array + Positive min(M,N) 1-based stepwise pivot outputs. + + sp: integer + Pivot element stride. + + op: integer + Pivot starting index. + + Returns + ------- + info: number + Zero or the first exactly-zero U pivot position. + + Examples + -------- + > var A = new {{alias:@stdlib/array/float64}}( [ 9, 0, 2, 0, 9 ] ); + > var P = new {{alias:@stdlib/array/int32}}( [ 8, -99, -99, -99, 8 ] ); + > {{alias}}.ndarray( 3, 3, 0, 0, A, 1, -1, 3, P, -1, 3 ) + 1 + > P + [ 8, 3, 2, 1, 8 ] + > A + [ 9, 0, 2, 0, 9 ] + + See Also + -------- diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/index.d.ts b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/index.d.ts new file mode 100644 index 000000000000..13501005f7e0 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/index.d.ts @@ -0,0 +1,149 @@ +/* +* @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 { Layout } from '@stdlib/types/blas'; + +/** +* Interface describing `dgbtf2`. +*/ +interface Routine { + /** + * Computes an unblocked LU factorization of a real general band matrix. + * + * ## Notes + * + * - The full compact band view is H-by-N, with H=2KL+KU+1 and KV=KL+KU; dense A(i,j) is stored at band row KV+i-j. + * - The top KL rows are fill capacity, not original matrix input; source-defined unused cells remain unchanged. + * - PIV is output-only positive 1-based stepwise row-swap history, not a final permutation; repeated values are valid. + * - A positive INFO identifies the first exactly-zero computed U pivot and does not stop subsequent steps; zero is not a stability certificate. + * - KL/KU need not be smaller than matrix dimensions. Dimensions are primitive nonnegative safe integers at most 2147483647. + * - Active views require intrinsic ordinary ArrayBuffer backing, including currently valid resizable backing; SharedArrayBuffer is rejected. + * - Backing stores must remain stable and exclusively accessed throughout the synchronous call; foreign ordinary buffers sharing physical storage are outside the JS caller contract. + * - Full active indexed views must fit, AB must be injective, and AB/PIV indexed-byte envelopes must be disjoint. + * - Empty matrices validate the scalar quartet, exact H/KV and main leading dimension, then return zero without array/unused-metadata access, native dispatch or writes. + * - Finite active input and finite intermediate arithmetic define the reference-comparison domain; tiny reciprocal overflow is unchanged. + * + * @param order - row-major (101) or column-major (102) layout + * @param M - nonnegative matrix row count, at most 2147483647 + * @param N - nonnegative matrix column count, at most 2147483647 + * @param KL - nonnegative lower bandwidth, at most 2147483647 + * @param KU - nonnegative upper bandwidth, at most 2147483647 + * @param AB - full input/output H-by-N compact band view + * @param LDAB - leading dimension; at least H column-major or max(1,N) row-major + * @param PIV - min(M,N) positive 1-based stepwise pivot outputs + * @throws selectors, active array brands and backing stores must be valid + * @throws scalar, bounds, injectivity, alias and integer/stride guards must be satisfied + * @returns numeric INFO, zero or the first zero U pivot position + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * var Int32Array = require( '@stdlib/array/int32' ); + * + * var AB = new Float64Array( [ 0.0, 2.0, 0.0 ] ); + * var PIV = new Int32Array( 3 ); + * + * var info = dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, PIV ); + * // returns 1 + * // PIV => [ 1, 2, 3 ] + * // AB => [ 0.0, 2.0, 0.0 ] + */ + ( order: Layout | 101 | 102, M: number, N: number, KL: number, KU: number, AB: Float64Array, LDAB: number, PIV: Int32Array ): number; + + /** + * Computes an unblocked LU factorization of a real general band matrix. + * + * ## Notes + * + * - The full compact band view is H-by-N, with H=2KL+KU+1 and KV=KL+KU; dense A(i,j) is stored at band row KV+i-j. + * - The top KL rows are fill capacity, not original matrix input; source-defined unused cells remain unchanged. + * - PIV is output-only positive 1-based stepwise row-swap history, not a final permutation; repeated values are valid. + * - A positive INFO identifies the first exactly-zero computed U pivot and does not stop subsequent steps; zero is not a stability certificate. + * - KL/KU need not be smaller than matrix dimensions. Dimensions are primitive nonnegative safe integers at most 2147483647. + * - Active views require intrinsic ordinary ArrayBuffer backing, including currently valid resizable backing; SharedArrayBuffer is rejected. + * - Backing stores must remain stable and exclusively accessed throughout the synchronous call; foreign ordinary buffers sharing physical storage are outside the JS caller contract. + * - Full active indexed views must fit, AB must be injective, and AB/PIV indexed-byte envelopes must be disjoint. + * - Empty matrices validate the scalar quartet, exact H/KV and main leading dimension, then return zero without array/unused-metadata access, native dispatch or writes. + * - Finite active input and finite intermediate arithmetic define the reference-comparison domain; tiny reciprocal overflow is unchanged. + * - Strides and offsets are element indices relative to the actual typed-array views; signed independent strides are supported. + * - Mutable broadcasts with extent greater than one and unsafe exact-index arithmetic are rejected before writes. + * + * @param M - nonnegative matrix row count, at most 2147483647 + * @param N - nonnegative matrix column count, at most 2147483647 + * @param KL - nonnegative lower bandwidth, at most 2147483647 + * @param KU - nonnegative upper bandwidth, at most 2147483647 + * @param AB - full input/output H-by-N compact band view + * @param strideAB1 - band-row element stride + * @param strideAB2 - matrix-column element stride + * @param offsetAB - starting band index + * @param PIV - min(M,N) positive 1-based stepwise pivot outputs + * @param stridePIV - pivot element stride + * @param offsetPIV - starting pivot index + * @throws selectors, active array brands and backing stores must be valid + * @throws scalar, bounds, injectivity, alias and integer/stride guards must be satisfied + * @returns numeric INFO, zero or the first zero U pivot position + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * var Int32Array = require( '@stdlib/array/int32' ); + * + * var AB = new Float64Array( [ 9.0, 0.0, 2.0, 0.0, 9.0 ] ); + * var PIV = new Int32Array( [ 8, -99, -99, -99, 8 ] ); + * + * var info = dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 3, PIV, -1, 3 ); + * // returns 1 + * // PIV => [ 8, 3, 2, 1, 8 ] + * // AB => [ 9.0, 0.0, 2.0, 0.0, 9.0 ] + */ + ndarray( M: number, N: number, KL: number, KU: number, AB: Float64Array, strideAB1: number, strideAB2: number, offsetAB: number, PIV: Int32Array, stridePIV: number, offsetPIV: number ): number; +} + +/** +* Computes an unblocked LU factorization of a real general band matrix. +* +* @param order - row-major (101) or column-major (102) layout +* @param M - nonnegative matrix row count, at most 2147483647 +* @param N - nonnegative matrix column count, at most 2147483647 +* @param KL - nonnegative lower bandwidth, at most 2147483647 +* @param KU - nonnegative upper bandwidth, at most 2147483647 +* @param AB - full input/output H-by-N compact band view +* @param LDAB - leading dimension; at least H column-major or max(1,N) row-major +* @param PIV - min(M,N) positive 1-based stepwise pivot outputs +* @returns numeric INFO, independent of output stepwise pivots +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* var Int32Array = require( '@stdlib/array/int32' ); +* +* var AB = new Float64Array( [ 0.0, 2.0, 0.0 ] ); +* var PIV = new Int32Array( 3 ); +* +* var info = dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, PIV ); +* // returns 1 +* // PIV => [ 1, 2, 3 ] +* // AB => [ 0.0, 2.0, 0.0 ] +*/ +declare var dgbtf2: Routine; + + +// EXPORTS // + +export = dgbtf2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/test.ts b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/test.ts new file mode 100644 index 000000000000..984261007b26 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/docs/types/test.ts @@ -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. +*/ + +import dgbtf2 = require( './index' ); + + +// TESTS // + +const AB = new Float64Array( 3 ); +const PIV = new Int32Array( 3 ); + +// Numeric status is separate from positive 1-based stepwise pivots: +dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, PIV ); // $ExpectType number +dgbtf2( 'column-major', 3, 3, 0, 0, AB, 3, PIV ); // $ExpectType number +dgbtf2( 101, 3, 3, 0, 0, AB, 3, PIV ); // $ExpectType number +dgbtf2( 102, 3, 3, 0, 0, AB, 3, PIV ); // $ExpectType number +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV, -1, 2 ); // $ExpectType number + +// Incorrect enums and array roles are rejected: +dgbtf2( 103, 3, 3, 0, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'upper', 3, 3, 0, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, PIV, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, AB ); // $ExpectError + +// Each required argument and the exact arity have declared types: +dgbtf2( false, 3, 3, 0, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', false, 3, 0, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, false, 0, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, false, 0, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, false, AB, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, false, 3, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB, false, PIV ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, false ); // $ExpectError +dgbtf2(); // $ExpectError +dgbtf2( 'row-major' ); // $ExpectError +dgbtf2( 'row-major', 3 ); // $ExpectError +dgbtf2( 'row-major', 3, 3 ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0 ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0 ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3 ); // $ExpectError +dgbtf2( 'row-major', 3, 3, 0, 0, AB, 3, PIV, 0 ); // $ExpectError + +// Each required argument and the exact arity have declared types: +dgbtf2.ndarray( false, 3, 0, 0, AB, 1, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, false, 0, 0, AB, 1, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, false, 0, AB, 1, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, false, AB, 1, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, false, 1, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, false, -1, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, false, 2, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, false, PIV, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, false, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV, false, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV, -1, false ); // $ExpectError +dgbtf2.ndarray(); // $ExpectError +dgbtf2.ndarray( 3 ); // $ExpectError +dgbtf2.ndarray( 3, 3 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV, -1 ); // $ExpectError +dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 2, PIV, -1, 2, 0 ); // $ExpectError diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/Makefile b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/example.c b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/example.c new file mode 100644 index 000000000000..799bbb30d5f1 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/c/example.c @@ -0,0 +1,65 @@ +/** +* @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. +*/ + +#include "stdlib/lapack/base/dgbtf2.h" +#include "stdlib/lapack/base/shared.h" +#include +#include + +/** +* Main execution sequence. +*/ +int main( void ) { + double AB[] = { + 999.0, 999.0, 999.0, 999.0, + 999.0, 2.0, 2.0, 1.0, + 1.0, 3.0, 5.0, 7.0, + -4.0, 2.0, 3.0, 999.0 + }; + double B[] = { 9.0, 0.0, 2.0, 0.0, 9.0 }; + LAPACK_INT PIV[ 4 ] = { -99, -99, -99, -99 }; + LAPACK_INT P[ 5 ] = { 8, -99, -99, -99, 8 }; + LAPACK_INT info; + + // Pivot entries record individual swaps, so repeated values are valid: + info = API_SUFFIX(c_dgbtf2)( LAPACK_ROW_MAJOR, 4, 4, 1, 1, AB, 4, PIV ); + if ( + info != 0 || PIV[ 0 ] != 2 || PIV[ 1 ] != 2 || + PIV[ 2 ] != 3 || PIV[ 3 ] != 4 || + AB[ 8 ] != -4.0 || AB[ 12 ] != -0.25 || + AB[ 0 ] != 999.0 || AB[ 1 ] != 999.0 || AB[ 15 ] != 999.0 + ) { + fprintf( stderr, "Unexpected band factorization.\n" ); + return EXIT_FAILURE; + } + printf( "INFO: %d; stepwise PIV: %d, %d, %d, %d\n", (int)info, (int)PIV[ 0 ], (int)PIV[ 1 ], (int)PIV[ 2 ], (int)PIV[ 3 ] ); + + // A first zero pivot does not suppress later steps; signed views preserve guards: + info = API_SUFFIX(c_dgbtf2_ndarray)( 3, 3, 0, 0, B, 1, -1, 3, P, -1, 3 ); + if ( + info != 1 || P[ 0 ] != 8 || P[ 1 ] != 3 || P[ 2 ] != 2 || + P[ 3 ] != 1 || P[ 4 ] != 8 || + B[ 0 ] != 9.0 || B[ 1 ] != 0.0 || B[ 2 ] != 2.0 || + B[ 3 ] != 0.0 || B[ 4 ] != 9.0 + ) { + fprintf( stderr, "Unexpected strided singular factorization.\n" ); + return EXIT_FAILURE; + } + printf( "Strided INFO: %d; guarded PIV: %d, %d, %d, %d, %d\n", (int)info, (int)P[ 0 ], (int)P[ 1 ], (int)P[ 2 ], (int)P[ 3 ], (int)P[ 4 ] ); + return EXIT_SUCCESS; +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/index.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/index.js new file mode 100644 index 000000000000..6d4ebd3c2210 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/examples/index.js @@ -0,0 +1,55 @@ +/** +* @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 assert = require( 'assert' ); +var Float64Array = require( '@stdlib/array/float64' ); +var Int32Array = require( '@stdlib/array/int32' ); +var dgbtf2 = require( './../lib' ); + + +// MAIN // + +// Four compact band rows; the first row is additional fill capacity: +var AB = new Float64Array( 16 ); +AB.set( [ 999, 999, 999, 999 ], 0 ); +AB.set( [ 999, 2, 2, 1 ], 4 ); +AB.set( [ 1, 3, 5, 7 ], 8 ); +AB.set( [ -4, 2, 3, 999 ], 12 ); +var PIV = new Int32Array( 4 ); +var info = dgbtf2( 'row-major', 4, 4, 1, 1, AB, 4, PIV ); +assert.strictEqual( info, 0 ); +assert.strictEqual( Array.prototype.join.call( PIV, ',' ), '2,2,3,4' ); +assert.strictEqual( AB[ 8 ], -4.0 ); +assert.strictEqual( AB[ 12 ], -0.25 ); +assert.strictEqual( AB[ 0 ], 999.0 ); +assert.strictEqual( AB[ 1 ], 999.0 ); +assert.strictEqual( AB[ 15 ], 999.0 ); +console.log( 'INFO: %d; stepwise PIV: %s', info, Array.prototype.join.call( PIV, ', ' ) ); + +// A zero first pivot records INFO=1, yet later pivot outputs are produced: +AB = new Float64Array( [ 9, 0, 2, 0, 9 ] ); +PIV = new Int32Array( [ 8, -99, -99, -99, 8 ] ); +info = dgbtf2.ndarray( 3, 3, 0, 0, AB, 1, -1, 3, PIV, -1, 3 ); +assert.strictEqual( info, 1 ); +assert.strictEqual( Array.prototype.join.call( PIV, ',' ), '8,3,2,1,8' ); +assert.strictEqual( Array.prototype.join.call( AB, ',' ), '9,0,2,0,9' ); +console.log( 'Strided INFO: %d; guarded PIV: %s', info, Array.prototype.join.call( PIV, ', ' ) ); diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/include.gypi b/lib/node_modules/@stdlib/lapack/base/dgbtf2/include.gypi new file mode 100644 index 000000000000..dcb556d250e8 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/include.gypi @@ -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. + +# A GYP include file for building a Node.js native add-on. +# +# Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +# +# Variable nesting hacks: +# +# [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi +# [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004 +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + 'variables': { + # Host BLAS library (to override -Dblas=): + 'blas%': '', + + # Path to BLAS library (to override -Dblas_dir=): + 'blas_dir%': '', + }, # end variables + + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '<@(blas_dir)', + '=H; +* row-major LDAB>=max(1,N). PIV receives min(M,N) positive one-based +* stepwise row interchanges, including every step after a singular pivot. +* PIV is output only; repetitions are valid. INFO is zero or the first +* exactly-zero computed pivot's one-based index. INFO does not certify +* accuracy or stability. The reference reciprocal is not safe-min scaled. +* +* Scalar and LDAB validation precedes an empty M or N return, which +* accesses no AB/PIV storage. A negative argument position is returned +* before any write on failure. Active AB/PIV physical byte envelopes must +* be disjoint. Capacities and stable, exclusive backing are caller duties. +*/ +LAPACK_INT API_SUFFIX(c_dgbtf2)( const LAPACK_LAYOUT order, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT LDAB, LAPACK_INT *PIV ); + +/** +* Computes a band LU factorization using alternative indexing semantics. +* +* AB is H-by-N, indexed by offsetAB+i*strideAB1+j*strideAB2. PIV has +* min(M,N) cells, indexed by offsetPIV+i*stridePIV. The complete band view +* must be injective, with nonnegative indices and exactly representable +* configured LAPACK products, sums and physical byte envelopes. Used +* DSCAL/DSWAP arithmetic must independently fit configured CBLAS_INT; +* conservative rejection may occur. Unused singleton strides are ignored. +* Empty calls validate M/N/KL/KU and H/KV, then ignore all array metadata. +* The bounded reference-parity domain has finite original band input and +* no overflowing intermediate arithmetic; ignored slots retain their bits. +*/ +LAPACK_INT API_SUFFIX(c_dgbtf2_ndarray)( const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT strideAB1, const LAPACK_INT strideAB2, const LAPACK_INT offsetAB, LAPACK_INT *PIV, const LAPACK_INT stridePIV, const LAPACK_INT offsetPIV ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_LAPACK_BASE_DGBTF2_H diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/base.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/base.js new file mode 100644 index 000000000000..50fe4af08762 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/base.js @@ -0,0 +1,229 @@ +/** +* @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'; + +/* eslint-disable stdlib/no-internal-require -- Select the unchanged pure JavaScript BLAS primitives, independent of optional native narrowing. */ + +/* + * Copyright (c) 1992-2025 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2000-2025 The University of California Berkeley. All + * rights reserved. + * Copyright (c) 2006-2025 The University of Colorado Denver. All rights + * reserved. + * + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer listed + * in this license in the documentation and/or other materials + * provided with the distribution. + * + * - Neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * The copyright holders provide no reassurances that the source code + * provided does not infringe any patent, copyright, or any other + * intellectual property rights of third parties. The copyright holders + * disclaim any liability to any recipient for claims brought against + * recipient by any third party for infringement of that parties + * intellectual property rights. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +// MODULES // + +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var dscal = require( '@stdlib/blas/base/dscal/lib/ndarray.js' ); +var dswap = require( '@stdlib/blas/base/dswap/lib/ndarray.js' ); + + +// FUNCTIONS // + +/** +* Returns the first logical absolute maximum without allocation. +* @private +* @param {PositiveInteger} n - count +* @param {Float64Array} x - data +* @param {integer} s - stride +* @param {integer} o - offset +* @returns {integer} zero-based ordinal +*/ +function firstabsmax(n, x, s, o) { + var index; + var value; + var best; + var i; + best = abs(x[o]); + index = 0; + for (i = 1; (i < n); i += 1) { + value = abs(x[(o + (i * s))]); + if ((value > best)) { + best = value; + index = i; + } + } + return index; +} +/** +* Applies fixed-alpha-minus-one reference GER in original Y-outer order. +* @private +* @param {PositiveInteger} M - update rows +* @param {PositiveInteger} N - update columns +* @param {Float64Array} AB - shared band storage +* @param {integer} r - original row stride +* @param {integer} d - original diagonal stride +* @param {integer} ox - multiplier start +* @param {integer} oy - original Y start +* @param {integer} oa - update start +* @returns {void} +*/ +function ger(M, N, AB, r, d, ox, oy, oa) { + var temp; + var ia; + var iy; + var i; + var j; + for (j = 0; (j < N); j += 1) { + iy = (oy + (j * d)); + + // Preserve the reference Y-zero skip; there is no X-zero skip. + if ((AB[iy] !== 0)) { + temp = (-1 * AB[iy]); + for (i = 0; (i < M); i += 1) { + ia = ((oa + (i * r)) + (j * d)); + AB[ia] = (AB[ia] + (AB[(ox + (i * r))] * temp)); + } + } + } +} + + +// MAIN // + +/** +* Translates unchanged Reference-LAPACK DGBTF2 elimination order. +* +* The private update follows DGER (Dongarra, Du Croz, Hammarling, Hanson). +* No reciprocal safe-minimum repair or allocation is introduced. +* +* @private +* @param {PositiveInteger} M - original rows +* @param {PositiveInteger} N - original columns +* @param {NonNegativeInteger} KL - lower bandwidth +* @param {NonNegativeInteger} KU - upper bandwidth +* @param {Float64Array} AB - full compact band view +* @param {integer} r - row stride +* @param {integer} c - column stride +* @param {integer} o - offset +* @param {Int32Array} PIV - positive one-based step swap output +* @param {integer} sp - pivot stride +* @param {integer} op - pivot offset +* @returns {NonNegativeInteger} first computed zero pivot or zero +*/ +function dgbtf2(M, N, KL, KU, AB, r, c, o, PIV, sp, op) { // eslint-disable-line max-params + var column; + var count; + var pivot; + var start; + var info; + var jp; + var ju; + var km; + var kv; + var d; + var i; + var j; + var k; + kv = (KL + KU); + k = min(M, N); + ju = 1; + info = 0; + + // Original fill capacity is not original matrix input. + for (j = (KU + 1); (j < min(kv, N)); j += 1) { + for (i = (kv - j); (i < KL); i += 1) { + AB[((o + (i * r)) + (j * c))] = 0; + } + } + for (j = 0; (j < k); j += 1) { + if (((j + kv) < N)) { + for (i = 0; (i < KL); i += 1) { + AB[((o + (i * r)) + ((j + kv) * c))] = 0; + } + } + km = min(KL, ((M - j) - 1)); + column = (o + (j * c)); + start = (column + (kv * r)); + jp = firstabsmax((km + 1), AB, r, start); + PIV[(op + (j * sp))] = ((j + jp) + 1); + pivot = AB[(start + (jp * r))]; + if ((pivot !== 0)) { + ju = max(ju, min((((j + KU) + jp) + 1), N)); + if ((jp !== 0)) { + count = (ju - j); + d = (count === 1) ? 1 : (c - r); + dswap(count, AB, d, (start + (jp * r)), AB, d, start); + } + if ((km > 0)) { + // Intentionally retain finite-input reciprocal overflow observations. + dscal(km, (1 / AB[start]), AB, r, (start + r)); + count = ((ju - j) - 1); + if ((count > 0)) { + d = (c - r); + ger(km, count, AB, r, d, (start + r), ((column + c) + ((kv - 1) * r)), (start + c)); + } + } + } else if ((info === 0)) { + info = (j + 1); + } + } + return info; +} + + +// EXPORTS // + +module.exports = dgbtf2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/can_use_native.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/can_use_native.js new file mode 100644 index 000000000000..29cbcee5afad --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/can_use_native.js @@ -0,0 +1,121 @@ +/** +* @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 floor = require( '@stdlib/math/base/special/floor' ); +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); +var abs = require( '@stdlib/math/base/special/abs' ); + + +// VARIABLES // + +var MAX = 2147483647; + + +// FUNCTIONS // + +/** +* Bounds an indexed product in the conservative signed32 native domain. +* @private +* @param {NonNegativeInteger} n - factor +* @param {integer} s - signed stride +* @returns {boolean} eligibility +*/ +function product(n, s) { + return ((n === 0) || (abs(s) <= floor((MAX / n)))); +} +/** +* Bounds actual helper loop trip and post-step intermediates. +* @private +* @param {NonNegativeInteger} n - count +* @param {integer} s - stride +* @returns {boolean} eligibility +*/ +function trip(n, s) { + if ((n <= 1)) { + return true; + } + return (((n <= (MAX - 2)) && (abs(s) > 0)) && (abs(s) <= floor(((MAX - 1) / (n + 1))))); +} + + +// MAIN // + +/** +* Chooses JavaScript before native narrowing for valid wider metadata. +* @private +* @param {integer} M - rows +* @param {integer} N - columns +* @param {integer} KL - lower bandwidth +* @param {integer} KU - upper bandwidth +* @param {Float64Array} AB - already validated view +* @param {integer} r - normalized row stride +* @param {integer} c - normalized column stride +* @param {integer} o - offset +* @param {Int32Array} PIV - already validated output +* @param {integer} sp - normalized pivot stride +* @param {integer} op - pivot offset +* @returns {boolean} eligibility +*/ +function canUseNative(M, N, KL, KU, AB, r, c, o, PIV, sp, op) { // eslint-disable-line max-params + var end; + var ac; + var ar; + var kv; + var pp; + var d; + var h; + var k; + kv = (KL + KU); + h = (((2 * KL) + KU) + 1); + k = min(M, N); + end = min((k + KL), M); + if ((((((((kv > MAX) || (h > MAX)) || ((KU + 2) > MAX)) || ((k + 1) > MAX)) || ((k + kv) > MAX)) || ((end + 1) > MAX)) || (((end + KU) + 1) > MAX))) { + return false; + } + if ((((((abs(r) > MAX) || (abs(c) > MAX)) || (o > MAX)) || (abs(sp) > MAX)) || (op > MAX))) { + return false; + } + if (((!product((h - 1), r) || !product((N - 1), c)) || !product((k - 1), sp))) { + return false; + } + ar = ((h - 1) * r); + ac = ((N - 1) * c); + pp = ((k - 1) * sp); + if (((((o + max(ar, 0)) + max(ac, 0)) > MAX) || ((op + max(pp, 0)) > MAX))) { + return false; + } + if (!trip(KL, r)) { + return false; + } + if (((KL > 0) && (N > 1))) { + d = (c - r); + if (((abs(d) > MAX) || !trip(min(N, (kv + 1)), d))) { + return false; + } + } + return true; +} + + +// EXPORTS // + +module.exports = canUseNative; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/factory.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/factory.js new file mode 100644 index 000000000000..34718439a61e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/factory.js @@ -0,0 +1,116 @@ +/** +* @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 max = require( '@stdlib/math/base/special/max' ); +var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); +var validate = require( './validate.js' ); + + +// MAIN // + +/** +* Creates both public APIs with one validation and dispatch contract. +* @private +* @param {Function} backend - normalized routine +* @param {Function} [eligible] - optional native eligibility +* @param {Function} [fallback] - validated JavaScript routine +* @returns {Function} interface +*/ +function factory(backend, eligible, fallback) { + setReadOnly(dgbtf2, 'ndarray', ndarray); + return dgbtf2; + /** +* Factors compact band storage using a contiguous layout. +* @private +* @param {string|integer} order - layout +* @param {integer} M - rows +* @param {integer} N - columns +* @param {integer} KL - lower bandwidth +* @param {integer} KU - upper bandwidth +* @param {Float64Array} AB - band storage +* @param {integer} LDAB - leading dimension +* @param {Int32Array} PIV - one-based step swaps +* @throws {TypeError} invalid selector +* @throws {RangeError} invalid scalar or leading dimension +* @returns {integer} INFO +*/ + function dgbtf2(order, M, N, KL, KU, AB, LDAB, PIV) { + var column; + var shape; + if (((((order !== 'row-major') && (order !== 'column-major')) && (order !== 101)) && (order !== 102))) { + throw new TypeError('invalid argument. Invalid layout.'); + } + shape = validate.scalars(M, N, KL, KU); + validate.integer(LDAB); + column = ((order === 'column-major') || (order === 102)); + if ((LDAB < (( column ) ? shape.h : max(1, N)))) { + throw new RangeError('invalid argument. Invalid leading dimension.'); + } + if (shape.empty) { + return 0; + } + return ndarray(M, N, KL, KU, AB, ( column ) ? 1 : LDAB, ( column ) ? LDAB : 1, 0, PIV, 1, 0); + } + /** +* Factors independent indexed views. +* @private +* @param {integer} M - rows +* @param {integer} N - columns +* @param {integer} KL - lower bandwidth +* @param {integer} KU - upper bandwidth +* @param {Float64Array} AB - band storage +* @param {integer} r - row stride +* @param {integer} c - column stride +* @param {integer} o - band offset +* @param {Int32Array} PIV - one-based step swaps +* @param {integer} sp - pivot stride +* @param {integer} op - pivot offset +* @throws {TypeError} invalid intrinsic storage +* @throws {RangeError} invalid scalar, view or backend status +* @returns {integer} INFO +*/ + function ndarray(M, N, KL, KU, AB, r, c, o, PIV, sp, op) { // eslint-disable-line max-params + var shape; + var info; + var use; + shape = validate.scalars(M, N, KL, KU); + if (shape.empty) { + return 0; + } + validate(shape, N, AB, r, c, o, PIV, sp, op); + + // Normalize only metadata which cannot select another logical cell. + r = (shape.h === 1) ? 1 : r; + c = (N === 1) ? 1 : c; + sp = (shape.k === 1) ? 1 : sp; + use = (eligible && !eligible(M, N, KL, KU, AB, r, c, o, PIV, sp, op)) ? fallback : backend; + info = use(M, N, KL, KU, AB, r, c, o, PIV, sp, op); + if ((info < 0)) { + throw new RangeError('invalid argument. The private routine rejected the normalized view.'); + } + return info; + } +} + + +// EXPORTS // + +module.exports = factory; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/index.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/index.js new file mode 100644 index 000000000000..1d838be49bfe --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/index.js @@ -0,0 +1,32 @@ +/** +* @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. +*/ +/** +* Compute an unblocked LU factorization of a general band matrix. +* @module @stdlib/lapack/base/dgbtf2 +*/ +'use strict'; + +// MODULES // + +var resolve = require( 'path' ).resolve; +var tryRequire = require( '@stdlib/utils/try-require' ); +var main = tryRequire(resolve(__dirname, './native.js')); +if ((main instanceof Error)) { + main = require( './main.js' ); +} +module.exports = main; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/main.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/main.js new file mode 100644 index 000000000000..7939015fe28b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/main.js @@ -0,0 +1,33 @@ +/** +* @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 factory = require( './factory.js' ); +var base = require( './base.js' ); + + +// VARIABLES // + +var dgbtf2 = factory(base); + + +// EXPORTS // + +module.exports = dgbtf2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/native.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/native.js new file mode 100644 index 000000000000..7a7da605a74b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/native.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 factory = require( './factory.js' ); +var base = require( './base.js' ); +var canUseNative = require( './can_use_native.js' ); +var addon = require( './../src/addon.node' ); + + +// VARIABLES // + +var dgbtf2 = factory(addon, canUseNative, base); + + +// EXPORTS // + +module.exports = dgbtf2; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/validate.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/validate.js new file mode 100644 index 000000000000..c1b62769cb0e --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/lib/validate.js @@ -0,0 +1,226 @@ +/** +* @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'; + +/* eslint n/no-unsupported-features/es-builtins: ["error", {"version": ">=8.0.0"}] */ + +/* eslint n/no-unsupported-features/es-syntax: ["error", {"version": ">=8.0.0"}] */ + + +// MODULES // + +var Symbol = require( '@stdlib/symbol/ctor' ); +var ArrayBuffer = require( '@stdlib/array/buffer' ); +var Float64Array = require( '@stdlib/array/float64' ); +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var isSafeInteger = require( '@stdlib/assert/is-safe-integer' ).isPrimitive; + + +// VARIABLES // + +var MAX = 9007199254740991; +var prototype = Object.getPrototypeOf(Float64Array.prototype); +var tag = Object.getOwnPropertyDescriptor(prototype, Symbol.toStringTag).get; +var getLength = Object.getOwnPropertyDescriptor(prototype, 'length').get; +var buffer = Object.getOwnPropertyDescriptor(prototype, 'buffer').get; +var byteOffset = Object.getOwnPropertyDescriptor(prototype, 'byteOffset').get; +var byteLength = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get; + + +// FUNCTIONS // + +/** +* Validates an exact primitive integer. +* @private +* @param {number} value - metadata +* @throws {RangeError} invalid integer +* @returns {integer} value +*/ +function integer(value) { + if (!isSafeInteger(value)) { + throw new RangeError('invalid argument. Metadata must be exact primitive integers.'); + } + return value; +} +/** +* Adds exact signed metadata before evaluating an indexed expression. +* @private +* @param {integer} x - first term +* @param {integer} y - second term +* @throws {RangeError} inexact sum +* @returns {integer} sum +*/ +function sum(x, y) { + if ((((y > 0) && (x > (MAX - y))) || ((y < 0) && (x < (-MAX - y))))) { + throw new RangeError('invalid argument. Inexact indexed sum.'); + } + return (x + y); +} +/** +* Computes a checked signed product. +* @private +* @param {NonNegativeInteger} n - count +* @param {integer} stride - signed stride +* @throws {RangeError} inexact product +* @returns {integer} product +*/ +function product(n, stride) { + var value; + if (((n !== 0) && (abs(stride) > (MAX / n)))) { + throw new RangeError('invalid argument. Inexact indexed product.'); + } + value = (n * stride); + return integer(value); +} +/** +* Computes a greatest common divisor. +* @private +* @param {PositiveInteger} x - first value +* @param {PositiveInteger} y - second value +* @returns {PositiveInteger} divisor +*/ +function gcd(x, y) { + var value; + while ((y !== 0)) { + value = (x % y); + x = y; + y = value; + } + return x; +} +/** +* Validates the full current intrinsic view and byte envelope. +* @private +* @param {TypedArray} x - intrinsic view +* @param {PositiveInteger} rows - rows +* @param {PositiveInteger} columns - columns +* @param {integer} r - row stride +* @param {integer} c - column stride +* @param {integer} o - offset +* @param {string} dtype - expected intrinsic type +* @throws {TypeError} invalid brand or shared backing +* @throws {RangeError} invalid or colliding indexed view +* @returns {Object} byte envelope +*/ +function view(x, rows, columns, r, c, o, dtype) { + var data; + var size; + var dc; + var dr; + var hi; + var lo; + var g; + if ((tag.call(x) !== dtype)) { + throw new TypeError('invalid argument. Must provide the documented intrinsic typed array.'); + } + data = buffer.call(x); + byteLength.call(data); + + // Intrinsic ordinary-buffer brand, including current RAB extent. + integer(r); + integer(c); + integer(o); + if ((((rows > 1) && (r === 0)) || ((columns > 1) && (c === 0)))) { + throw new RangeError('invalid argument. Active view strides cannot broadcast.'); + } + if (((rows > 1) && (columns > 1))) { + g = gcd(abs(r), abs(c)); + if ((((abs(c) / g) < rows) && ((abs(r) / g) < columns))) { + throw new RangeError('invalid argument. The full view must be injective.'); + } + } + dr = product((rows - 1), r); + dc = product((columns - 1), c); + lo = sum(sum(o, min(dr, 0)), min(dc, 0)); + hi = sum(sum(o, max(dr, 0)), max(dc, 0)); + if (((lo < 0) || (hi >= getLength.call(x)))) { + throw new RangeError('invalid argument. Indexed view exceeds the current intrinsic extent.'); + } + size = (dtype === 'Float64Array') ? 8 : 4; + return { + 'buffer': data, + 'first': sum(byteOffset.call(x), product(lo, size)), + 'last': sum(byteOffset.call(x), product(sum(hi, 1), size)) + }; +} +/** +* Validates the scalar quartet before touching inactive arguments. +* @private +* @param {integer} M - rows +* @param {integer} N - columns +* @param {integer} KL - lower bandwidth +* @param {integer} KU - upper bandwidth +* @throws {RangeError} invalid scalar +* @returns {Object} derived geometry +*/ +function scalars(M, N, KL, KU) { + var values; + var i; + values = [ + M, + N, + KL, + KU + ]; + for (i = 0; (i < values.length); i += 1) { + integer(values[i]); + if (((values[i] < 0) || (values[i] > 2147483647))) { + throw new RangeError('invalid argument. Dimensions must be nonnegative signed32 integers.'); + } + } + return { + 'h': (((2 * KL) + KU) + 1), + 'kv': (KL + KU), + 'k': min(M, N), + 'empty': ((M === 0) || (N === 0)) + }; +} + + +// MAIN // + +/** +* Validates two active envelopes before any backend mutation. +* @private +* @param {Object} shape - derived scalar geometry +* @param {integer} N - columns +* @param {Float64Array} AB - band storage +* @param {integer} r - row stride +* @param {integer} c - column stride +* @param {integer} o - band offset +* @param {Int32Array} PIV - output step swaps +* @param {integer} sp - pivot stride +* @param {integer} op - pivot offset +* @throws {TypeError} invalid intrinsic storage +* @throws {RangeError} invalid view or overlap +* @returns {void} +*/ +function validate(shape, N, AB, r, c, o, PIV, sp, op) { + var a; + var p; + a = view(AB, shape.h, N, r, c, o, 'Float64Array'); + p = view(PIV, shape.k, 1, sp, 0, op, 'Int32Array'); + if ((((a.buffer === p.buffer) && (a.first < p.last)) && (p.first < a.last))) { + throw new RangeError('invalid argument. Active indexed byte envelopes overlap.'); + } +} +validate.scalars = scalars; +validate.integer = integer; +module.exports = validate; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/manifest.json b/lib/node_modules/@stdlib/lapack/base/dgbtf2/manifest.json new file mode 100644 index 000000000000..f844474b427c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/manifest.json @@ -0,0 +1,98 @@ +{ + "options": { + "task": "build", + "wasm": false + }, + "fields": [ + { + "field": "src", + "resolve": true, + "relative": true + }, + { + "field": "include", + "resolve": true, + "relative": true + }, + { + "field": "libraries", + "resolve": false, + "relative": false + }, + { + "field": "libpath", + "resolve": true, + "relative": false + } + ], + "confs": [ + { + "task": "build", + "wasm": false, + "src": [ + "./src/dgbtf2.c", + "./src/dgbtf2_ndarray.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lm" + ], + "libpath": [], + "dependencies": [ + "@stdlib/lapack/base/shared", + "@stdlib/lapack/base/xerbla", + "@stdlib/blas/base/dscal", + "@stdlib/blas/base/dswap", + "@stdlib/napi/export", + "@stdlib/napi/argv", + "@stdlib/napi/argv-float64array", + "@stdlib/napi/argv-int32array", + "@stdlib/napi/create-int32" + ] + }, + { + "task": "benchmark", + "wasm": false, + "src": [ + "./src/dgbtf2.c", + "./src/dgbtf2_ndarray.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lm" + ], + "libpath": [], + "dependencies": [ + "@stdlib/lapack/base/shared", + "@stdlib/lapack/base/xerbla", + "@stdlib/blas/base/dscal", + "@stdlib/blas/base/dswap" + ] + }, + { + "task": "examples", + "wasm": false, + "src": [ + "./src/dgbtf2.c", + "./src/dgbtf2_ndarray.c" + ], + "include": [ + "./include" + ], + "libraries": [ + "-lm" + ], + "libpath": [], + "dependencies": [ + "@stdlib/lapack/base/shared", + "@stdlib/lapack/base/xerbla", + "@stdlib/blas/base/dscal", + "@stdlib/blas/base/dswap" + ] + } + ] +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/package.json b/lib/node_modules/@stdlib/lapack/base/dgbtf2/package.json new file mode 100644 index 000000000000..549919076427 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/package.json @@ -0,0 +1,76 @@ +{ + "name": "@stdlib/lapack/base/dgbtf2", + "version": "0.0.0", + "description": "Compute an unblocked LU factorization of a general band matrix.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "browser": "./lib/main.js", + "gypfile": true, + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "include": "./include", + "lib": "./lib", + "src": "./src", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=8.0.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "mathematics", + "math", + "lapack", + "dgbtf2", + "band", + "matrix", + "lu", + "factorization", + "pivot", + "linear", + "algebra", + "ndarray", + "float64", + "double", + "float64array", + "int32array" + ], + "__stdlib__": {} +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/Makefile b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/Makefile @@ -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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/addon.c b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/addon.c new file mode 100644 index 000000000000..2d67590408f1 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/addon.c @@ -0,0 +1,158 @@ +/** +* @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. +*/ + + +#include "stdlib/lapack/base/dgbtf2.h" +#include "stdlib/napi/export.h" +#include "stdlib/napi/argv.h" +#include "stdlib/napi/create_int32.h" +#include "validate.h" +#include +#include +#include +#include + +#ifndef DGBTF2_MALLOC +#define DGBTF2_MALLOC malloc +#endif + +typedef struct dgbtf2_typed_view { + void *data; + size_t length; +} dgbtf2_typed_view; + +/** +* Parses exact primitive Number metadata before configured integer narrowing. +*/ +static int integer( napi_env env, napi_value value, LAPACK_INT *out ) { + napi_valuetype type; + double number; + intmax_t parsed; + const intmax_t limit = dgbtf2_lapack_max(); + if ( napi_typeof( env, value, &type ) != napi_ok || type != napi_number || napi_get_value_double( env, value, &number ) != napi_ok ) { + napi_throw_range_error( env, NULL, "invalid argument. Metadata must be primitive exact Numbers." ); + return 0; + } + if ( !isfinite( number ) || number < -9007199254740991.0 || number > 9007199254740991.0 ) { + napi_throw_range_error( env, NULL, "invalid argument. Metadata must be safe integers." ); + return 0; + } + parsed = (intmax_t)number; + if ( number != (double)parsed || parsed < -limit-1 || parsed > limit ) { + napi_throw_range_error( env, NULL, "invalid argument. Metadata exceeds the configured LAPACK integer domain." ); + return 0; + } + *out = (LAPACK_INT)parsed; + return 1; +} + +/** +* Captures current intrinsic ordinary typed storage without JavaScript hooks. +*/ +static int typed( napi_env env, napi_value value, const napi_typedarray_type expected, dgbtf2_typed_view *out ) { + napi_typedarray_type type; + napi_value backing; + bool ordinary; + bool is_typed; + if ( napi_is_typedarray( env, value, &is_typed ) != napi_ok || !is_typed ) { + napi_throw_type_error( env, NULL, "invalid argument. Must provide intrinsic typed arrays." ); + return 0; + } + if ( napi_get_typedarray_info( env, value, &type, &out->length, &out->data, &backing, NULL ) != napi_ok || type != expected || napi_is_arraybuffer( env, backing, &ordinary ) != napi_ok || !ordinary ) { + napi_throw_type_error( env, NULL, "invalid argument. Must provide the documented ordinary typed storage." ); + return 0; + } + return 1; +} + +/** +* Returns a pre-write geometry error. +*/ +static napi_value invalid( napi_env env ) { + napi_throw_range_error( env, NULL, "invalid argument. Native indexed geometry or helper bounds are invalid." ); + return NULL; +} + +/** +* Stages output-only configured-width pivots before the actual factorization. +* +* Raw entry11 is narrower than the validated public factory. No JavaScript +* callback occurs after intrinsic storage extraction; stable backing remains +* a synchronous caller precondition. Typed-data pointers already include the +* view byteOffset. Physical indexed envelopes are independent of object identity. +*/ +static napi_value addon( napi_env env, napi_callback_info info ) { + dgbtf2_typed_view ab; + dgbtf2_typed_view piv; + dgbtf2_envelope envelope_ab; + dgbtf2_envelope envelope_piv; + LAPACK_INT metadata[11]; + LAPACK_INT kv; + LAPACK_INT h; + LAPACK_INT k; + LAPACK_INT result; + LAPACK_INT *workspace; + intmax_t diagonal; + intmax_t count; + int32_t *output_piv; + LAPACK_INT i; + + STDLIB_NAPI_ARGV( env, info, argv, argc, 11 ); + if ( !integer( env, argv[0], &metadata[0] ) || !integer( env, argv[1], &metadata[1] ) || !integer( env, argv[2], &metadata[2] ) || !integer( env, argv[3], &metadata[3] ) ) return NULL; + if ( metadata[0] < 0 || metadata[0] > INT32_MAX || metadata[1] < 0 || metadata[1] > INT32_MAX || metadata[2] < 0 || metadata[2] > INT32_MAX || metadata[3] < 0 || metadata[3] > INT32_MAX ) return invalid( env ); + result = dgbtf2_dimensions( 0, metadata[0], metadata[1], metadata[2], metadata[3], &kv, &h, &k ); + if ( result != 0 ) return invalid( env ); + // Public empty calls never reach this stricter configured-width bridge. + if ( metadata[0] == 0 || metadata[1] == 0 ) { + STDLIB_NAPI_CREATE_INT32( env, 0, output ); + return output; + } + if ( dgbtf2_positive( 0, metadata[0], metadata[1], metadata[2], metadata[3], kv, k ) != 0 ) return invalid( env ); + if ( !typed( env, argv[4], napi_float64_array, &ab ) ) return NULL; + if ( !integer( env, argv[5], &metadata[5] ) || !integer( env, argv[6], &metadata[6] ) || !integer( env, argv[7], &metadata[7] ) ) return NULL; + if ( dgbtf2_matrix_valid( ab.data, h, metadata[1], metadata[5], metadata[6], metadata[7], &envelope_ab ) != 0 || (uintmax_t)envelope_ab.last_index >= (uintmax_t)ab.length ) return invalid( env ); + if ( !typed( env, argv[8], napi_int32_array, &piv ) ) return NULL; + if ( !integer( env, argv[9], &metadata[9] ) || !integer( env, argv[10], &metadata[10] ) ) return NULL; + if ( dgbtf2_view_valid( piv.data, k, 1, metadata[9], 1, metadata[10], sizeof( int32_t ), &envelope_piv ) != 0 || (uintmax_t)envelope_piv.last_index >= (uintmax_t)piv.length ) return invalid( env ); + if ( dgbtf2_overlap( &envelope_ab, &envelope_piv ) ) return invalid( env ); + if ( !dgbtf2_blas_valid( metadata[2], metadata[5] ) ) return invalid( env ); + if ( metadata[2] > 0 && metadata[1] > 1 ) { + if ( !dgbtf2_difference( metadata[6], metadata[5], &diagonal ) ) return invalid( env ); + count = metadata[1] < kv+1 ? metadata[1] : kv+1; + if ( !dgbtf2_blas_valid( count, diagonal ) ) return invalid( env ); + } + if ( (uintmax_t)k > SIZE_MAX/sizeof( LAPACK_INT ) ) return invalid( env ); + workspace = (LAPACK_INT *)DGBTF2_MALLOC( (size_t)k*sizeof( LAPACK_INT ) ); + if ( workspace == NULL ) { + napi_throw_error( env, NULL, "allocation failure. Pivot staging precedes routine writes." ); + return NULL; + } + // Incoming public pivot bits are deliberately never inspected or copied. + result = API_SUFFIX(c_dgbtf2_ndarray)( metadata[0], metadata[1], metadata[2], metadata[3], (double *)ab.data, metadata[5], metadata[6], metadata[7], workspace, 1, 0 ); + if ( result >= 0 ) { + output_piv = (int32_t *)piv.data; + for ( i = 0; i < k; i++ ) { + output_piv[metadata[10]+(i*metadata[9])] = (int32_t)workspace[i]; + } + } + free( workspace ); + STDLIB_NAPI_CREATE_INT32( env, (int32_t)result, output ); + return output; +} + +STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2.c b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2.c new file mode 100644 index 000000000000..fd05c673184a --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2.c @@ -0,0 +1,53 @@ +/** +* @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. +*/ + +#include "stdlib/lapack/base/dgbtf2.h" +#include "validate.h" + +/** +* Computes a band LU factorization with partial row pivoting. +* +* @param order storage layout +* @param M number of dense rows +* @param N number of dense columns +* @param KL number of subdiagonals +* @param KU number of superdiagonals +* @param AB compact band input/output +* @param LDAB leading dimension of the compact view +* @param PIV positive one-based stepwise row interchanges +* @return INFO or a negative argument position +*/ +LAPACK_INT API_SUFFIX(c_dgbtf2)( const LAPACK_LAYOUT order, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT LDAB, LAPACK_INT *PIV ) { + LAPACK_INT kv; + LAPACK_INT h; + LAPACK_INT k; + LAPACK_INT stride1; + LAPACK_INT stride2; + LAPACK_INT info; + + if ( order != LAPACK_ROW_MAJOR && order != LAPACK_COL_MAJOR ) return dgbtf2_error( "c_dgbtf2", -1 ); + info = dgbtf2_dimensions( 1, M, N, KL, KU, &kv, &h, &k ); + if ( info != 0 ) return dgbtf2_error( "c_dgbtf2", info ); + if ( ( order == LAPACK_COL_MAJOR && LDAB < h ) || ( order == LAPACK_ROW_MAJOR && ( LDAB < 1 || LDAB < N ) ) ) return dgbtf2_error( "c_dgbtf2", -7 ); + if ( M == 0 || N == 0 ) return 0; + stride1 = order == LAPACK_COL_MAJOR ? 1 : LDAB; + stride2 = order == LAPACK_COL_MAJOR ? LDAB : 1; + info = dgbtf2_validate( 1, M, N, KL, KU, AB, stride1, stride2, 0, PIV, 1, 0 ); + if ( info != 0 ) return dgbtf2_error( "c_dgbtf2", info ); + return API_SUFFIX(c_dgbtf2_ndarray)( M, N, KL, KU, AB, stride1, stride2, 0, PIV, 1, 0 ); +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2_ndarray.c b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2_ndarray.c new file mode 100644 index 000000000000..05a65ff039d3 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/dgbtf2_ndarray.c @@ -0,0 +1,145 @@ +/** +* @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. +*/ + +/* +* Adapted from Reference-LAPACK SRC/dgbtf2.f at commit +* 2e5d9c1273435fbd953adb294ed603e4789afaba, blob +* 8ff949b96e03a6877961648f177405892de180b3. Authors: University of +* Tennessee, University of California Berkeley, University of Colorado +* Denver, and NAG Ltd. The private IDAMAX/DGER derivatives in panel.h +* retain the same upstream license and the original BLAS attribution. +* +* Copyright (c) 1992-2025 The University of Tennessee and The University +* of Tennessee Research Foundation. All rights +* reserved. +* Copyright (c) 2000-2025 The University of California Berkeley. All +* rights reserved. +* Copyright (c) 2006-2025 The University of Colorado Denver. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* - Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer listed +* in this license in the documentation and/or other materials +* provided with the distribution. +* +* - Neither the name of the copyright holders nor the names of its +* contributors may be used to endorse or promote products derived from +* this software without specific prior written permission. +* +* The copyright holders provide no reassurances that the source code +* provided does not infringe any patent, copyright, or any other +* intellectual property rights of third parties. The copyright holders +* disclaim any liability to any recipient for claims brought against +* recipient by any third party for infringement of that parties +* intellectual property rights. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "stdlib/lapack/base/dgbtf2.h" +#include "validate.h" +#include "panel.h" + +/** +* Computes a band LU factorization using alternative indexing semantics. +* +* @param M number of dense rows +* @param N number of dense columns +* @param KL number of subdiagonals +* @param KU number of superdiagonals +* @param AB compact band input/output +* @param strideAB1 band-row stride +* @param strideAB2 column stride +* @param offsetAB first compact band cell +* @param PIV positive one-based stepwise row interchanges +* @param stridePIV pivot stride +* @param offsetPIV first pivot cell +* @return INFO or a negative argument position +*/ +LAPACK_INT API_SUFFIX(c_dgbtf2_ndarray)( const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, double *AB, const LAPACK_INT strideAB1, const LAPACK_INT strideAB2, const LAPACK_INT offsetAB, LAPACK_INT *PIV, const LAPACK_INT stridePIV, const LAPACK_INT offsetPIV ) { + dgbtf2_view ab; + LAPACK_INT kv; + LAPACK_INT h; + LAPACK_INT k; + LAPACK_INT info; + intmax_t i; + intmax_t j; + intmax_t jp; + intmax_t ju; + intmax_t km; + intmax_t end; + + info = dgbtf2_dimensions( 0, M, N, KL, KU, &kv, &h, &k ); + if ( info != 0 ) return dgbtf2_error( "c_dgbtf2_ndarray", info ); + info = dgbtf2_validate( 0, M, N, KL, KU, AB, strideAB1, strideAB2, offsetAB, PIV, stridePIV, offsetPIV ); + if ( info != 0 ) return dgbtf2_error( "c_dgbtf2_ndarray", info ); + if ( M == 0 || N == 0 ) return 0; + ab.data = AB; + ab.stride1 = strideAB1; + ab.stride2 = strideAB2; + ab.offset = offsetAB; + + // Set only the original initial fill-in footprint to positive zero. + end = kv < N ? kv : N; + for ( j = (intmax_t)KU+1; j < end; j++ ) { + for ( i = kv-j; i < KL; i++ ) { + DGBTF2_CELL( &ab, i, j ) = 0.0; + } + } + ju = 1; + for ( j = 0; j < k; j++ ) { + if ( j+kv < N ) { + for ( i = 0; i < KL; i++ ) { + DGBTF2_CELL( &ab, i, j+kv ) = 0.0; + } + } + km = KL < M-j-1 ? KL : M-j-1; + jp = dgbtf2_first_absmax( km+1, &ab, kv, j ); + PIV[ (intmax_t)offsetPIV+j*stridePIV ] = (LAPACK_INT)(jp+j+1); + if ( DGBTF2_CELL( &ab, kv+jp, j ) != 0.0 ) { + end = j+KU+jp+1; + if ( end > N ) end = N; + if ( end > ju ) ju = end; + if ( jp != 0 ) dgbtf2_swap( ju-j, &ab, kv+jp, kv, j ); + if ( km > 0 ) { + dgbtf2_scale( km, 1.0/DGBTF2_CELL( &ab, kv, j ), &ab, kv+1, j ); + if ( ju > j+1 ) dgbtf2_ger( km, ju-j-1, &ab, kv, j ); + } + } else if ( info == 0 ) { + info = (LAPACK_INT)(j+1); + } + } + return info; +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/panel.h b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/panel.h new file mode 100644 index 000000000000..f970aee76a59 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/panel.h @@ -0,0 +1,134 @@ +/** +* @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. +*/ + +/* +* Private helpers adapted from Reference-LAPACK at commit +* 2e5d9c1273435fbd953adb294ed603e4789afaba: BLAS/SRC/idamax.f +* (blob 35042300d7e06b1130f850feef515e027149a4f6) and BLAS/SRC/dger.f +* (blob 24a6d86bb28f48d489b4fd15d3281a83672c7a91). DGER was written +* 22-October-1986 by Jack Dongarra (Argonne National Lab.), Jeremy Du Croz +* and Sven Hammarling (NAG Central Office), and Richard Hanson (Sandia +* National Labs.). Full pinned BSD terms are retained in dgbtf2_ndarray.c. +*/ + +#ifndef STDLIB_LAPACK_BASE_DGBTF2_PANEL_H +#define STDLIB_LAPACK_BASE_DGBTF2_PANEL_H + +#include "stdlib/blas/base/dscal.h" +#include "stdlib/blas/base/dswap.h" +#include +#include + +typedef struct dgbtf2_view { + double *data; + intmax_t stride1; + intmax_t stride2; + intmax_t offset; +} dgbtf2_view; + +/** +* Computes a fully prevalidated band's zero-based cell index. +*/ +static intmax_t dgbtf2_index( const dgbtf2_view *ab, const intmax_t row, const intmax_t column ) { + return ab->offset+row*ab->stride1+column*ab->stride2; +} + +#define DGBTF2_CELL( ab, row, column ) ( (ab)->data[ dgbtf2_index( (ab), (row), (column) ) ] ) + +/** +* Returns the first logical absolute maximum without allocating. +*/ +static intmax_t dgbtf2_first_absmax( const intmax_t count, const dgbtf2_view *ab, const intmax_t row, const intmax_t column ) { + intmax_t winner; + intmax_t i; + double maximum; + double value; + + if ( count <= 0 ) return -1; + maximum = fabs( DGBTF2_CELL( ab, row, column ) ); + winner = 0; + for ( i = 1; i < count; i++ ) { + value = fabs( DGBTF2_CELL( ab, row+i, column ) ); + if ( value > maximum ) { + maximum = value; + winner = i; + } + } + return winner; +} + +/** +* Swaps diagonal band fragments with the actual existing DSWAP adapter. +* +* Counts are checked before indices or pointers are formed. Singleton +* unused strides normalize to one; all other casts/trips are preflighted. +*/ +static void dgbtf2_swap( const intmax_t count, dgbtf2_view *ab, const intmax_t rowX, const intmax_t rowY, const intmax_t column ) { + intmax_t offsetX; + intmax_t offsetY; + intmax_t stride; + + if ( count <= 0 ) return; + offsetX = dgbtf2_index( ab, rowX, column ); + offsetY = dgbtf2_index( ab, rowY, column ); + stride = count == 1 ? 1 : ab->stride2-ab->stride1; + API_SUFFIX(c_dswap_ndarray)( (CBLAS_INT)count, ab->data+offsetX, (CBLAS_INT)stride, 0, ab->data+offsetY, (CBLAS_INT)stride, 0 ); +} + +/** +* Scales a band-column fragment with the actual existing DSCAL adapter. +*/ +static void dgbtf2_scale( const intmax_t count, const double alpha, dgbtf2_view *ab, const intmax_t row, const intmax_t column ) { + intmax_t offset; + intmax_t stride; + + if ( count <= 0 ) return; + offset = dgbtf2_index( ab, row, column ); + stride = count == 1 ? 1 : ab->stride1; + API_SUFFIX(c_dscal_ndarray)( (CBLAS_INT)count, alpha, ab->data+offset, (CBLAS_INT)stride, 0 ); +} + +/** +* Performs the pinned fixed-alpha=-1 conditional reference-order GER. +* +* The outer loop always follows original logical Y, including row-major +* storage. Original zero Y skips its column; zero X is not skipped. +* Volatile products retain multiplication rounding before addition. +* Original compact coordinates avoid unchecked difference-stride products. +*/ +static void dgbtf2_ger( const intmax_t rows, const intmax_t columns, dgbtf2_view *ab, const intmax_t kv, const intmax_t step ) { + intmax_t i; + intmax_t j; + double y; + double temp; + volatile double product; + + if ( rows <= 0 || columns <= 0 ) return; + for ( j = 0; j < columns; j++ ) { + y = DGBTF2_CELL( ab, kv-1-j, step+1+j ); + if ( y != 0.0 ) { + temp = -1.0*y; + for ( i = 0; i < rows; i++ ) { + product = DGBTF2_CELL( ab, kv+1+i, step )*temp; + DGBTF2_CELL( ab, kv+i-j, step+1+j ) += product; + } + } + } +} + +#endif // !STDLIB_LAPACK_BASE_DGBTF2_PANEL_H diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/validate.h b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/validate.h new file mode 100644 index 000000000000..712676a2ecad --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/src/validate.h @@ -0,0 +1,306 @@ +/** +* @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. +*/ + +#ifndef STDLIB_LAPACK_BASE_DGBTF2_VALIDATION_H +#define STDLIB_LAPACK_BASE_DGBTF2_VALIDATION_H + +#include "stdlib/lapack/base/shared.h" +#include "stdlib/lapack/base/xerbla.h" +#include +#include +#include + +typedef char dgbtf2_lapack_integer_check[ ( sizeof( LAPACK_INT ) <= sizeof( intmax_t ) && (LAPACK_INT)-1 < 0 ) ? 1 : -1 ]; +typedef char dgbtf2_blas_integer_check[ ( sizeof( CBLAS_INT ) <= sizeof( intmax_t ) && (CBLAS_INT)-1 < 0 ) ? 1 : -1 ]; + +typedef struct dgbtf2_envelope { + uintptr_t first; + uintptr_t last; + intmax_t first_index; + intmax_t last_index; +} dgbtf2_envelope; + +/** +* Returns the largest configured LAPACK integer. +*/ +static intmax_t dgbtf2_lapack_max( void ) { + return (intmax_t)( UINTMAX_MAX >> ( (sizeof( uintmax_t )-sizeof( LAPACK_INT ))*CHAR_BIT + 1 ) ); +} + +/** +* Returns the largest independently configured BLAS integer. +*/ +static uintmax_t dgbtf2_blas_max( void ) { + return UINTMAX_MAX >> ( (sizeof( uintmax_t )-sizeof( CBLAS_INT ))*CHAR_BIT + 1 ); +} + +/** +* Computes a magnitude without negating a minimum signed integer. +*/ +static uintmax_t dgbtf2_magnitude( const intmax_t value ) { + return value < 0 ? (uintmax_t)( -(value+1) )+1 : (uintmax_t)value; +} + +/** +* Computes an exact configured LAPACK product, rejecting overflow. +*/ +static int dgbtf2_product( const uintmax_t count, const intmax_t stride, intmax_t *result ) { + const intmax_t limit = dgbtf2_lapack_max(); + uintmax_t magnitude; + uintmax_t bound; + + if ( count == 0 || stride == 0 ) { + *result = 0; + return 1; + } + magnitude = dgbtf2_magnitude( stride ); + bound = (uintmax_t)limit + ( stride < 0 ? 1 : 0 ); + if ( count > bound/magnitude ) return 0; + magnitude *= count; + if ( stride < 0 ) { + *result = magnitude == (uintmax_t)limit+1 ? -limit-1 : -(intmax_t)magnitude; + } else { + *result = (intmax_t)magnitude; + } + return 1; +} + +/** +* Computes an exact configured LAPACK sum, rejecting overflow. +*/ +static int dgbtf2_sum( const intmax_t x, const intmax_t y, intmax_t *result ) { + const intmax_t limit = dgbtf2_lapack_max(); + const intmax_t minimum = -limit-1; + + if ( ( y > 0 && x > limit-y ) || ( y < 0 && x < minimum-y ) ) return 0; + *result = x+y; + return 1; +} + +/** +* Computes an exact configured LAPACK difference without negating y. +*/ +static int dgbtf2_difference( const intmax_t x, const intmax_t y, intmax_t *result ) { + const intmax_t limit = dgbtf2_lapack_max(); + const intmax_t minimum = -limit-1; + + if ( ( y > 0 && x < minimum+y ) || ( y < 0 && x > limit+y ) ) return 0; + *result = x-y; + return 1; +} + +/** +* Validates the scalar quartet and the KV/H expressions evaluated on empty. +*/ +static LAPACK_INT dgbtf2_dimensions( const int main, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, LAPACK_INT *KV, LAPACK_INT *H, LAPACK_INT *K ) { + intmax_t kv; + intmax_t h; + + if ( M < 0 ) return main ? -2 : -1; + if ( N < 0 ) return main ? -3 : -2; + if ( KL < 0 ) return main ? -4 : -3; + if ( KU < 0 ) return main ? -5 : -4; + if ( !dgbtf2_sum( KL, KU, &kv ) ) return main ? -5 : -4; + if ( !dgbtf2_sum( KL, kv, &h ) || !dgbtf2_sum( h, 1, &h ) ) return main ? -4 : -3; + *KV = (LAPACK_INT)kv; + *H = (LAPACK_INT)h; + *K = M < N ? M : N; + return 0; +} + +/** +* Guards positive-only original scalar transients before their evaluation. +*/ +static LAPACK_INT dgbtf2_positive( const int main, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, const LAPACK_INT KV, const LAPACK_INT K ) { + const intmax_t limit = dgbtf2_lapack_max(); + intmax_t terminal; + + if ( M == 0 || N == 0 ) return 0; + if ( KU > limit-2 ) return main ? -5 : -4; + if ( K > limit-1 ) return main ? -3 : -2; + if ( K > limit-KV ) return main ? -5 : -4; + terminal = KL > M-K ? M : K+KL; + if ( terminal > limit-1 ) return main ? -2 : -1; + if ( terminal > limit-KU-1 ) return main ? -5 : -4; + return 0; +} + +/** +* Returns the greatest common divisor of two nonzero magnitudes. +*/ +static uintmax_t dgbtf2_gcd( uintmax_t x, uintmax_t y ) { + uintmax_t remainder; + + while ( y != 0 ) { + remainder = x%y; + x = y; + y = remainder; + } + return x; +} + +/** +* Checks an aligned inclusive byte envelope without forming derived pointers. +* +* Requiring element-size alignment is conservative on weaker-alignment ABIs. +* Actual allocation capacity, lifetime and hidden physical aliases remain +* caller preconditions. Indices are retained for typed-array extent checks. +*/ +static int dgbtf2_envelope_valid( const void *data, const intmax_t first, const intmax_t last, const size_t size, dgbtf2_envelope *envelope ) { + const uintptr_t address = (uintptr_t)data; + uintmax_t first_byte; + uintmax_t last_byte; + + if ( data == NULL || size == 0 || address%size != 0 ) return 0; + if ( first < 0 || last < first || size-1 > (uintmax_t)PTRDIFF_MAX || (uintmax_t)last > ( (uintmax_t)PTRDIFF_MAX-(size-1) )/size ) return 0; + first_byte = (uintmax_t)first*size; + last_byte = (uintmax_t)last*size+(size-1); + if ( last_byte > UINTPTR_MAX || address > UINTPTR_MAX-(uintptr_t)last_byte ) return 0; + envelope->first = address+(uintptr_t)first_byte; + envelope->last = address+(uintptr_t)last_byte; + envelope->first_index = first; + envelope->last_index = last; + return 1; +} + +/** +* Tests conservative physical byte-envelope overlap. +*/ +static int dgbtf2_overlap( const dgbtf2_envelope *x, const dgbtf2_envelope *y ) { + return x->first <= y->last && y->first <= x->last; +} + +/** +* Checks configured stride products and full-view injectivity (errors 1/2). +*/ +static int dgbtf2_matrix_strides_valid( const intmax_t rows, const intmax_t columns, const intmax_t stride1, const intmax_t stride2 ) { + uintmax_t magnitude1; + uintmax_t magnitude2; + uintmax_t divisor; + intmax_t delta; + + if ( ( rows > 1 && stride1 == 0 ) || !dgbtf2_product( (uintmax_t)(rows-1), stride1, &delta ) ) return 1; + if ( ( columns > 1 && stride2 == 0 ) || !dgbtf2_product( (uintmax_t)(columns-1), stride2, &delta ) ) return 2; + if ( rows > 1 && columns > 1 ) { + magnitude1 = dgbtf2_magnitude( stride1 ); + magnitude2 = dgbtf2_magnitude( stride2 ); + divisor = dgbtf2_gcd( magnitude1, magnitude2 ); + if ( magnitude2/divisor < (uintmax_t)rows && magnitude1/divisor < (uintmax_t)columns ) return 2; + } + return 0; +} + +/** +* Validates a generic active view, returning offending component 1,2 or 3. +*/ +static int dgbtf2_view_valid( const void *data, const intmax_t rows, const intmax_t columns, const intmax_t stride1, const intmax_t stride2, const intmax_t offset, const size_t size, dgbtf2_envelope *envelope ) { + intmax_t delta1; + intmax_t delta2; + intmax_t corner1; + intmax_t corner2; + intmax_t corner3; + intmax_t first; + intmax_t last; + int error; + + error = dgbtf2_matrix_strides_valid( rows, columns, stride1, stride2 ); + if ( error != 0 ) return error; + if ( !dgbtf2_product( (uintmax_t)(rows-1), stride1, &delta1 ) ) return 1; + if ( !dgbtf2_product( (uintmax_t)(columns-1), stride2, &delta2 ) ) return 2; + if ( !dgbtf2_sum( offset, delta1, &corner1 ) || !dgbtf2_sum( offset, delta2, &corner2 ) || !dgbtf2_sum( corner1, delta2, &corner3 ) ) return 3; + first = offset; + last = offset; + if ( corner1 < first ) first = corner1; + if ( corner2 < first ) first = corner2; + if ( corner3 < first ) first = corner3; + if ( corner1 > last ) last = corner1; + if ( corner2 > last ) last = corner2; + if ( corner3 > last ) last = corner3; + return dgbtf2_envelope_valid( data, first, last, size, envelope ) ? 0 : 3; +} + +/** +* Checks the complete double-precision compact band view. +*/ +static int dgbtf2_matrix_valid( const void *data, const intmax_t rows, const intmax_t columns, const intmax_t stride1, const intmax_t stride2, const intmax_t offset, dgbtf2_envelope *envelope ) { + return dgbtf2_view_valid( data, rows, columns, stride1, stride2, offset, sizeof( double ), envelope ); +} + +/** +* Guards selected BLAS casts, endpoints, poststeps and compiler trip bounds. +* +* Logical-start pointers have offset zero. Singleton calls normalize the +* unused stride to one. For n>1 the conservative bounds are n<=MAX-2 and +* n*abs(s)+abs(s)+1<=MAX; neither multiplication nor signed negation occurs. +*/ +static int dgbtf2_blas_valid( const intmax_t count, const intmax_t stride ) { + const uintmax_t limit = dgbtf2_blas_max(); + const uintmax_t length = (uintmax_t)count; + const uintmax_t magnitude = dgbtf2_magnitude( stride ); + + if ( count <= 1 ) return 1; + if ( length > limit-2 || magnitude == 0 || magnitude > limit ) return 0; + return length+1 <= (limit-1)/magnitude; +} + +/** +* Validates every active view and potential selected helper before writes. +*/ +static LAPACK_INT dgbtf2_validate( const int main, const LAPACK_INT M, const LAPACK_INT N, const LAPACK_INT KL, const LAPACK_INT KU, const double *AB, const LAPACK_INT strideAB1, const LAPACK_INT strideAB2, const LAPACK_INT offsetAB, const LAPACK_INT *PIV, const LAPACK_INT stridePIV, const LAPACK_INT offsetPIV ) { + dgbtf2_envelope ab; + dgbtf2_envelope piv; + LAPACK_INT kv; + LAPACK_INT h; + LAPACK_INT k; + LAPACK_INT info; + intmax_t diagonal; + intmax_t count; + int error; + + info = dgbtf2_dimensions( main, M, N, KL, KU, &kv, &h, &k ); + if ( info != 0 || M == 0 || N == 0 ) return info; + info = dgbtf2_positive( main, M, N, KL, KU, kv, k ); + if ( info != 0 ) return info; + if ( AB == NULL || (uintptr_t)AB%sizeof( double ) != 0 ) return main ? -6 : -5; + error = dgbtf2_matrix_strides_valid( h, N, strideAB1, strideAB2 ); + if ( error != 0 ) return main ? -6 : (LAPACK_INT)(-5-error); + diagonal = 1; + if ( KL > 0 && N > 1 && !dgbtf2_difference( strideAB2, strideAB1, &diagonal ) ) return main ? -6 : -7; + error = dgbtf2_matrix_valid( AB, h, N, strideAB1, strideAB2, offsetAB, &ab ); + if ( error != 0 ) return main ? -6 : (LAPACK_INT)(-5-error); + if ( PIV == NULL || (uintptr_t)PIV%sizeof( LAPACK_INT ) != 0 ) return main ? -8 : -9; + error = dgbtf2_view_valid( PIV, k, 1, stridePIV, 1, offsetPIV, sizeof( LAPACK_INT ), &piv ); + if ( error != 0 ) return main ? -8 : ( error == 1 ? -10 : -11 ); + if ( dgbtf2_overlap( &ab, &piv ) ) return main ? -8 : -9; + if ( !dgbtf2_blas_valid( KL, strideAB1 ) ) return -6; + if ( KL > 0 && N > 1 ) { + count = N < kv+1 ? N : kv+1; + if ( !dgbtf2_blas_valid( count, diagonal ) ) return main ? -6 : -7; + } + return 0; +} + +/** +* Prints the adopted LAPACK diagnostic and returns the negative status. +*/ +static LAPACK_INT dgbtf2_error( const char *name, const LAPACK_INT info ) { + API_SUFFIX(lapack_xerbla)( name, info ); + return info; +} + +#endif // !STDLIB_LAPACK_BASE_DGBTF2_VALIDATION_H diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/fixtures/reference.json b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/fixtures/reference.json new file mode 100644 index 000000000000..e4d0df70649d --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/fixtures/reference.json @@ -0,0 +1,4308 @@ +{ + "reference_commit": "2e5d9c1273435fbd953adb294ed603e4789afaba", + "source_sha256": "830b6226e490d20611127d8e38fd266ca4d314dfe0a6f8d121d2a4ca86142734", + "provenance": "Executed unchanged LP64 O0 Reference-LAPACK DGBTF2; one instance of each distinct writer case. Empty results are no-access controls; tiny reciprocal cases claim NaN class, not universal payload parity.", + "cases": [ + { + "case": "empty-0x0", + "dimensions": { + "m": 0, + "n": 0, + "kl": 2, + "ku": 1, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007" + ], + "pivots_1based": [], + "INFO": 0 + }, + { + "case": "empty-0x4", + "dimensions": { + "m": 0, + "n": 4, + "kl": 2, + "ku": 1, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027" + ], + "pivots_1based": [], + "INFO": 0 + }, + { + "case": "empty-5x0", + "dimensions": { + "m": 5, + "n": 0, + "kl": 2, + "ku": 1, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007" + ], + "pivots_1based": [], + "INFO": 0 + }, + { + "case": "one-positive", + "dimensions": { + "m": 1, + "n": 1, + "kl": 0, + "ku": 0, + "ldab": 1 + }, + "kind": "finite", + "dense_input_bits": [ + "4010000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4010000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4010000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008" + ], + "pivots_1based": [ + 1 + ], + "INFO": 0 + }, + { + "case": "one-zero", + "dimensions": { + "m": 1, + "n": 1, + "kl": 0, + "ku": 0, + "ldab": 3 + }, + "kind": "finite", + "dense_input_bits": [ + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "0000000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "0000000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "pivots_1based": [ + 1 + ], + "INFO": 1 + }, + { + "case": "one-negative", + "dimensions": { + "m": 1, + "n": 1, + "kl": 0, + "ku": 0, + "ldab": 3 + }, + "kind": "finite", + "dense_input_bits": [ + "c010000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "c010000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "c010000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "pivots_1based": [ + 1 + ], + "INFO": 0 + }, + { + "case": "one-signed-zero", + "dimensions": { + "m": 1, + "n": 1, + "kl": 0, + "ku": 0, + "ldab": 3 + }, + "kind": "finite", + "dense_input_bits": [ + "8000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "8000000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "8000000000000000", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a" + ], + "pivots_1based": [ + 1 + ], + "INFO": 1 + }, + { + "case": "diagonal-singular", + "dimensions": { + "m": 5, + "n": 5, + "kl": 0, + "ku": 0, + "ldab": 3 + }, + "kind": "finite", + "dense_input_bits": [ + "4008000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4014000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4008000000000000", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "c000000000000000", + "405400000000000b", + "405400000000000c", + "0000000000000000", + "405400000000000e", + "405400000000000f", + "4014000000000000", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4008000000000000", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "c000000000000000", + "405400000000000b", + "405400000000000c", + "0000000000000000", + "405400000000000e", + "405400000000000f", + "4014000000000000", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016" + ], + "pivots_1based": [ + 1, + 2, + 3, + 4, + 5 + ], + "INFO": 2 + }, + { + "case": "zero-square", + "dimensions": { + "m": 5, + "n": 5, + "kl": 2, + "ku": 1, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [ + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "0000000000000000", + "0000000000000000", + "4054000000000028", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001a", + "405400000000001b", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000028", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f" + ], + "pivots_1based": [ + 1, + 2, + 3, + 4, + 5 + ], + "INFO": 1 + }, + { + "case": "zero-tall", + "dimensions": { + "m": 7, + "n": 3, + "kl": 3, + "ku": 0, + "ldab": 9 + }, + "kind": "finite", + "dense_input_bits": [ + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022" + ], + "pivots_1based": [ + 1, + 2, + 3 + ], + "INFO": 1 + }, + { + "case": "zero-wide", + "dimensions": { + "m": 3, + "n": 7, + "kl": 1, + "ku": 4, + "ldab": 9 + }, + "kind": "finite", + "dense_input_bits": [ + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "0000000000000000", + "0000000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027", + "4054000000000028", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "0000000000000000", + "0000000000000000", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "0000000000000000", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "0000000000000000", + "0000000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027", + "4054000000000028", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "0000000000000000", + "0000000000000000", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046" + ], + "pivots_1based": [ + 1, + 2, + 3 + ], + "INFO": 1 + }, + { + "case": "ties-first-absolute", + "dimensions": { + "m": 3, + "n": 3, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite", + "dense_input_bits": [ + "4000000000000000", + "4008000000000000", + "0000000000000000", + "c000000000000000", + "3ff0000000000000", + "4010000000000000", + "0000000000000000", + "3ff0000000000000", + "4014000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4000000000000000", + "c000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4008000000000000", + "3ff0000000000000", + "3ff0000000000000", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4010000000000000", + "4014000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4000000000000000", + "bff0000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4008000000000000", + "4010000000000000", + "3fd0000000000000", + "405400000000000e", + "405400000000000f", + "0000000000000000", + "4010000000000000", + "4010000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019" + ], + "pivots_1based": [ + 1, + 2, + 3 + ], + "INFO": 0 + }, + { + "case": "negative-pivot-largest", + "dimensions": { + "m": 4, + "n": 4, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite", + "dense_input_bits": [ + "3ff0000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "c010000000000000", + "4008000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "4000000000000000", + "4014000000000000", + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "4008000000000000", + "401c000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "3ff0000000000000", + "c010000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4000000000000000", + "4008000000000000", + "4000000000000000", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4000000000000000", + "4014000000000000", + "4008000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "3ff0000000000000", + "401c000000000000", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "c010000000000000", + "bfd0000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4008000000000000", + "4006000000000000", + "3fe745d1745d1746", + "405400000000000e", + "405400000000000f", + "4000000000000000", + "3fe0000000000000", + "40128ba2e8ba2e8c", + "3fe4b4b4b4b4b4b4", + "4054000000000014", + "4054000000000015", + "0000000000000000", + "3ff0000000000000", + "401969696969696a", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "pivots_1based": [ + 2, + 2, + 3, + 4 + ], + "INFO": 0 + }, + { + "case": "zero-first-then-continue", + "dimensions": { + "m": 4, + "n": 4, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite", + "dense_input_bits": [ + "0000000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4008000000000000", + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "3ff0000000000000", + "4000000000000000", + "4010000000000000", + "0000000000000000", + "0000000000000000", + "3ff0000000000000", + "4014000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000000", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4000000000000000", + "4008000000000000", + "3ff0000000000000", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "3ff0000000000000", + "4000000000000000", + "3ff0000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4010000000000000", + "4014000000000000", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000000", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "4000000000000000", + "4008000000000000", + "3fd5555555555555", + "405400000000000e", + "405400000000000f", + "0000000000000000", + "3ff0000000000000", + "3ffaaaaaaaaaaaab", + "3fe3333333333333", + "4054000000000014", + "4054000000000015", + "0000000000000000", + "4010000000000000", + "4004cccccccccccd", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "pivots_1based": [ + 1, + 2, + 3, + 4 + ], + "INFO": 1 + }, + { + "case": "lower-bidiagonal-swaps", + "dimensions": { + "m": 4, + "n": 4, + "kl": 1, + "ku": 0, + "ldab": 5 + }, + "kind": "finite", + "dense_input_bits": [ + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4010000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4014000000000000", + "4008000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4018000000000000", + "4010000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "3ff0000000000000", + "4010000000000000", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "4000000000000000", + "4014000000000000", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "4008000000000000", + "4018000000000000", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4010000000000000", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4010000000000000", + "3fd0000000000000", + "4054000000000007", + "4054000000000008", + "4000000000000000", + "4014000000000000", + "bfb999999999999a", + "405400000000000c", + "405400000000000d", + "4008000000000000", + "4018000000000000", + "3fa999999999999a", + "4054000000000011", + "4054000000000012", + "4010000000000000", + "bfc999999999999a", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b" + ], + "pivots_1based": [ + 2, + 3, + 4, + 4 + ], + "INFO": 0 + }, + { + "case": "upper-only", + "dimensions": { + "m": 4, + "n": 4, + "kl": 0, + "ku": 2, + "ldab": 5 + }, + "kind": "finite", + "dense_input_bits": [ + "4000000000000000", + "3ff0000000000000", + "4008000000000000", + "0000000000000000", + "0000000000000000", + "4010000000000000", + "4000000000000000", + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4014000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4018000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4000000000000000", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "3ff0000000000000", + "4010000000000000", + "405400000000000c", + "405400000000000d", + "4008000000000000", + "4000000000000000", + "0000000000000000", + "4054000000000011", + "4054000000000012", + "3ff0000000000000", + "4014000000000000", + "4018000000000000", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4000000000000000", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "3ff0000000000000", + "4010000000000000", + "405400000000000c", + "405400000000000d", + "4008000000000000", + "4000000000000000", + "0000000000000000", + "4054000000000011", + "4054000000000012", + "3ff0000000000000", + "4014000000000000", + "4018000000000000", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b" + ], + "pivots_1based": [ + 1, + 2, + 3, + 4 + ], + "INFO": 3 + }, + { + "case": "wide-upper-only", + "dimensions": { + "m": 2, + "n": 5, + "kl": 0, + "ku": 3, + "ldab": 6 + }, + "kind": "finite", + "dense_input_bits": [ + "3ff0000000000000", + "4000000000000000", + "4008000000000000", + "4010000000000000", + "0000000000000000", + "0000000000000000", + "4000000000000000", + "3ff0000000000000", + "4014000000000000", + "4018000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "3ff0000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "4000000000000000", + "4000000000000000", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4008000000000000", + "3ff0000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4010000000000000", + "4014000000000000", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "4018000000000000", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "3ff0000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "4000000000000000", + "4000000000000000", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4008000000000000", + "3ff0000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4010000000000000", + "4014000000000000", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "4018000000000000", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "bandwidths-exceed-dimensions", + "dimensions": { + "m": 2, + "n": 3, + "kl": 7, + "ku": 6, + "ldab": 23 + }, + "kind": "finite", + "dense_input_bits": [ + "3ff0000000000000", + "4000000000000000", + "4008000000000000", + "4010000000000000", + "4014000000000000", + "401c000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "3ff0000000000000", + "4010000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4000000000000000", + "4014000000000000", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "4008000000000000", + "401c000000000000", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046", + "4054000000000047", + "4054000000000048", + "4054000000000049", + "405400000000004a", + "405400000000004b", + "405400000000004c" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4010000000000000", + "3fd0000000000000", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4014000000000000", + "3fe8000000000000", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "401c000000000000", + "3ff4000000000000", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046", + "4054000000000047", + "4054000000000048", + "4054000000000049", + "405400000000004a", + "405400000000004b", + "405400000000004c" + ], + "pivots_1based": [ + 2, + 2 + ], + "INFO": 0 + }, + { + "case": "multiple-fill-row-swaps", + "dimensions": { + "m": 6, + "n": 6, + "kl": 2, + "ku": 1, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [ + "3ff0000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4000000000000000", + "4008000000000000", + "4010000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4020000000000000", + "4014000000000000", + "4018000000000000", + "401c000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4022000000000000", + "4020000000000000", + "4022000000000000", + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4024000000000000", + "4000000000000000", + "4008000000000000", + "4010000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4026000000000000", + "4014000000000000", + "4018000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "3ff0000000000000", + "4000000000000000", + "4020000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "4000000000000000", + "4008000000000000", + "4014000000000000", + "4022000000000000", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "4010000000000000", + "4018000000000000", + "4020000000000000", + "4024000000000000", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "401c000000000000", + "4022000000000000", + "4000000000000000", + "4026000000000000", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "3ff0000000000000", + "4008000000000000", + "4014000000000000", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "4010000000000000", + "4018000000000000", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4020000000000000", + "3fd0000000000000", + "3fc0000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "4014000000000000", + "4022000000000000", + "3fc38e38e38e38e3", + "3fc8e38e38e38e38", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4018000000000000", + "4020000000000000", + "4024000000000000", + "3fb82d82d82d82da", + "bfc93e93e93e93e9", + "405400000000001a", + "405400000000001b", + "401c000000000000", + "4022000000000000", + "4000000000000000", + "4026000000000000", + "bfc5978804232aed", + "bfd5766eacbc4022", + "4054000000000022", + "4054000000000023", + "3ff0000000000000", + "4008000000000000", + "4014000000000000", + "3ff484655d9bab2f", + "3fedeba20776118c", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "4010000000000000", + "4018000000000000", + "3ffcd0eff7b9aa26", + "bfa9688ec56b6140", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037" + ], + "pivots_1based": [ + 3, + 4, + 5, + 6, + 5, + 6 + ], + "INFO": 0 + }, + { + "case": "minimum-normal-reciprocal", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 0, + "ldab": 5 + }, + "kind": "finite", + "dense_input_bits": [ + "0010000000000000", + "0000000000000000", + "0000000000000000", + "3ff0000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "0010000000000000", + "0000000000000000", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "0010000000000000", + "0000000000000000", + "4054000000000007", + "4054000000000008", + "0000000000000000", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "half-minimum-normal-reciprocal", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite", + "dense_input_bits": [ + "0008000000000000", + "3ff0000000000000", + "0000000000000000", + "4000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0008000000000000", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "4000000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0008000000000000", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "4000000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "largest-finite-pivot", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 0, + "ldab": 5 + }, + "kind": "finite", + "dense_input_bits": [ + "7fefffffffffffff", + "0000000000000000", + "7fdfffffffffffff", + "3ff0000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "7fefffffffffffff", + "7fdfffffffffffff", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "7fefffffffffffff", + "3fdfffffffffffff", + "4054000000000007", + "4054000000000008", + "0000000000000000", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "seeded-0", + "dimensions": { + "m": 3, + "n": 3, + "kl": 1, + "ku": 1, + "ldab": 4 + }, + "kind": "finite", + "dense_input_bits": [ + "bfe0000000000000", + "bff4000000000000", + "0000000000000000", + "3fe0000000000000", + "bfe0000000000000", + "3fe0000000000000", + "0000000000000000", + "c000000000000000", + "bff8000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "bfe0000000000000", + "3fe0000000000000", + "4054000000000008", + "bff4000000000000", + "bfe0000000000000", + "c000000000000000", + "405400000000000c", + "3fe0000000000000", + "bff8000000000000", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "bfe0000000000000", + "bff0000000000000", + "4054000000000008", + "bff4000000000000", + "c000000000000000", + "3fec000000000000", + "0000000000000000", + "bff8000000000000", + "3ffd000000000000", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "pivots_1based": [ + 1, + 3, + 3 + ], + "INFO": 0 + }, + { + "case": "seeded-1", + "dimensions": { + "m": 5, + "n": 8, + "kl": 2, + "ku": 1, + "ldab": 7 + }, + "kind": "finite", + "dense_input_bits": [ + "bfd0000000000000", + "400e000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c000000000000000", + "bfe0000000000000", + "4008000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bfe8000000000000", + "4002000000000000", + "c00a000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c002000000000000", + "bffc000000000000", + "400a000000000000", + "3fd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c004000000000000", + "3fd0000000000000", + "c004000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "bfd0000000000000", + "c000000000000000", + "bfe8000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "400e000000000000", + "bfe0000000000000", + "4002000000000000", + "c002000000000000", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4008000000000000", + "c00a000000000000", + "bffc000000000000", + "c004000000000000", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "4000000000000000", + "400a000000000000", + "3fd0000000000000", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "3fd0000000000000", + "c004000000000000", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027", + "4054000000000028", + "0000000000000000", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "c000000000000000", + "3fc0000000000000", + "3fd8000000000000", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "bfe0000000000000", + "400e800000000000", + "3fe47582192e29f8", + "bfe2e29f79b47582", + "4054000000000011", + "4054000000000012", + "4008000000000000", + "bfd8000000000000", + "c0108a7de6d1d608", + "3fde826909e51b26", + "3fe3588c0d317988", + "4054000000000018", + "0000000000000000", + "0000000000000000", + "4000000000000000", + "40025f65bd86b936", + "bfdaba6d89677cfb", + "405400000000001e", + "405400000000001f", + "0000000000000000", + "0000000000000000", + "3fd0000000000000", + "c0032a2c93b4c418", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "0000000000000000", + "0000000000000000", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "0000000000000000", + "0000000000000000", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f" + ], + "pivots_1based": [ + 2, + 2, + 3, + 4, + 5 + ], + "INFO": 0 + }, + { + "case": "seeded-2", + "dimensions": { + "m": 8, + "n": 5, + "kl": 3, + "ku": 2, + "ldab": 11 + }, + "kind": "finite", + "dense_input_bits": [ + "bfd0000000000000", + "400e000000000000", + "3fd0000000000000", + "0000000000000000", + "0000000000000000", + "bffc000000000000", + "3fe8000000000000", + "4008000000000000", + "bff0000000000000", + "0000000000000000", + "c006000000000000", + "bfe8000000000000", + "bfe0000000000000", + "c00c000000000000", + "bffc000000000000", + "c000000000000000", + "4004000000000000", + "bff0000000000000", + "4000000000000000", + "3fe8000000000000", + "0000000000000000", + "3ff0000000000000", + "400e000000000000", + "c00e000000000000", + "3fe8000000000000", + "0000000000000000", + "0000000000000000", + "c010000000000000", + "c00e000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3fd0000000000000", + "400a000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "bfd0000000000000", + "bffc000000000000", + "c006000000000000", + "c000000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "400e000000000000", + "3fe8000000000000", + "bfe8000000000000", + "4004000000000000", + "3ff0000000000000", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "3fd0000000000000", + "4008000000000000", + "bfe0000000000000", + "bff0000000000000", + "400e000000000000", + "c010000000000000", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027", + "bff0000000000000", + "c00c000000000000", + "4000000000000000", + "c00e000000000000", + "c00e000000000000", + "3fd0000000000000", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "bffc000000000000", + "3fe8000000000000", + "3fe8000000000000", + "0000000000000000", + "400a000000000000", + "3ffc000000000000", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "c006000000000000", + "3fe45d1745d1745d", + "3fb745d1745d1746", + "3fe745d1745d1746", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "bfe8000000000000", + "400e8ba2e8ba2e8c", + "3fd4924924924925", + "3fe9861861861862", + "3fd0c30c30c30c31", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "405400000000001b", + "405400000000001c", + "bfe0000000000000", + "3fd2e8ba2e8ba2e9", + "c010000000000000", + "3fcbe79e79e79e7a", + "bfed618618618618", + "bfe9c92492492493", + "4054000000000023", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "c00c000000000000", + "3fd45d1745d1745d", + "c00e000000000000", + "c01d1b0c30c30c30", + "bfe678132966357a", + "3fd0aedd1e6e5643", + "bfa197513dafc451", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "bffc000000000000", + "3fc45d1745d1745d", + "0000000000000000", + "3fe6aaaaaaaaaaab", + "400a31d7662ec757", + "3fd12895fce14d2f", + "3fe7637d1144fba0", + "3fe11a4a9bb0a419", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e" + ], + "pivots_1based": [ + 3, + 3, + 6, + 5, + 7 + ], + "INFO": 0 + }, + { + "case": "seeded-3", + "dimensions": { + "m": 7, + "n": 7, + "kl": 2, + "ku": 3, + "ldab": 8 + }, + "kind": "finite", + "dense_input_bits": [ + "c004000000000000", + "400a000000000000", + "bff0000000000000", + "3fd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400c000000000000", + "c000000000000000", + "400c000000000000", + "4004000000000000", + "400a000000000000", + "0000000000000000", + "0000000000000000", + "bfd0000000000000", + "c00e000000000000", + "c006000000000000", + "3fe8000000000000", + "3fe8000000000000", + "3ff8000000000000", + "0000000000000000", + "0000000000000000", + "bff4000000000000", + "3fe0000000000000", + "c00e000000000000", + "c008000000000000", + "4004000000000000", + "c000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000", + "c00e000000000000", + "400a000000000000", + "c00e000000000000", + "c000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "3fe8000000000000", + "bffc000000000000", + "bfd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c00a000000000000", + "0000000000000000", + "bffc000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "c004000000000000", + "400c000000000000", + "bfd0000000000000", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "400a000000000000", + "c000000000000000", + "c00e000000000000", + "bff4000000000000", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "bff0000000000000", + "400c000000000000", + "c006000000000000", + "3fe0000000000000", + "3ffc000000000000", + "405400000000001c", + "405400000000001d", + "3fd0000000000000", + "4004000000000000", + "3fe8000000000000", + "c00e000000000000", + "c00e000000000000", + "400e000000000000", + "4054000000000024", + "4054000000000025", + "400a000000000000", + "3fe8000000000000", + "c008000000000000", + "400a000000000000", + "3fe8000000000000", + "c00a000000000000", + "405400000000002c", + "405400000000002d", + "3ff8000000000000", + "4004000000000000", + "c00e000000000000", + "bffc000000000000", + "0000000000000000", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "c000000000000000", + "c000000000000000", + "bfd0000000000000", + "bffc000000000000", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "400c000000000000", + "bfe6db6db6db6db6", + "bfb2492492492492", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "c000000000000000", + "c00f249249249249", + "bfddf1e88385df20", + "3fd48ceadcc548cf", + "4054000000000014", + "4054000000000015", + "4054000000000016", + "400c000000000000", + "c004000000000000", + "3ffc000000000000", + "3fe7d25e9db17d26", + "3fc828431a818276", + "405400000000001c", + "405400000000001d", + "4004000000000000", + "3fedb6db6db6db6e", + "c00e000000000000", + "400e000000000000", + "3feb1e438193b1e1", + "bfd571f6d445571e", + "4054000000000024", + "400a000000000000", + "3fef6db6db6db6db", + "400a000000000000", + "3fe8000000000000", + "c015ef0e6d60f6f1", + "bfd1e17ebd207ad5", + "3fe2f75597e7b569", + "0000000000000000", + "3ff8000000000000", + "c00e000000000000", + "bffc000000000000", + "4010e4ef56011e4f", + "40104a5a4eae881a", + "bfe3ab4e80b717fc", + "4054000000000033", + "0000000000000000", + "c000000000000000", + "bfd0000000000000", + "bfe309819f25b098", + "3fdb1431c16679c6", + "bff232846c74dae0", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f" + ], + "pivots_1based": [ + 2, + 3, + 5, + 6, + 6, + 6, + 7 + ], + "INFO": 0 + }, + { + "case": "seeded-4", + "dimensions": { + "m": 9, + "n": 6, + "kl": 0, + "ku": 2, + "ldab": 4 + }, + "kind": "finite", + "dense_input_bits": [ + "3ffc000000000000", + "4010000000000000", + "4002000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c002000000000000", + "4002000000000000", + "bff4000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000", + "3ffc000000000000", + "4002000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bff8000000000000", + "bff8000000000000", + "bff8000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c002000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bff8000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "3ffc000000000000", + "4054000000000007", + "4054000000000008", + "4010000000000000", + "c002000000000000", + "405400000000000b", + "4002000000000000", + "4002000000000000", + "3ffc000000000000", + "405400000000000f", + "bff4000000000000", + "3ffc000000000000", + "bff8000000000000", + "4054000000000013", + "4002000000000000", + "bff8000000000000", + "c002000000000000", + "4054000000000017", + "bff8000000000000", + "0000000000000000", + "bff8000000000000", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "3ffc000000000000", + "4054000000000007", + "4054000000000008", + "4010000000000000", + "c002000000000000", + "405400000000000b", + "4002000000000000", + "4002000000000000", + "3ffc000000000000", + "405400000000000f", + "bff4000000000000", + "3ffc000000000000", + "bff8000000000000", + "4054000000000013", + "4002000000000000", + "bff8000000000000", + "c002000000000000", + "4054000000000017", + "bff8000000000000", + "0000000000000000", + "bff8000000000000", + "405400000000001b", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f" + ], + "pivots_1based": [ + 1, + 2, + 3, + 4, + 5, + 6 + ], + "INFO": 0 + }, + { + "case": "seeded-5", + "dimensions": { + "m": 6, + "n": 9, + "kl": 2, + "ku": 0, + "ldab": 7 + }, + "kind": "finite", + "dense_input_bits": [ + "bff4000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c00a000000000000", + "4008000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ff0000000000000", + "c000000000000000", + "4000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3fe0000000000000", + "c006000000000000", + "400e000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4006000000000000", + "400a000000000000", + "bffc000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "bff0000000000000", + "3fe0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "bff4000000000000", + "c00a000000000000", + "3ff0000000000000", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "405400000000000c", + "4008000000000000", + "c000000000000000", + "3fe0000000000000", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4000000000000000", + "c006000000000000", + "4006000000000000", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "400e000000000000", + "400a000000000000", + "400e000000000000", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "4054000000000021", + "bffc000000000000", + "bff0000000000000", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "4054000000000027", + "4054000000000028", + "3fe0000000000000", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "405400000000002f", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "c00a000000000000", + "3fd89d89d89d89d9", + "bfd3b13b13b13b14", + "4054000000000009", + "405400000000000a", + "405400000000000b", + "4008000000000000", + "bff2762762762763", + "3feddddddddddddd", + "bfdbbbbbbbbbbbbb", + "4054000000000010", + "4054000000000011", + "0000000000000000", + "0000000000000000", + "c006000000000000", + "bfe745d1745d1746", + "bff0000000000000", + "4054000000000017", + "4054000000000018", + "0000000000000000", + "400e000000000000", + "401c000000000000", + "3fd8ef606a63bd82", + "3fe1249249249249", + "405400000000001e", + "405400000000001f", + "0000000000000000", + "bffc000000000000", + "3fe5d1745d1745d2", + "bfb7777777777777", + "4054000000000024", + "4054000000000025", + "4054000000000026", + "0000000000000000", + "0000000000000000", + "3fe0000000000000", + "405400000000002a", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "0000000000000000", + "0000000000000000", + "4054000000000030", + "4054000000000031", + "4054000000000032", + "4054000000000033", + "4054000000000034", + "0000000000000000", + "0000000000000000", + "4054000000000037", + "4054000000000038", + "4054000000000039", + "405400000000003a", + "405400000000003b", + "405400000000003c", + "405400000000003d", + "405400000000003e", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "4054000000000044", + "4054000000000045", + "4054000000000046" + ], + "pivots_1based": [ + 2, + 2, + 4, + 5, + 5, + 6 + ], + "INFO": 0 + }, + { + "case": "seeded-6", + "dimensions": { + "m": 10, + "n": 10, + "kl": 4, + "ku": 3, + "ldab": 12 + }, + "kind": "finite", + "dense_input_bits": [ + "c00a000000000000", + "c00a000000000000", + "3fe8000000000000", + "400a000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c00c000000000000", + "c00c000000000000", + "c010000000000000", + "c00a000000000000", + "c010000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "bfe8000000000000", + "400e000000000000", + "3ff8000000000000", + "4006000000000000", + "bfe0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "3fe0000000000000", + "c006000000000000", + "bff8000000000000", + "c000000000000000", + "3ff4000000000000", + "bffc000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "4008000000000000", + "3ff0000000000000", + "400c000000000000", + "bffc000000000000", + "bfe8000000000000", + "4002000000000000", + "bff8000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c010000000000000", + "4002000000000000", + "c010000000000000", + "4010000000000000", + "4002000000000000", + "3fe0000000000000", + "c00e000000000000", + "4002000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bfe8000000000000", + "c008000000000000", + "4000000000000000", + "0000000000000000", + "bffc000000000000", + "bfe0000000000000", + "400a000000000000", + "3fd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c006000000000000", + "c00e000000000000", + "3ff4000000000000", + "c00a000000000000", + "400c000000000000", + "bff0000000000000", + "bfe0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "bfe0000000000000", + "3ff8000000000000", + "0000000000000000", + "bfe8000000000000", + "3fd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4002000000000000", + "c000000000000000", + "3ff8000000000000", + "3ff4000000000000", + "4004000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "c00a000000000000", + "c00c000000000000", + "400e000000000000", + "400e000000000000", + "400e000000000000", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "c00a000000000000", + "c00c000000000000", + "bfe8000000000000", + "3fe0000000000000", + "4008000000000000", + "c010000000000000", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "3fe8000000000000", + "c010000000000000", + "400e000000000000", + "c006000000000000", + "3ff0000000000000", + "4002000000000000", + "bfe8000000000000", + "4054000000000028", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "400a000000000000", + "c00a000000000000", + "3ff8000000000000", + "bff8000000000000", + "400c000000000000", + "c010000000000000", + "c008000000000000", + "c006000000000000", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "c010000000000000", + "4006000000000000", + "c000000000000000", + "bffc000000000000", + "4010000000000000", + "4000000000000000", + "c00e000000000000", + "400e000000000000", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "4054000000000043", + "bfe0000000000000", + "3ff4000000000000", + "bfe8000000000000", + "4002000000000000", + "0000000000000000", + "3ff4000000000000", + "bfe0000000000000", + "4002000000000000", + "405400000000004c", + "405400000000004d", + "405400000000004e", + "405400000000004f", + "bffc000000000000", + "4002000000000000", + "3fe0000000000000", + "bffc000000000000", + "c00a000000000000", + "3ff8000000000000", + "c000000000000000", + "4054000000000057", + "4054000000000058", + "4054000000000059", + "405400000000005a", + "405400000000005b", + "bff8000000000000", + "c00e000000000000", + "bfe0000000000000", + "400c000000000000", + "0000000000000000", + "3ff8000000000000", + "4054000000000062", + "4054000000000063", + "4054000000000064", + "4054000000000065", + "4054000000000066", + "4054000000000067", + "4002000000000000", + "400a000000000000", + "bff0000000000000", + "bfe8000000000000", + "3ff4000000000000", + "405400000000006d", + "405400000000006e", + "405400000000006f", + "4054000000000070", + "4054000000000071", + "4054000000000072", + "4054000000000073", + "3fd0000000000000", + "bfe0000000000000", + "3fd0000000000000", + "4004000000000000", + "4054000000000078", + "4054000000000079", + "405400000000007a", + "405400000000007b", + "405400000000007c", + "405400000000007d", + "405400000000007e", + "405400000000007f" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "400e000000000000", + "bfedddddddddddde", + "bfebbbbbbbbbbbbc", + "3ff0000000000000", + "3ff0000000000000", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013", + "4054000000000014", + "4054000000000015", + "bfe8000000000000", + "c010cccccccccccd", + "3fedb6db6db6db6d", + "bfd30c30c30c30c3", + "bfec924924924924", + "3fee79e79e79e79e", + "405400000000001c", + "405400000000001d", + "405400000000001e", + "405400000000001f", + "4054000000000020", + "400e000000000000", + "bfe0000000000000", + "c01a986186186186", + "bfe57c7297b87e83", + "3fdec4a418c08402", + "bfda3de14a06e025", + "3fbce09a03356672", + "4054000000000028", + "4054000000000029", + "405400000000002a", + "405400000000002b", + "3ff8000000000000", + "bffd99999999999a", + "c00c679e79e79e7a", + "400f121b0b3ae68e", + "3fe0eedf52bf29ad", + "bfee6f70b94a92e9", + "bfe56af867080a46", + "bfe6a871a7383138", + "4054000000000034", + "4054000000000035", + "4054000000000036", + "4006000000000000", + "bff6eeeeeeeeeeee", + "c014b4d34d34d34d", + "3fce8786610593a0", + "400e000000000000", + "3fed9afe7348ffe3", + "3fe7696a17d1820d", + "bfee8f132db6a058", + "bfed293e6391f4f6", + "4054000000000040", + "4054000000000041", + "bfe0000000000000", + "bfddddddddddddde", + "3ff9c71c71c71c72", + "3ff14eea88711094", + "bfe0000000000000", + "401362d1033d6f03", + "3fc7fbdd421e8ada", + "3fd450f1b9e99558", + "bfe04dce0f25f2ed", + "3fddb65029b38644", + "405400000000004c", + "0000000000000000", + "0000000000000000", + "bffc000000000000", + "bff2cce444c16eb3", + "3ff8000000000000", + "c005c8702c8c7096", + "400d8ab13e379cc8", + "bfdef09ac91f14c5", + "bfe95bb6e692cde9", + "bfc982247494e20c", + "4054000000000057", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c00e000000000000", + "c00b48f12e3393be", + "4008552cbbcd6284", + "bfea4d86fdd5458c", + "3feaf2545915166c", + "4054000000000062", + "4054000000000063", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bfe8000000000000", + "40078d0fb59daffa", + "3fea203cf4aeaf98", + "c0020c5c9ed2648f", + "40005152c47efd2c", + "3fee86b351538161", + "405400000000006d", + "405400000000006e", + "405400000000006f", + "0000000000000000", + "0000000000000000", + "3fd0000000000000", + "bfcd9afe7348ffe3", + "3fbc278723bc87f6", + "bfc13cdbe8fd84bb", + "3fb63e88b553ac7d", + "4005474987214a14", + "4054000000000078", + "4054000000000079", + "405400000000007a", + "405400000000007b", + "405400000000007c", + "405400000000007d", + "405400000000007e", + "405400000000007f" + ], + "pivots_1based": [ + 3, + 2, + 4, + 4, + 9, + 6, + 9, + 8, + 9, + 10 + ], + "INFO": 0 + }, + { + "case": "seeded-7", + "dimensions": { + "m": 20, + "n": 14, + "kl": 3, + "ku": 2, + "ldab": 10 + }, + "kind": "finite", + "dense_input_bits": [ + "4010000000000000", + "c010000000000000", + "4010000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c008000000000000", + "4000000000000000", + "bfe8000000000000", + "bff4000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c00c000000000000", + "bfe8000000000000", + "c002000000000000", + "3ff8000000000000", + "bfd0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bff4000000000000", + "bfe8000000000000", + "4006000000000000", + "c006000000000000", + "0000000000000000", + "c00c000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000", + "bfe0000000000000", + "3ff4000000000000", + "4010000000000000", + "0000000000000000", + "3fe8000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3fd0000000000000", + "4010000000000000", + "400a000000000000", + "3ff8000000000000", + "bff8000000000000", + "c004000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "bfd0000000000000", + "c004000000000000", + "c004000000000000", + "3fe0000000000000", + "4010000000000000", + "400c000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c002000000000000", + "400c000000000000", + "bfe8000000000000", + "bfe0000000000000", + "c00a000000000000", + "bff0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "400e000000000000", + "bffc000000000000", + "c000000000000000", + "bfe0000000000000", + "c000000000000000", + "3ff0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4000000000000000", + "3fe0000000000000", + "4004000000000000", + "c000000000000000", + "bff0000000000000", + "c000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000", + "bff4000000000000", + "4004000000000000", + "4004000000000000", + "c010000000000000", + "c00a000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ff8000000000000", + "3ffc000000000000", + "bfe0000000000000", + "c008000000000000", + "c00a000000000000", + "4004000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4002000000000000", + "c010000000000000", + "3fe0000000000000", + "3fe8000000000000", + "bff8000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4006000000000000", + "3fe0000000000000", + "c00a000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "c000000000000000", + "400a000000000000", + "bfe0000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "4010000000000000", + "3ff4000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "3ffc000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000", + "0000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4010000000000000", + "c008000000000000", + "c00c000000000000", + "bff4000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "c010000000000000", + "4000000000000000", + "bfe8000000000000", + "bfe8000000000000", + "3ffc000000000000", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "4010000000000000", + "bfe8000000000000", + "c002000000000000", + "4006000000000000", + "bfe0000000000000", + "3fd0000000000000", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "4054000000000024", + "bff4000000000000", + "3ff8000000000000", + "c006000000000000", + "3ff4000000000000", + "4010000000000000", + "bfd0000000000000", + "405400000000002b", + "405400000000002c", + "405400000000002d", + "405400000000002e", + "bfd0000000000000", + "0000000000000000", + "4010000000000000", + "400a000000000000", + "c004000000000000", + "c002000000000000", + "4054000000000035", + "4054000000000036", + "4054000000000037", + "4054000000000038", + "c00c000000000000", + "0000000000000000", + "3ff8000000000000", + "c004000000000000", + "400c000000000000", + "400e000000000000", + "405400000000003f", + "4054000000000040", + "4054000000000041", + "4054000000000042", + "3fe8000000000000", + "bff8000000000000", + "3fe0000000000000", + "bfe8000000000000", + "bffc000000000000", + "4000000000000000", + "4054000000000049", + "405400000000004a", + "405400000000004b", + "405400000000004c", + "c004000000000000", + "4010000000000000", + "bfe0000000000000", + "c000000000000000", + "3fe0000000000000", + "3ffc000000000000", + "4054000000000053", + "4054000000000054", + "4054000000000055", + "4054000000000056", + "400c000000000000", + "c00a000000000000", + "bfe0000000000000", + "4004000000000000", + "bff4000000000000", + "3ff8000000000000", + "405400000000005d", + "405400000000005e", + "405400000000005f", + "4054000000000060", + "bff0000000000000", + "c000000000000000", + "c000000000000000", + "4004000000000000", + "3ffc000000000000", + "4002000000000000", + "4054000000000067", + "4054000000000068", + "4054000000000069", + "405400000000006a", + "3ff0000000000000", + "bff0000000000000", + "4004000000000000", + "bfe0000000000000", + "c010000000000000", + "4006000000000000", + "4054000000000071", + "4054000000000072", + "4054000000000073", + "4054000000000074", + "c000000000000000", + "c010000000000000", + "c008000000000000", + "3fe0000000000000", + "3fe0000000000000", + "c000000000000000", + "405400000000007b", + "405400000000007c", + "405400000000007d", + "405400000000007e", + "c00a000000000000", + "c00a000000000000", + "3fe8000000000000", + "c00a000000000000", + "400a000000000000", + "4010000000000000", + "4054000000000085", + "4054000000000086", + "4054000000000087", + "4054000000000088", + "4004000000000000", + "bff8000000000000", + "0000000000000000", + "bfe0000000000000", + "3ff4000000000000", + "3ffc000000000000", + "405400000000008f", + "4054000000000090", + "4054000000000091", + "4054000000000092", + "4054000000000093" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "4054000000000006", + "4054000000000007", + "4054000000000008", + "4010000000000000", + "bfe8000000000000", + "bfec000000000000", + "bfd4000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "c010000000000000", + "c011000000000000", + "3fce1e1e1e1e1e1e", + "3fde1e1e1e1e1e1e", + "bfda5a5a5a5a5a5a", + "4054000000000017", + "4054000000000018", + "4054000000000019", + "405400000000001a", + "4010000000000000", + "3ff4000000000000", + "400b4b4b4b4b4b4b", + "3fe258469ee5846a", + "3f71a7b9611a7b85", + "3fb2c234f72c2350", + "4054000000000021", + "4054000000000022", + "4054000000000023", + "0000000000000000", + "3ff8000000000000", + "c00ba5a5a5a5a5a6", + "4011034f72c234f7", + "3fdc53cc5f36ad2c", + "3fb6c4014c147edf", + "bfae1841e5aac657", + "405400000000002b", + "405400000000002c", + "0000000000000000", + "bfd0000000000000", + "3fbe1e1e1e1e1e1e", + "4009ee58469ee584", + "4003b1e8c7c45452", + "bfbeded4b6d69c72", + "bfee04e6789c2d34", + "bfed3efe062a34a2", + "4054000000000035", + "0000000000000000", + "0000000000000000", + "c00c000000000000", + "3ffc1a7b9611a7ba", + "bfe8652e3ea77789", + "400e000000000000", + "bfea8e16446cbbc4", + "3fe7ebcf0a146f03", + "3fde02496b7c1519", + "405400000000003f", + "0000000000000000", + "0000000000000000", + "bff8000000000000", + "3ff69f6ca3b480f0", + "bffc000000000000", + "4000000000000000", + "3fed9b581574b1f2", + "3fe1fdc005bb98aa", + "3fc24dd88e2e8c1c", + "4054000000000049", + "0000000000000000", + "c004000000000000", + "3ff1b45fbb822c3c", + "c000000000000000", + "3fe0000000000000", + "4009477b6dd5b063", + "3fd48160242050a3", + "3fdf4468357b9535", + "3fe1b8d8f9eae530", + "4054000000000053", + "0000000000000000", + "0000000000000000", + "bfe0000000000000", + "4004000000000000", + "4005d213613b22a4", + "c01a1658a5b8f6cf", + "3fd41178b98f749d", + "3fdb170de5410beb", + "bfcd708b2a4bff9b", + "405400000000005d", + "0000000000000000", + "c000000000000000", + "c000000000000000", + "bff5faa020e118bd", + "40082205619da586", + "40038ced39be7756", + "3fe9fa47436faf87", + "3fe4616d510e3a41", + "3fed7650c55ea1a4", + "4054000000000067", + "3ff0000000000000", + "bff0000000000000", + "3fef218c67f85ecb", + "bfd30bfa9965224f", + "bfe230bafbaa4110", + "c00bd0253c1a1c7b", + "bfb1738b650540c3", + "bfe7756bc10b05a2", + "bfe94fd4e8974874", + "4054000000000071", + "c000000000000000", + "3fd24dd88e2e8c1c", + "3ffb5f06bb445cf3", + "c004da33c8b8f49c", + "400732d82efa369a", + "40065998c3ddf760", + "bfcd5aaa204de2f3", + "3feaf708d5aa48cd", + "bfe6e885b9483be6", + "405400000000007b", + "0000000000000000", + "0000000000000000", + "c00a000000000000", + "400df021a05ce355", + "bfd28dadb9d22fd8", + "4010000000000000", + "3fe48de93536aa20", + "3fe856f8fb8ea922", + "3fe085a52827a99a", + "4054000000000085", + "0000000000000000", + "4004000000000000", + "c00e69f27b5b2506", + "c0080ea559f615f7", + "3ff4000000000000", + "c0189b25f9eaf4c8", + "3fe2bedb3139fa1e", + "3f9406bdb65f2ad0", + "bfd234f7c5e19544", + "405400000000008f", + "4054000000000090", + "4054000000000091", + "4054000000000092", + "4054000000000093" + ], + "pivots_1based": [ + 1, + 3, + 4, + 6, + 5, + 9, + 10, + 10, + 10, + 12, + 13, + 14, + 16, + 16 + ], + "INFO": 0 + }, + { + "case": "tiny-zero-multiplier-zero-y", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 0, + "ldab": 5 + }, + "kind": "finite-input-nonfinite-output", + "dense_input_bits": [ + "0000000000000001", + "0000000000000000", + "0000000000000000", + "3ff0000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "0000000000000001", + "0000000000000000", + "4054000000000007", + "4054000000000008", + "4054000000000009", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "0000000000000001", + "fff8000000000000", + "4054000000000007", + "4054000000000008", + "0000000000000000", + "3ff0000000000000", + "405400000000000b", + "405400000000000c", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "tiny-zero-multiplier-nonzero-y", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite-input-nonfinite-output", + "dense_input_bits": [ + "0000000000000001", + "3ff0000000000000", + "0000000000000000", + "3ff0000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000001", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "3ff0000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000001", + "fff8000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "fff8000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "tiny-tied-multiplier", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite-input-nonfinite-output", + "dense_input_bits": [ + "0000000000000001", + "3ff0000000000000", + "0000000000000001", + "4000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000001", + "0000000000000001", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "4000000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0000000000000001", + "7ff0000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "fff0000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + }, + { + "case": "quarter-minimum-normal-overflow", + "dimensions": { + "m": 2, + "n": 2, + "kl": 1, + "ku": 1, + "ldab": 6 + }, + "kind": "finite-input-nonfinite-output", + "dense_input_bits": [ + "0004000000000000", + "3ff0000000000000", + "0000000000000000", + "4000000000000000" + ], + "whole_AB_input_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0004000000000000", + "0000000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "4000000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "whole_AB_output_bits": [ + "4054000000000000", + "4054000000000001", + "4054000000000002", + "4054000000000003", + "4054000000000004", + "4054000000000005", + "0004000000000000", + "fff8000000000000", + "4054000000000008", + "4054000000000009", + "405400000000000a", + "3ff0000000000000", + "fff8000000000000", + "405400000000000d", + "405400000000000e", + "405400000000000f", + "4054000000000010", + "4054000000000011", + "4054000000000012", + "4054000000000013" + ], + "pivots_1based": [ + 1, + 2 + ], + "INFO": 0 + } + ], + "whole_AB_reference_pointer_offset": 4 +} diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/helpers.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/helpers.js new file mode 100644 index 000000000000..e3b5d76a8a21 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/helpers.js @@ -0,0 +1,290 @@ +/** +* @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'; + +/* eslint n/no-unsupported-features/es-builtins: ["error", {"version": ">=8.0.0"}] */ + +/* eslint n/no-unsupported-features/es-syntax: ["error", {"version": ">=8.0.0"}] */ + + +// MODULES // + +var DataView = require( '@stdlib/array/dataview' ); +var ArrayBuffer = require( '@stdlib/array/buffer' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var max = require( '@stdlib/math/base/special/max' ); +var min = require( '@stdlib/math/base/special/min' ); +var abs = require( '@stdlib/math/base/special/abs' ); +var cases = require( './fixtures/reference.json' ).cases; +var buffer = new ArrayBuffer(8); +var view = new DataView(buffer); + + +// FUNCTIONS // + +/** +* Decodes a reference IEEE binary64 string. +* @private +* @param {string} value - bits +* @returns {number} value +*/ +function decode(value) { + view.setUint32(0, parseInt(value.slice(0, 8), 16)); + view.setUint32(4, parseInt(value.slice(8), 16)); + return view.getFloat64(0); +} +/** +* Encodes a result for exact finite and signed-zero comparison. +* @private +* @param {number} value - value +* @returns {string} bits or NaN class +*/ +function bits(value) { + var hi; + var lo; + if ((value !== value)) { + return 'NaN'; + } + view.setFloat64(0, value); + hi = ('00000000' + view.getUint32(0).toString(16)).slice(-8); + lo = ('00000000' + view.getUint32(4).toString(16)).slice(-8); + return (hi + lo); +} +/** +* Reconstructs P_A=L_U, swapping previously produced L columns. +* @private +* @param {Object} x - fixture +* @param {Float64Array} ab - factor view +* @param {integer} r - row stride +* @param {integer} c - column stride +* @param {integer} o - offset +* @returns {number} relative maximum residual +*/ +function residual(x, ab, r, c, o) { + var error; + var scale; + var value; + var swap; + var kv; + var a; + var d; + var i; + var j; + var k; + var l; + var m; + var n; + var p; + var q; + var u; + d = x.dimensions; + m = d.m; + n = d.n; + k = min(m, n); + kv = (d.kl + d.ku); + a = x.dense_input_bits.map(decode); + l = []; + u = []; + scale = 0; + error = 0; + for (i = 0; (i < m); i += 1) { + l[i] = []; + for (j = 0; (j < k); j += 1) { + l[i][j] = (i === j) ? 1 : 0; + } + } + for (j = 0; (j < k); j += 1) { + p = (x.pivots_1based[j] - 1); + for (q = 0; (q < n); q += 1) { + swap = a[((j * n) + q)]; + a[((j * n) + q)] = a[((p * n) + q)]; + a[((p * n) + q)] = swap; + } + for (q = 0; (q < j); q += 1) { + swap = l[j][q]; + l[j][q] = l[p][q]; + l[p][q] = swap; + } + for (i = (j + 1); (i <= min((m - 1), (j + d.kl))); i += 1) { + l[i][j] = ab[((o + (((kv + i) - j) * r)) + (j * c))]; + } + } + for (i = 0; (i < a.length); i += 1) { + scale = max(scale, abs(a[i])); + } + if ((scale === 0)) { + scale = 1; + } + for (i = 0; (i < k); i += 1) { + u[i] = []; + for (j = 0; (j < n); j += 1) { + u[i][j] = ((j >= i) && (j <= (i + kv))) ? (ab[((o + (((kv + i) - j) * r)) + (j * c))] / scale) : 0; + } + } + for (i = 0; (i < m); i += 1) { + for (j = 0; (j < n); j += 1) { + value = 0; + for (q = 0; (q < k); q += 1) { + value += (l[i][q] * u[q][j]); + } + error = max(error, abs((value - (a[((i * n) + j)] / scale)))); + } + } + return error; +} +/** +* Runs finite reference, layout, mutation and independent reconstruction tests. +* @private +* @param {Object} t - tape +* @param {Function} f - complete public-signature backend +* @returns {void} +*/ +function run(t, f) { + var expectedPiv; + var expected; + var layouts; + var actual; + var index; + var piv; + var ab; + var hi; + var lo; + var op; + var sp; + var c; + var d; + var h; + var i; + var j; + var k; + var o; + var q; + var r; + var x; + var z; + layouts = [ + [ + 1, + 0, + 1 + ], + [ + 2, + 0, + -2 + ], + [ + -2, + 0, + 2 + ], + [ + 1, + 0, + 0 + ], + [ + 3, + 0, + -1 + ] + ]; + cases.forEach(function each(item) { + x = item; + d = x.dimensions; + h = (((2 * d.kl) + d.ku) + 1); + k = min(d.m, d.n); + if ((k === 0)) { + t.strictEqual(f('column-major', d.m, d.n, d.kl, d.ku, null, d.ldab, null), 0, (x.case + ' empty')); + return; + } + for (z = 0; (z < layouts.length); z += 1) { + r = layouts[z][0]; + c = ((h + 3) * abs(r)); + if ((z === 2)) { + c = -c; + } + if ((z === 3)) { + c = 0; + } + if (((d.n > 1) && (c === 0))) { + c = (h + 3); + } + sp = layouts[z][2]; + if (((k > 1) && (sp === 0))) { + sp = 1; + } + lo = (min(((h - 1) * r), 0) + min(((d.n - 1) * c), 0)); + hi = (max(((h - 1) * r), 0) + max(((d.n - 1) * c), 0)); + o = (3 - lo); + ab = new Float64Array(new ArrayBuffer((((hi - lo) + 10) * 8)), 8, ((hi - lo) + 8)); + ab.fill(91); + expected = Array.prototype.slice.call(ab); + for (j = 0; (j < d.n); j += 1) { + for (i = 0; (i < h); i += 1) { + index = ((o + (i * r)) + (j * c)); + ab[index] = decode(x.whole_AB_input_bits[((4 + (j * d.ldab)) + i)]); + expected[index] = decode(x.whole_AB_output_bits[((4 + (j * d.ldab)) + i)]); + } + } + op = (2 - min(((k - 1) * sp), 0)); + piv = new Int32Array(new ArrayBuffer(((abs(((k - 1) * sp)) + 8) * 4)), 4, (abs(((k - 1) * sp)) + 6)); + piv.fill(-777); + expectedPiv = Array.prototype.slice.call(piv); + for (q = 0; (q < k); q += 1) { + expectedPiv[(op + (q * sp))] = x.pivots_1based[q]; + } + actual = f.ndarray(d.m, d.n, d.kl, d.ku, ab, r, c, o, piv, sp, op); + t.strictEqual(actual, x.INFO, ((x.case + ' INFO layout') + z)); + t.deepEqual(Array.prototype.slice.call(ab).map(bits), expected.map(bits), ((x.case + ' full AB/guards layout') + z)); + t.deepEqual(Array.prototype.slice.call(piv), expectedPiv, ((x.case + ' full step history/guards layout') + z)); + if ((x.kind === 'finite')) { + t.ok((residual(x, ab, r, c, o) < 1e-12), ((x.case + ' P*A=L*U layout') + z)); + } + } + [ + 'column-major', + 'row-major' + ].forEach(function layout(order) { + r = (order === 'column-major') ? 1 : (d.n + 2); + c = (order === 'column-major') ? (h + 2) : 1; + o = 0; + ab = new Float64Array(((((h - 1) * r) + ((d.n - 1) * c)) + 1)); + ab.fill(91); + expected = Array.prototype.slice.call(ab); + for (j = 0; (j < d.n); j += 1) { + for (i = 0; (i < h); i += 1) { + index = ((i * r) + (j * c)); + ab[index] = decode(x.whole_AB_input_bits[((4 + (j * d.ldab)) + i)]); + expected[index] = decode(x.whole_AB_output_bits[((4 + (j * d.ldab)) + i)]); + } + } + piv = new Int32Array(k); + piv.fill(-999); + t.strictEqual(f(order, d.m, d.n, d.kl, d.ku, ab, (order === 'column-major') ? c : r, piv), x.INFO, ((x.case + ' main ') + order)); + t.deepEqual(Array.prototype.slice.call(ab).map(bits), expected.map(bits), ((x.case + ' main backing ') + order)); + t.deepEqual(Array.prototype.slice.call(piv), x.pivots_1based, ((x.case + ' main step history ') + order)); + }); + }); +} + + +// EXPORTS // + +module.exports = run; diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.js new file mode 100644 index 000000000000..4bc9ecb4054c --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.js @@ -0,0 +1,42 @@ +/** +* @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 dgbtf2 = require( './../lib' ); +var main = require( './../lib/main.js' ); +var run = require( './helpers.js' ); + + +// TESTS // + +tape('main export is a function', function test(t) { + t.ok(true, __filename); + t.strictEqual(typeof dgbtf2, 'function'); + t.end(); +}); +tape('dgbtf2: pure JS unchanged reference and reconstruction', function test(t) { + run(t, main); + t.end(); +}); +tape('dgbtf2: exported public reference and reconstruction', function test(t) { + run(t, dgbtf2); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.native.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.native.js new file mode 100644 index 000000000000..bda68c71f23b --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test.native.js @@ -0,0 +1,64 @@ +/** +* @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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var run = require( './helpers.js' ); +var factory = require( './../lib/factory.js' ); +var eligible = require( './../lib/can_use_native.js' ); +var main = require( './../lib/main.js' ); + + +// VARIABLES // + +var addon = tryRequire(resolve(__dirname, '../src/addon.node')); +var opts = { + 'skip': (addon instanceof Error) +}; + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof addon, 'function' ); + t.end(); +}); + +tape('dgbtf2: actual compiled native reference and reconstruction', opts, function test(t) { + var native; + var calls = 0; + native = factory(function backend() { + calls += 1; + return addon.apply(null, arguments); + }, eligible, main); + run(t, native); + t.ok((calls > 200), 'actual loaded addon dispatched for positive fixtures'); + t.end(); +}); +tape('dgbtf2: raw quartet signed32 before empty', opts, function test(t) { + t.throws(function bad() { + addon(2147483648, 0, 0, 0, null, 1, 1, 0, null, 1, 0); + }, Error, 'rejects oversized raw M before quick return'); + t.strictEqual(addon(0, 0, 0, 0, null, null, null, null, null, null, null), 0, 'valid raw empty avoids inactive metadata'); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test_api.js b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test_api.js new file mode 100644 index 000000000000..491fb075fdb9 --- /dev/null +++ b/lib/node_modules/@stdlib/lapack/base/dgbtf2/test/test_api.js @@ -0,0 +1,175 @@ +/** +* @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'; + +/* eslint-disable n/no-unsupported-features/es-syntax -- RAB checks run conditionally only when the host exposes resize; ordinary buffer calls retain the proposed pure-JS Node8 floor. */ + +/* eslint n/no-unsupported-features/es-builtins: ["error", {"version": ">=8.0.0"}] */ + +/* eslint n/no-unsupported-features/es-syntax: ["error", {"version": ">=8.0.0"}] */ + + +// MODULES // + +var tape = require( 'tape' ); +var SharedArrayBuffer = require( '@stdlib/array/shared-buffer' ); +var Proxy = require( '@stdlib/proxy/ctor' ); +var ArrayBuffer = require( '@stdlib/array/buffer' ); +var Int32Array = require( '@stdlib/array/int32' ); +var Float64Array = require( '@stdlib/array/float64' ); +var main = require( './../lib/main.js' ); +var dgbtf2 = require( './../lib' ); +var factory = require( './../lib/factory.js' ); +var eligible = require( './../lib/can_use_native.js' ); + + +// TESTS // + +tape('dgbtf2: complete scalar validation before no-access empty', function test(t) { + [ + main, + dgbtf2 + ].forEach(function each(f) { + var trap; + trap = new Proxy({}, { + 'get': function get() { + throw new Error('inactive argument read'); + } + }); + t.strictEqual(f('column-major', 0, 3, 2147483647, 2147483647, trap, 6442450942, trap), 0, 'wide empty before backend casts or buffers'); + t.strictEqual(f.ndarray(5, 0, 1, 1, trap, trap, trap, trap, trap, trap, trap), 0, 'nd empty before inactive metadata'); + t.throws(function bad() { + f('bad', 0, 0, 0, 0, null, 1, null); + }, TypeError, 'layout validated'); + t.throws(function bad() { + f('column-major', 2147483648, 0, 0, 0, null, 1, null); + }, RangeError, 'quartet cap validated'); + t.throws(function bad() { + f('column-major', 0, 0, 2, 1, null, 5, null); + }, RangeError, 'LDAB validated even empty'); + }); + t.end(); +}); +tape('dgbtf2: rejection preserves all active backing bytes', function test(t) { + [ + main, + dgbtf2 + ].forEach(function each(f) { + var beforePiv; + var before; + var shared; + var piv; + var ab; + ab = new Float64Array([ + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19 + ]); + piv = new Int32Array([ + 91, + 92, + 93 + ]); + before = Array.prototype.slice.call(ab); + beforePiv = Array.prototype.slice.call(piv); + shared = new ArrayBuffer(64); + t.throws(function bad() { + f.ndarray(3, 3, 1, 0, ab, 0, 3, 0, piv, 1, 0); + }, RangeError, 'broadcast rejects'); + t.throws(function bad() { + f.ndarray(3, 3, 1, 0, ab, 1, 1, 0, piv, 1, 0); + }, RangeError, 'colliding full view rejects'); + t.throws(function bad() { + f.ndarray(3, 3, 1, 0, ab, 1, 3, 1, piv, 1, 0); + }, RangeError, 'capacity rejects'); + t.throws(function bad() { + f.ndarray(3, 3, 1, 0, ab, 1, 3, 0, piv, 0, 0); + }, RangeError, 'pivot broadcast rejects'); + t.deepEqual(Array.prototype.slice.call(ab), before, 'AB unchanged'); + t.deepEqual(Array.prototype.slice.call(piv), beforePiv, 'PIV unchanged'); + t.throws(function bad() { + f('column-major', 2, 2, 0, 0, new Float64Array(shared, 0, 2), 1, new Int32Array(shared, 0, 2)); + }, RangeError, 'cross-type byte overlap rejects'); + if ((typeof SharedArrayBuffer === 'function')) { + t.throws(function bad() { + f('column-major', 1, 1, 0, 0, new Float64Array(new SharedArrayBuffer(8)), 1, new Int32Array(1)); + }, TypeError, 'SAB rejects'); + } + }); + t.end(); +}); +tape('dgbtf2: ordinary RAB current extent and intrinsic metadata', function test(t) { + var buffer; + var piv; + var ab; + buffer = new ArrayBuffer(16, { + 'maxByteLength': 32 + }); + ab = new Float64Array(buffer); + piv = new Int32Array(1); + Object.defineProperty(ab, 'length', { + 'get': function get() { + throw new Error('shadow length accessed'); + } + }); + ab[0] = 7; + t.strictEqual(dgbtf2('column-major', 1, 1, 0, 0, ab, 1, piv), 0, 'intrinsic length ignores shadow'); + if ((typeof buffer.resize === 'function')) { + buffer.resize(0); + t.throws(function bad() { + dgbtf2('column-major', 1, 1, 0, 0, ab, 1, piv); + }, RangeError, 'shrunk RAB rejected before write'); + buffer.resize(16); + ab[0] = 9; + t.strictEqual(dgbtf2('column-major', 1, 1, 0, 0, ab, 1, piv), 0, 'grown current RAB accepted'); + } + t.end(); +}); +tape('dgbtf2: normalized singleton and conservative predispatch fallback', function test(t) { + var fallback; + var calls; + var piv; + var ab; + var f; + calls = 0; + fallback = 0; + f = factory(function backend() { + calls += 1; + return 0; + }, function no() { + return false; + }, function js() { + fallback += 1; + return 0; + }); + ab = new Float64Array([3]); + piv = new Int32Array(1); + t.strictEqual(f.ndarray(1, 1, 0, 0, ab, 9007199254740991, -9007199254740991, 0, piv, 9007199254740991, 0), 0, 'wide unused singleton validated before normalization'); + t.strictEqual(calls, 0, 'ineligible backend never called'); + t.strictEqual(fallback, 1, 'valid call falls back before native'); + t.strictEqual(f.ndarray(0, 1, 0, 0, null, null, null, null, null, null, null), 0, 'empty never dispatches'); + t.strictEqual(fallback, 1, 'empty does not reach fallback either'); + t.strictEqual(eligible(1, 1, 0, 0, ab, 1, 1, 0, piv, 1, 0), true, 'normalized tiny native domain'); + t.end(); +});