From 37909ad31b89b7404a570dab9c7cf1b46d5bed5b Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 26 Mar 2025 18:17:34 +0530 Subject: [PATCH 1/5] fix: add javascript implementation for /blas/base/dger --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/dger/README.md | 132 ++- .../blas/base/dger/benchmark/benchmark.js | 105 +++ .../base/dger/benchmark/benchmark.ndarray.js | 105 +++ .../@stdlib/blas/base/dger/binding.gyp | 265 ------ .../@stdlib/blas/base/dger/docs/repl.txt | 132 +++ .../blas/base/dger/docs/types/index.d.ts | 129 +++ .../@stdlib/blas/base/dger/docs/types/test.ts | 449 ++++++++++ .../blas/base/dger/examples/c/Makefile | 0 .../blas/base/dger/examples/c/example.c | 0 .../@stdlib/blas/base/dger/examples/index.js | 41 +- .../@stdlib/blas/base/dger/include.gypi | 70 -- .../base/dger/include/stdlib/blas/base/dger.h | 43 - .../include/stdlib/blas/base/dger_cblas.h | 43 - .../include/stdlib/blas/base/dger_fortran.h | 41 - .../@stdlib/blas/base/dger/lib/base.js | 114 +++ .../@stdlib/blas/base/dger/lib/dger.js | 74 +- .../@stdlib/blas/base/dger/lib/dger.native.js | 72 -- .../@stdlib/blas/base/dger/lib/index.js | 30 +- .../@stdlib/blas/base/dger/lib/main.js | 0 .../@stdlib/blas/base/dger/lib/native.js | 35 - .../@stdlib/blas/base/dger/lib/ndarray.js | 66 +- .../blas/base/dger/lib/ndarray.native.js | 86 -- .../@stdlib/blas/base/dger/manifest.json | 433 ---------- .../@stdlib/blas/base/dger/package.json | 4 +- .../@stdlib/blas/base/dger/src/Makefile | 70 -- .../@stdlib/blas/base/dger/src/addon.c | 61 -- .../@stdlib/blas/base/dger/src/dger.c | 158 ---- .../@stdlib/blas/base/dger/src/dger.f | 148 ---- .../@stdlib/blas/base/dger/src/dger_cblas.c | 39 - .../@stdlib/blas/base/dger/src/dger_f.c | 55 -- .../base/dger/test/fixtures/column_major.json | 18 + .../column_major_complex_access_pattern.json | 16 + .../dger/test/fixtures/column_major_oa.json | 16 + .../test/fixtures/column_major_sa1_sa2.json | 16 + .../test/fixtures/column_major_sa1_sa2n.json | 16 + .../test/fixtures/column_major_sa1n_sa2.json | 16 + .../test/fixtures/column_major_sa1n_sa2n.json | 16 + .../dger/test/fixtures/column_major_xnyn.json | 18 + .../dger/test/fixtures/column_major_xnyp.json | 18 + .../dger/test/fixtures/column_major_xpyn.json | 18 + .../dger/test/fixtures/column_major_xpyp.json | 18 + .../base/dger/test/fixtures/row_major.json | 18 + .../row_major_complex_access_pattern.json | 16 + .../base/dger/test/fixtures/row_major_oa.json | 16 + .../dger/test/fixtures/row_major_sa1_sa2.json | 16 + .../test/fixtures/row_major_sa1_sa2n.json | 16 + .../test/fixtures/row_major_sa1n_sa2.json | 16 + .../test/fixtures/row_major_sa1n_sa2n.json | 16 + .../dger/test/fixtures/row_major_xnyn.json | 18 + .../dger/test/fixtures/row_major_xnyp.json | 18 + .../dger/test/fixtures/row_major_xpyn.json | 18 + .../dger/test/fixtures/row_major_xpyp.json | 18 + .../@stdlib/blas/base/dger/test/test.dger.js | 534 ++++++++++++ .../@stdlib/blas/base/dger/test/test.js | 4 +- .../blas/base/dger/test/test.ndarray.js | 784 ++++++++++++++++++ 55 files changed, 2965 insertions(+), 1729 deletions(-) mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/README.md create mode 100755 lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js create mode 100755 lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/binding.gyp create mode 100644 lib/node_modules/@stdlib/blas/base/dger/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/examples/index.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/include.gypi delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/include/stdlib/blas/base/dger.h delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/include/stdlib/blas/base/dger_cblas.h delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/include/stdlib/blas/base/dger_fortran.h create mode 100755 lib/node_modules/@stdlib/blas/base/dger/lib/base.js mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/lib/dger.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/lib/dger.native.js mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/lib/index.js mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/lib/main.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/lib/native.js mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.native.js delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/manifest.json mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/package.json delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/Makefile delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/addon.c delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/dger.c delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/dger.f delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/dger_cblas.c delete mode 100644 lib/node_modules/@stdlib/blas/base/dger/src/dger_f.c create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js mode change 100644 => 100755 lib/node_modules/@stdlib/blas/base/dger/test/test.js create mode 100755 lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js diff --git a/lib/node_modules/@stdlib/blas/base/dger/README.md b/lib/node_modules/@stdlib/blas/base/dger/README.md old mode 100644 new mode 100755 index 679b9ef2fb63..e6663f4db5a6 --- a/lib/node_modules/@stdlib/blas/base/dger/README.md +++ b/lib/node_modules/@stdlib/blas/base/dger/README.md @@ -20,33 +20,112 @@ limitations under the License. # dger -> TODO. +> Perform the rank 1 operation `A = α*x*y^T + A`. -
+
-TODO +## Usage -
+```javascript +var dger = require( '@stdlib/blas/base/dger' ); +``` - +#### dger( ord, M, N, α, x, sx, y, sy, A, lda ) -
+Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. -## Usage +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var x = new Float64Array( [ 1.0, 1.0 ] ); +var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); + +dger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 ); +// A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +``` + +The function has the following parameters: + +- **ord**: storage layout. +- **M**: number of rows in the matrix `A`. +- **N**: number of columns in the matrix `A`. +- **α**: scalar constant. +- **x**: input [`Float64Array`][mdn-float64array]. +- **sx**: index increment for `x`. +- **y**: output [`Float64Array`][mdn-float64array]. +- **sy**: index increment for `y`. +- **A**: input matrix stored in linear memory as a [`Float64Array`][mdn-float64array]. +- **lda**: stride of the first dimension of `A` (leading dimension of `A`). + +The stride parameters determine how operations are performed. For example, to iterate over every other element in `x` and `y`, ```javascript -var dger = require( '@stdlib/blas/base/dger' ); +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] ); +var x = new Float64Array( [ 1.0, 0.0, 1.0, 0.0 ] ); +var y = new Float64Array( [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ] ); + +dger( 'column-major', 2, 3, 1.0, x, 2, y, 2, A, 2 ); +// A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] ``` -#### TODO +Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views. -TODO + ```javascript -/* to-do */ +var Float64Array = require( '@stdlib/array/float64' ); + +// Initial arrays... +var x0 = new Float64Array( [ 0.0, 1.0, 1.0 ] ); +var y0 = new Float64Array( [ 0.0, 1.0, 1.0, 1.0 ] ); +var A = new Float64Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] ); + +// Create offset views... +var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element +var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*1 ); // start at 2nd element + +dger( 'column-major', 2, 3, 1.0, x1, -1, y1, -1, A, 2 ); +// A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] ``` -TODO +#### dger.ndarray( M, N, α, x, sx, ox, y, sy, oy, A, sa1, sa2, oa ) + +Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +var x = new Float64Array( [ 1.0, 1.0 ] ); +var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); + +dger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 ); +// A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +``` + +The function has the following additional parameters: + +- **sa1**: stride of the first dimension of `A`. +- **sa2**: stride of the second dimension of `A`. +- **oa**: starting index for `A`. +- **ox**: starting index for `x`. +- **oy**: starting index for `y`. + +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, + +```javascript +var Float64Array = require( '@stdlib/array/float64' ); + +var A = new Float64Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] ); +var x = new Float64Array( [ 1.0, 0.0, 1.0, 0.0 ] ); +var y = new Float64Array( [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ] ); + +dger.ndarray( 2, 3, 1.0, x, 2, 0, y, 2, 0, A, 1, 2, 0 ); +// A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +```
@@ -56,7 +135,7 @@ TODO ## Notes -- `dger()` corresponds to the [BLAS][blas] level 2 function [`dger`][dger]. +- `dger()` corresponds to the [BLAS][blas] level 2 function [`dger`][blas-dger].
@@ -69,7 +148,26 @@ TODO ```javascript -/* to-do */ +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var dger = require( '@stdlib/blas/base/dger' ); + +var opts = { + 'dtype': 'float64' +}; + +var M = 3; +var N = 5; + +var A = discreteUniform( M*N, 0, 255, opts ); +var x = discreteUniform( M, 0, 255, opts ); +var y = discreteUniform( N, 0, 255, opts ); + +dger( 'row-major', M, N, 1.0, x, 1, y, 1, A, N ); +console.log( A ); + +dger.ndarray( M, N, 1.0, x, 1, 0, y, 1, 0, A, 1, M, 0 ); +console.log(A); + ``` @@ -160,7 +258,11 @@ TODO [blas]: http://www.netlib.org/blas -[dger]: https://www.netlib.org/lapack/explore-html/dc/da8/dger_8f_source.html +[blas-dger]: https://www.netlib.org/lapack/explore-html-3.6.1/d7/d15/group__double__blas__level2_ga458222e01b4d348e9b52b9343d52f828.html + +[mdn-float64array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array + +[mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js new file mode 100755 index 000000000000..3d20265c4ee4 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js @@ -0,0 +1,105 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var pkg = require( './../package.json' ).name; +var dger = require( './../lib/dger.js' ); + + +// VARIABLES // + +var options = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - array dimension size +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + var x = uniform( N, -10.0, 10.0, options ); + var y = uniform( N, -10.0, 10.0, options ); + var A = uniform( N*N, -10.0, 10.0, options ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var z; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dger( 'row-major', N, N, 1.0, x, 1, y, 1, A, N ); + if ( isnan( z[ i%z.length ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( z[ i%z.length ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var len; + var min; + var max; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + len = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( len ); + bench( pkg+':size='+(len*len), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js new file mode 100755 index 000000000000..9c26e795904b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js @@ -0,0 +1,105 @@ +/** +* @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. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pow = require( '@stdlib/math/base/special/pow' ); +var floor = require( '@stdlib/math/base/special/floor' ); +var pkg = require( './../package.json' ).name; +var dger = require( './../lib/ndarray.js' ); + + +// VARIABLES // + +var options = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - array dimension size +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + var x = uniform( N, -10.0, 10.0, options ); + var y = uniform( N, -10.0, 10.0, options ); + var A = uniform( N*N, -10.0, 10.0, options ); + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var z; + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + z = dger( N, N, 1.0, x, 1, 0, y, 1, 0, A, N, 1, 0 ); + if ( isnan( z[ i%z.length ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( z[ i%z.length ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var len; + var min; + var max; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + len = floor( pow( pow( 10, i ), 1.0/2.0 ) ); + f = createBenchmark( len ); + bench( pkg+':ndarray:size='+(len*len), f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/base/dger/binding.gyp b/lib/node_modules/@stdlib/blas/base/dger/binding.gyp deleted file mode 100644 index 02a2799da097..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/binding.gyp +++ /dev/null @@ -1,265 +0,0 @@ -# @license Apache-2.0 -# -# Copyright (c) 2024 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# A `.gyp` file for building a Node.js native add-on. -# -# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md -# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md -{ - # List of files to include in this file: - 'includes': [ - './include.gypi', - ], - - # Define variables to be used throughout the configuration for all targets: - 'variables': { - # Target name should match the add-on export name: - 'addon_target_name%': 'addon', - - # Fortran compiler (to override -Dfortran_compiler=): - 'fortran_compiler%': 'gfortran', - - # Fortran compiler flags: - 'fflags': [ - # Specify the Fortran standard to which a program is expected to conform: - '-std=f95', - - # Indicate that the layout is free-form source code: - '-ffree-form', - - # Aggressive optimization: - '-O3', - - # Enable commonly used warning options: - '-Wall', - - # Warn if source code contains problematic language features: - '-Wextra', - - # Warn if a procedure is called without an explicit interface: - '-Wimplicit-interface', - - # Do not transform names of entities specified in Fortran source files by appending underscores (i.e., don't mangle names, thus allowing easier usage in C wrappers): - '-fno-underscoring', - - # Warn if source code contains Fortran 95 extensions and C-language constructs: - '-pedantic', - - # Compile but do not link (output is an object file): - '-c', - ], - - # Set variables based on the host OS: - 'conditions': [ - [ - 'OS=="win"', - { - # Define the object file suffix: - 'obj': 'obj', - }, - { - # Define the object file suffix: - 'obj': 'o', - } - ], # end condition (OS=="win") - ], # end conditions - }, # end variables - - # Define compile targets: - 'targets': [ - - # Target to generate an add-on: - { - # The target name should match the add-on export name: - 'target_name': '<(addon_target_name)', - - # Define dependencies: - 'dependencies': [], - - # Define directories which contain relevant include headers: - 'include_dirs': [ - # Local include directory: - '<@(include_dirs)', - ], - - # List of source files: - 'sources': [ - '<@(src_files)', - ], - - # Settings which should be applied when a target's object files are used as linker input: - 'link_settings': { - # Define libraries: - 'libraries': [ - '<@(libraries)', - ], - - # Define library directories: - 'library_dirs': [ - '<@(library_dirs)', - ], - }, - - # C/C++ compiler flags: - 'cflags': [ - # Enable commonly used warning options: - '-Wall', - - # Aggressive optimization: - '-O3', - ], - - # C specific compiler flags: - 'cflags_c': [ - # Specify the C standard to which a program is expected to conform: - '-std=c99', - ], - - # C++ specific compiler flags: - 'cflags_cpp': [ - # Specify the C++ standard to which a program is expected to conform: - '-std=c++11', - ], - - # Linker flags: - 'ldflags': [], - - # Apply conditions based on the host OS: - 'conditions': [ - [ - 'OS=="mac"', - { - # Linker flags: - 'ldflags': [ - '-undefined dynamic_lookup', - '-Wl,-no-pie', - '-Wl,-search_paths_first', - ], - }, - ], # end condition (OS=="mac") - [ - 'OS!="win"', - { - # C/C++ flags: - 'cflags': [ - # Generate platform-independent code: - '-fPIC', - ], - }, - ], # end condition (OS!="win") - ], # end conditions - - # Define custom build actions for particular inputs: - 'rules': [ - { - # Define a rule for processing Fortran files: - 'extension': 'f', - - # Define the pathnames to be used as inputs when performing processing: - 'inputs': [ - # Full path of the current input: - '<(RULE_INPUT_PATH)' - ], - - # Define the outputs produced during processing: - 'outputs': [ - # Store an output object file in a directory for placing intermediate results (only accessible within a single target): - '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).<(obj)' - ], - - # Define the rule for compiling Fortran based on the host OS: - 'conditions': [ - [ - 'OS=="win"', - - # Rule to compile Fortran on Windows: - { - 'rule_name': 'compile_fortran_windows', - 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Windows...', - - 'process_outputs_as_sources': 0, - - # Define the command-line invocation: - 'action': [ - '<(fortran_compiler)', - '<@(fflags)', - '<@(_inputs)', - '-o', - '<@(_outputs)', - ], - }, - - # Rule to compile Fortran on non-Windows: - { - 'rule_name': 'compile_fortran_linux', - 'message': 'Compiling Fortran file <(RULE_INPUT_PATH) on Linux...', - - 'process_outputs_as_sources': 1, - - # Define the command-line invocation: - 'action': [ - '<(fortran_compiler)', - '<@(fflags)', - '-fPIC', # generate platform-independent code - '<@(_inputs)', - '-o', - '<@(_outputs)', - ], - } - ], # end condition (OS=="win") - ], # end conditions - }, # end rule (extension=="f") - ], # end rules - }, # end target <(addon_target_name) - - # Target to copy a generated add-on to a standard location: - { - 'target_name': 'copy_addon', - - # Declare that the output of this target is not linked: - 'type': 'none', - - # Define dependencies: - 'dependencies': [ - # Require that the add-on be generated before building this target: - '<(addon_target_name)', - ], - - # Define a list of actions: - 'actions': [ - { - 'action_name': 'copy_addon', - 'message': 'Copying addon...', - - # Explicitly list the inputs in the command-line invocation below: - 'inputs': [], - - # Declare the expected outputs: - 'outputs': [ - '<(addon_output_dir)/<(addon_target_name).node', - ], - - # Define the command-line invocation: - 'action': [ - 'cp', - '<(PRODUCT_DIR)/<(addon_target_name).node', - '<(addon_output_dir)/<(addon_target_name).node', - ], - }, - ], # end actions - }, # end target copy_addon - ], # end targets -} diff --git a/lib/node_modules/@stdlib/blas/base/dger/docs/repl.txt b/lib/node_modules/@stdlib/blas/base/dger/docs/repl.txt new file mode 100644 index 000000000000..ffd73eded85e --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/docs/repl.txt @@ -0,0 +1,132 @@ + +{{alias}}( ord, M, N, α, x, sx, y, sy, A, lda ) + Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` + is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by + `N` matrix. + + Indexing is relative to the first index. To introduce an offset, use typed + array views. + + If `M` or `N` or `α` is equal to `0`, the function returns `A` unchanged. + + Parameters + ---------- + ord: string + Row-major (C-style) or column-major (Fortran-style) order. + + M: integer + Number of rows in `A`. + + N: integer + Number of columns in `A`. + + α: number + Scalar constant. + + x: Float64Array + First input vector. + + sx: integer + Index increment for `x`. + + y: Float64Array + Second input vector. + + sy: integer + Index increment for `y`. + + A: Float64Array + Input Matrix. + + lda: integer + Stride of the first dimension of `A` (a.k.a., leading dimension of the + matrix `A`). + + Returns + ------- + A: Float64Array + Input Matrix. + + Examples + -------- + // Standard usage: + > var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > var y = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > var A = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > var ord = 'row-major'; + > {{alias}}( ord, 2, 2, 1.0, x, 1, y, 1, A, 2 ) + [ 2.0, 3.0, 4.0, 5.0 ] + + // Advanced indexing: + > x = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > y = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > A = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > {{alias}}( ord, 2, 2, 1.0, x, -1, y, -1, A, 2 ) + [ 2.0, 3.0, 4.0, 5.0 ] + + +{{alias}}.ndarray( M, N, α, x, sx, ox, y, sy, oy, A, sa1, sa2, oa ) + Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing + semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an + `N` element vector and `A` is an `M` by `N` matrix. + + While typed array views mandate a view offset based on the underlying + buffer, the offset parameters support indexing semantics based on starting + indices. + + Parameters + ---------- + M: integer + Number of rows in `A`. + + N: integer + Number of columns in `A`. + + α: number + Scalar constant. + + x: Float64Array + First input vector. + + sx: integer + Index increment for `x`. + + ox: integer + Starting index for `x`. + + y: Float64Array + Second input vector. + + sy: integer + Index increment for `y`. + + oy: integer + Starting index for `y`. + + A: Float64Array + Input Matrix. + + sa1: integer + Stride of the first dimension of `A`. + + sa2: integer + Stride of the second dimension of `A`. + + oa: integer + Starting index for `A`. + + Returns + ------- + A: Float64Array + Input Matrix. + + Examples + -------- + > var x = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > var y = new {{alias:@stdlib/array/float64}}( [ 1.0, 1.0 ] ); + > var A = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); + > {{alias}}.ndarray( 2, 2, 1.0, x, 1, 0, y, 1, 0, A, 2, 1, 0 ) + [ 2.0, 3.0, 4.0, 5.0 ] + + See Also + -------- diff --git a/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts new file mode 100644 index 000000000000..f3ff52bbbb05 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts @@ -0,0 +1,129 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/// + +import { Layout } from '@stdlib/types/blas'; + +/** +* Interface describing `dger`. +*/ +interface Routine { + /** + * Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. + * + * @param order - storage layout + * @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed + * @param M - number of rows in the matrix `A` + * @param N - number of columns in the matrix `A` + * @param alpha - scalar constant + * @param x - first input vector + * @param strideX - `x` stride length + * @param y - second input vector + * @param strideY - `y` stride length + * @param A - input matrix + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) + * @returns `A` + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var x = new Float64Array( [ 1.0, 1.0 ] ); + * var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); + * + * dger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 ); + * // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] + */ + ( order: Layout, M: number, N: number, alpha: number, x: Float64Array, strideX: number, y: Float64Array, strideY: number, A: Float64Array, LDA: number ): Float64Array; + + /** + * Performs the rank 1 operation `A = α*x*y^T + A`, using alternative indexing semantics and where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. + * + * @param M - number of rows in the matrix `A` + * @param N - number of columns in the matrix `A` + * @param alpha - scalar constant + * @param x - first input vector + * @param strideX - `x` stride length + * @param offsetX - starting index for `x` + * @param y - second input vector + * @param strideY - `y` stride length + * @param offsetY - starting index for `y` + * @param A - input matrix + * @param strideA1 - stride of the first dimension of `A` + * @param strideA2 - stride of the second dimension of `A` + * @param offsetA - starting index for `A` + * @returns `A` + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); + * var x = new Float64Array( [ 1.0, 1.0 ] ); + * var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); + * + * dger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 ); + * // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] + */ + ndarray( M: number, N: number, alpha: number, x: Float64Array, strideX: number, offsetX: number, y: Float64Array, strideY: number, offsetY: number, A: Float64Array, strideA1: number, strideA2: number, offsetA: number ): Float64Array; +} + +/** +* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. +* +* @param order - storage layout +* @param trans - specifies whether `A` should be transposed, conjugate-transposed, or not transposed +* @param M - number of rows in the matrix `A` +* @param N - number of columns in the matrix `A` +* @param alpha - scalar constant +* @param x - first input vector +* @param strideX - `x` stride length +* @param y - second input vector +* @param strideY - `y` stride length +* @param A - input matrix +* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @returns `A` +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); +* +* dger( 'column-major', 2, 3, 1.0, x, 1, y, 1, A, 2 ); +* // A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +* +* @example +* var Float64Array = require( '@stdlib/array/float64' ); +* +* var A = new Float64Array( [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); +* +* dger.ndarray( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 1, 2, 0 ); +* // A => [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +*/ +declare var dger: Routine; + + +// EXPORTS // + +export = dger; diff --git a/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts new file mode 100644 index 000000000000..cd12e125011a --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts @@ -0,0 +1,449 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import dger = require( './index' ); + + +// TESTS // + +// The function returns a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectType Float64Array +} + +// The compiler throws an error if the function is provided a first argument which is not a string... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 10, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( true, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( false, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( null, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( undefined, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( [], 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( {}, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( ( x: number ): number => x, 10, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', '10', 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', true, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', false, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', null, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', undefined, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', [], 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', {}, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', ( x: number ): number => x, 10, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, '10', 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, true, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, false, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, null, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, undefined, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, [], 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, {}, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, ( x: number ): number => x, 1.0, x, 1, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, '10', x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, true, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, false, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, null, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, undefined, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, [], x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, {}, x, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, ( x: number ): number => x, x, 1, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a Float64Array... +{ + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, 10, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, '10', 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, true, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, false, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, null, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, undefined, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, [ '1' ], 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, {}, 1, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, ( x: number ): number => x, 1, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, x, '10', y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, true, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, false, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, null, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, undefined, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, [], y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, {}, y, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, ( x: number ): number => x, y, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, x, 1, 10, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, '10', 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, true, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, false, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, null, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, undefined, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, [ '1' ], 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, {}, 1, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, ( x: number ): number => x, 1, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, x, 1, y, '10', A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, true, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, false, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, null, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, undefined, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, [], A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, {}, A, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, ( x: number ): number => x, A, 10 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, 10, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, '10', 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, true, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, false, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, null, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, undefined, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, [ '1' ], 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, {}, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, ( x: number ): number => x, 1 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, '10' ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, true ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, false ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, null ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, undefined ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, [] ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, {} ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided an unsupported number of arguments... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger(); // $ExpectError + dger( 'row-major' ); // $ExpectError + dger( 'row-major', 10 ); // $ExpectError + dger( 'row-major', 10, 10 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1 ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A ); // $ExpectError + dger( 'row-major', 10, 10, 1.0, x, 1, y, 1, A, 10, 10 ); // $ExpectError +} + +// Attached to main export is an `ndarray` method which returns a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectType Float64Array +} + +// The compiler throws an error if the function is provided a first argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( '10', 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( true, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( false, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( null, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( undefined, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( [], 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( {}, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( ( x: number ): number => x, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a second argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, '10', 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, true, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, false, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, null, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, undefined, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, [], 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, {}, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, ( x: number ): number => x, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a third argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, '10', x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, true, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, false, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, null, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, undefined, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, [], x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, {}, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, ( x: number ): number => x, x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fourth argument which is not a Float64Array... +{ + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, 10, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, '10', 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, true, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, false, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, null, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, undefined, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, [ '1' ], 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, {}, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, ( x: number ): number => x, 1, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a fifth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, '10', 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, true, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, false, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, null, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, undefined, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, [], 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, {}, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, ( x: number ): number => x, 0, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a sixth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, '10', y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, true, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, false, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, null, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, undefined, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, [], y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, {}, y, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, ( x: number ): number => x, y, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a seventh argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, 10, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, '10', 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, true, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, false, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, null, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, undefined, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, [ '1' ], 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, {}, 1, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, ( x: number ): number => x, 1, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eighth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, '10', 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, true, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, false, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, null, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, undefined, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, [], 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, {}, 0, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, ( x: number ): number => x, 0, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a ninth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, '10', A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, true, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, false, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, null, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, undefined, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, [], A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, {}, A, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, ( x: number ): number => x, A, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a tenth argument which is not a Float64Array... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, 10, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, '10', 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, true, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, false, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, null, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, undefined, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, [ '1' ], 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, {}, 10, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, ( x: number ): number => x, 10, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided an eleventh argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, '10', 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, true, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, false, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, null, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, undefined, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, [], 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, {}, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, ( x: number ): number => x, 1, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a twelfth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, '10', 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, true, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, false, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, null, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, undefined, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, [], 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, {}, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, ( x: number ): number => x, 0 ); // $ExpectError +} + +// The compiler throws an error if the function is provided a thirteenth argument which is not a number... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, '10' ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, true ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, false ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, null ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, undefined ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, [] ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, {} ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... +{ + const x = new Float64Array( 10 ); + const y = new Float64Array( 10 ); + const A = new Float64Array( 20 ); + + dger.ndarray(); // $ExpectError + dger.ndarray( 10 ); // $ExpectError + dger.ndarray( 10, 10 ); // $ExpectError + dger.ndarray( 10, 10, 1.0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1 ); // $ExpectError + dger.ndarray( 10, 10, 1.0, x, 1, 0, y, 1, 0, A, 10, 1, 0, 10 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile b/lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile old mode 100644 new mode 100755 diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c old mode 100644 new mode 100755 diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/index.js b/lib/node_modules/@stdlib/blas/base/dger/examples/index.js old mode 100644 new mode 100755 index 9e6f484ac7b4..00bd66217fb6 --- a/lib/node_modules/@stdlib/blas/base/dger/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/dger/examples/index.js @@ -16,41 +16,24 @@ * limitations under the License. */ -/* eslint-disable */ // FIXME - 'use strict'; var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); -var zeros = require( '@stdlib/array/zeros' ); var dger = require( './../lib' ); -// var M = 4; -// var N = 3; -// var B = zeros( M*N, 'float64' ); - -// var opts = { -// 'dtype': 'float64' -// }; -// var x = discreteUniform( M, 0, 500, opts ); -// console.log( x ); - -// var y = discreteUniform( N, 0, 255, opts ); -// console.log( y ); - -// dger( 'row-major', N, M, 1.0, y, 1, x, 1, B, N ); -// console.log( B ); - -var Float64Array = require( '@stdlib/array/float64' ); +var opts = { + 'dtype': 'float32' +}; -var M = 4; -var N = 3; -var B = zeros( M*N, 'float64' ); +var M = 3; +var N = 5; -var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -console.log( x ); +var A = discreteUniform( M*N, 0, 255, opts ); +var x = discreteUniform( M, 0, 255, opts ); +var y = discreteUniform( N, 0, 255, opts ); -var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); -console.log( y ); +dger( 'row-major', M, N, 1.0, x, 1, y, 1, A, N ); +console.log( A ); -dger( 'row-major', N, M, 1.0, y, 1, x, 1, B, M ); -console.log( B ); +dger.ndarray( M, N, 1.0, x, 1, 0, y, 1, 0, A, 1, M, 0 ); +console.log( A ); diff --git a/lib/node_modules/@stdlib/blas/base/dger/include.gypi b/lib/node_modules/@stdlib/blas/base/dger/include.gypi deleted file mode 100644 index 497aeca15320..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/include.gypi +++ /dev/null @@ -1,70 +0,0 @@ -# @license Apache-2.0 -# -# Copyright (c) 2024 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# A GYP include file for building a Node.js native add-on. -# -# Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors. -# -# Main documentation: -# -# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md -# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md -# -# Variable nesting hacks: -# -# [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi -# [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004 -{ - # Define variables to be used throughout the configuration for all targets: - 'variables': { - 'variables': { - # Host BLAS library (to override -Dblas=): - 'blas%': '', - - # Path to BLAS library (to override -Dblas_dir=): - 'blas_dir%': '', - }, # end variables - - # Source directory: - 'src_dir': './src', - - # Include directories: - 'include_dirs': [ - '<@(blas_dir)', - ' [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +*/ +function dger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-params, max-len + var isrm; + var tmp; + var ix1; + var iy1; + var sa0; + var sa1; + var i0; + var i1; + var oa; + + // Note on variable naming convention: sa#, ix#, i# where # corresponds to the loop number, with `0` being the innermost loop... + + isrm = isRowMajor( [ strideA1, strideA2 ] ); + if ( isrm ) { + // For row-major matrices, the last dimension has the fastest changing index... + sa0 = strideA2; // stride for innermost loop + sa1 = strideA1; // stride for outermost loop + } else { // isColMajor + // For column-major matrices, the first dimension has the fastest changing index... + sa0 = strideA1; // stride for innermost loop + sa1 = strideA2; // stride for outermost loop + } + if ( !isrm ) { + iy1 = offsetY; + for ( i1 = 0; i1 < N; i1++ ) { + if ( y[ iy1 ] !== 0.0 ) { + tmp = alpha * y[ iy1 ]; + ix1 = offsetX; + oa = offsetA + (sa1*i1); + for ( i0 = 0; i0 < M; i0++ ) { + A[ oa+(sa0*i0) ] += x[ ix1 ] * tmp; + ix1 += strideX; + } + } + iy1 += strideY; + } + return A; + } + ix1 = offsetX; + for ( i1 = 0; i1 < M; i1++ ) { + if ( x[ ix1 ] !== 0.0 ) { + tmp = alpha * x[ ix1 ]; + iy1 = offsetY; + oa = offsetA + (sa1*i1); + for ( i0 = 0; i0 < N; i0++ ) { + A[ oa+(sa0*i0) ] += y[ iy1 ] * tmp; + iy1 += strideY; + } + } + ix1 += strideX; + } + return A; +} + + +// EXPORTS // + +module.exports = dger; diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js b/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js old mode 100644 new mode 100755 index c3f3eb2fa88e..33f2b437dbd7 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js +++ b/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js @@ -16,45 +16,83 @@ * limitations under the License. */ -/* eslint-disable */ // FIXME - 'use strict'; +// MODULES // + +var stride2offset = require( '@stdlib/strided/base/stride2offset' ); +var isLayout = require( '@stdlib/blas/base/assert/is-layout' ); +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + // MAIN // /** -* Performs the rank 1 operation `A = alpha*x*y^T + A`. +* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. * -* @param {*} order - storage layout +* @param {string} order - storage layout * @param {NonNegativeInteger} M - number of rows in the matrix `A` * @param {NonNegativeInteger} N - number of columns in the matrix `A` * @param {number} alpha - scalar constant -* @param {Float64Array} x - an `M` element vector +* @param {Float64Array} x - first input vector * @param {integer} strideX - `x` stride length -* @param {Float64Array} y - an `N` element vector +* @param {Float64Array} y - second input vector * @param {integer} strideY - `y` stride length -* @param {Float64Array} A - matrix of coefficients +* @param {Float64Array} A - input matrix * @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @throws {TypeError} first argument must be a valid order +* @throws {RangeError} second argument must be a nonnegative integer +* @throws {RangeError} third argument must be a nonnegative integer +* @throws {RangeError} sixth argument must be non-zero +* @throws {RangeError} eighth argument must be non-zero * @returns {Float64Array} `A` * * @example * var Float64Array = require( '@stdlib/array/float64' ); * -* var M = 4; -* var N = 3; -* -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); * -* dger( 'row-major', N, M, 1.0, y, 1, x, 1, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] +* dger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 ); +* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] */ function dger( order, M, N, alpha, x, strideX, y, strideY, A, LDA ) { - // TODO: implementation + var sa1; + var sa2; + var ox; + var oy; - return A; + if ( !isLayout( order ) ) { + throw new TypeError( format( 'invalid argument. First argument must be a valid order. Value: `%s`.', order ) ); + } + if ( M < 0 ) { + throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', M ) ); + } + if ( N < 0 ) { + throw new RangeError( format( 'invalid argument. Third argument must be a nonnegative integer. Value: `%d`.', N ) ); + } + if ( strideX === 0 ) { + throw new RangeError( format( 'invalid argument. Sixth argument must be non-zero.' ) ); + } + if ( strideY === 0 ) { + throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero.' ) ); + } + // Check if we can early return... + if ( M === 0 || N === 0 || alpha === 0.0 ) { + return A; + } + ox = stride2offset( M, strideX ); + oy = stride2offset( N, strideY ); + if ( order === 'column-major' ) { + sa1 = 1; + sa2 = LDA; + } else { // order === 'row-major' + sa1 = LDA; + sa2 = 1; + } + return base( M, N, alpha, x, strideX, ox, y, strideY, oy, A, sa1, sa2, 0 ); } diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/dger.native.js b/lib/node_modules/@stdlib/blas/base/dger/lib/dger.native.js deleted file mode 100644 index 80779dd74619..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/dger.native.js +++ /dev/null @@ -1,72 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var resolve = require( '@stdlib/blas/base/layout-resolve-enum' ); -var format = require( '@stdlib/string/format' ); -var addon = require( './../src/addon.node' ); - - -// MAIN // - -/** -* Performs the rank 1 operation `A = alpha*x*y^T + A`. -* -* @param {*} order - storage layout -* @param {NonNegativeInteger} M - number of rows in the matrix `A` -* @param {NonNegativeInteger} N - number of columns in the matrix `A` -* @param {number} alpha - scalar constant -* @param {Float64Array} x - an `M` element vector -* @param {integer} strideX - `x` stride length -* @param {Float64Array} y - an `N` element vector -* @param {integer} strideY - `y` stride length -* @param {Float64Array} A - matrix of coefficients -* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -* @throws {TypeError} first argument must be a supported BLAS memory layout -* @returns {Float64Array} `A` -* -* @example -* var Float64Array = require( '@stdlib/array/float64' ); -* -* var M = 4; -* var N = 3; -* -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); -* -* dger( 'row-major', N, M, 1.0, y, 1, x, 1, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] -*/ -function dger( order, M, N, alpha, x, strideX, y, strideY, A, LDA ) { - var ord = resolve( order ); - if ( ord === null ) { - throw new TypeError( format( 'invalid argument. First argument must be a supported BLAS memory layout. Value: `%s`.', order ) ); - } - addon( ord, M, N, alpha, x, strideX, y, strideY, A, LDA ); - return A; -} - - -// EXPORTS // - -module.exports = dger; diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/index.js b/lib/node_modules/@stdlib/blas/base/dger/lib/index.js old mode 100644 new mode 100755 index 5641b87166fd..2222c83ee6b3 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/index.js +++ b/lib/node_modules/@stdlib/blas/base/dger/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* BLAS level 2 routine to perform the rank 1 operation `A = alpha*x*y^T + A`. +* BLAS level 2 routine to perform the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. * * @module @stdlib/blas/base/dger * @@ -27,31 +27,23 @@ * var Float64Array = require( '@stdlib/array/float64' ); * var dger = require( '@stdlib/blas/base/dger' ); * -* var M = 4; -* var N = 3; +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); * -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); -* -* dger( 'row-major', N, M, 1.0, y, 1, x, 1, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] +* dger( 'row-major', 2, 3, 1.0, x, 1, y, 1, A, 3 ); +* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); * var dger = require( '@stdlib/blas/base/dger' ); * -* var M = 4; -* var N = 3; -* -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); * -* dger.ndarray( 'row-major', N, M, 1.0, y, 1, 0, x, 1, 0, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] +* dger.ndarray( 'row-major', 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 ); +* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] */ // MODULES // diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/main.js b/lib/node_modules/@stdlib/blas/base/dger/lib/main.js old mode 100644 new mode 100755 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/native.js b/lib/node_modules/@stdlib/blas/base/dger/lib/native.js deleted file mode 100644 index 18c0998f60c6..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/native.js +++ /dev/null @@ -1,35 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); -var dger = require( './dger.native.js' ); -var ndarray = require( './ndarray.native.js' ); - - -// MAIN // - -setReadOnly( dger, 'ndarray', ndarray ); - - -// EXPORTS // - -module.exports = dger; diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js old mode 100644 new mode 100755 index 5bc5629a9200..79dead9cb9a2 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js @@ -16,48 +16,66 @@ * limitations under the License. */ -/* eslint-disable */ // FIXME - 'use strict'; +// MODULES // + +var format = require( '@stdlib/string/format' ); +var base = require( './base.js' ); + + // MAIN // /** -* Performs the rank 1 operation `A = alpha*x*y^T + A`. +* Performs the rank 1 operation `A = α*x*y^T + A`, where `α` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector and `A` is an `M` by `N` matrix. * -* @param {*} order - storage layout * @param {NonNegativeInteger} M - number of rows in the matrix `A` * @param {NonNegativeInteger} N - number of columns in the matrix `A` * @param {number} alpha - scalar constant -* @param {Float64Array} x - an `M` element vector +* @param {Float64Array} x - first input vector * @param {integer} strideX - `x` stride length -* @param {NonNegativeInteger} offsetX - starting `x` index -* @param {Float64Array} y - an `N` element vector +* @param {NonNegativeInteger} offsetX - starting index for `x` +* @param {Float64Array} y - second input vector * @param {integer} strideY - `y` stride length -* @param {NonNegativeInteger} offsetY - starting `y` index -* @param {Float64Array} A - matrix of coefficients -* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) +* @param {NonNegativeInteger} offsetY - starting index for `y` +* @param {Float64Array} A - input matrix +* @param {integer} strideA1 - stride of the first dimension of `A` +* @param {integer} strideA2 - stride of the second dimension of `A` +* @param {NonNegativeInteger} offsetA - starting index for `A` +* @throws {RangeError} first argument must be a nonnegative integer +* @throws {RangeError} second argument must be a nonnegative integer +* @throws {RangeError} fifth argument must be non-zero +* @throws {RangeError} eighth argument must be non-zero * @returns {Float64Array} `A` * * @example * var Float64Array = require( '@stdlib/array/float64' ); * -* var M = 4; -* var N = 3; +* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] ); +* var x = new Float64Array( [ 1.0, 1.0 ] ); +* var y = new Float64Array( [ 1.0, 1.0, 1.0 ] ); * -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); -* -* dger( 'row-major', N, M, 1.0, y, 1, 0, x, 1, 0, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] +* dger( 2, 3, 1.0, x, 1, 0, y, 1, 0, A, 3, 1, 0 ); +* // A => [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] */ -function dger( order, M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, LDA ) { - - // TODO: implementation - - return A; +function dger( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ) { // eslint-disable-line max-params, max-len + if ( M < 0 ) { + throw new RangeError( format( 'invalid argument. First argument must be a nonnegative integer. Value: `%d`.', M ) ); + } + if ( N < 0 ) { + throw new RangeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%d`.', N ) ); + } + if ( strideX === 0 ) { + throw new RangeError( format( 'invalid argument. Fifth argument must be non-zero.' ) ); + } + if ( strideY === 0 ) { + throw new RangeError( format( 'invalid argument. Eighth argument must be non-zero.' ) ); + } + // Check if we can early return... + if ( M === 0 || N === 0 || alpha === 0.0 ) { + return A; + } + return base( M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, strideA1, strideA2, offsetA ); // eslint-disable-line max-len } diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.native.js deleted file mode 100644 index c91cf81824e2..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.native.js +++ /dev/null @@ -1,86 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var minViewBufferIndex = require( '@stdlib/strided/base/min-view-buffer-index' ); -var offsetView = require( '@stdlib/strided/base/offset-view' ); -var resolve = require( '@stdlib/blas/base/layout-resolve-enum' ); -var format = require( '@stdlib/string/format' ); -var addon = require( './dger.native.js' ); - - -// MAIN // - -/** -* Performs the rank 1 operation `A = alpha*x*y^T + A`. -* -* @param {*} order - storage layout -* @param {NonNegativeInteger} M - number of rows in the matrix `A` -* @param {NonNegativeInteger} N - number of columns in the matrix `A` -* @param {number} alpha - scalar constant -* @param {Float64Array} x - an `M` element vector -* @param {integer} strideX - `x` stride length -* @param {NonNegativeInteger} offsetX - starting `x` index -* @param {Float64Array} y - an `N` element vector -* @param {integer} strideY - `y` stride length -* @param {NonNegativeInteger} offsetY - starting `y` index -* @param {Float64Array} A - matrix of coefficients -* @param {PositiveInteger} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -* @throws {TypeError} first argument must be a supported BLAS memory layout -* @returns {Float64Array} `A` -* -* @example -* var Float64Array = require( '@stdlib/array/float64' ); -* -* var M = 4; -* var N = 3; -* -* var B = new Float64Array( M*N ); -* -* var x = new Float64Array( [ 0.0, 1.0, 2.0, 3.0 ] ); -* var y = new Float64Array( [ 1.0, 4.0, 0.0 ] ); -* -* dger( 'row-major', N, M, 1.0, y, 1, 0, x, 1, 0, B, M ); -* // B => [ 0.0, 1.0, 2.0, 3.0, 0.0, 4.0, 8.0, 12.0, 0.0, 0.0, 0.0, 0.0 ] -*/ -function dger( order, M, N, alpha, x, strideX, offsetX, y, strideY, offsetY, A, LDA ) { // eslint-disable-line max-len, max-params - var viewX; - var viewY; - var ord; - - ord = resolve( order ); - if ( ord === null ) { - throw new TypeError( format( 'invalid argument. First argument must be a supported BLAS memory layout. Value: `%s`.', order ) ); - } - offsetX = minViewBufferIndex( N, strideX, offsetX ); - offsetY = minViewBufferIndex( N, strideY, offsetY ); - - viewX = offsetView( x, offsetX ); - viewY = offsetView( y, offsetY ); - - addon( ord, M, N, alpha, viewX, strideX, viewY, strideY, A, LDA ); - return A; -} - - -// EXPORTS // - -module.exports = dger; diff --git a/lib/node_modules/@stdlib/blas/base/dger/manifest.json b/lib/node_modules/@stdlib/blas/base/dger/manifest.json deleted file mode 100644 index 7494358b4d85..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/manifest.json +++ /dev/null @@ -1,433 +0,0 @@ -{ - "options": { - "task": "build", - "os": "linux", - "blas": "", - "wasm": false - }, - "fields": [ - { - "field": "src", - "resolve": true, - "relative": true - }, - { - "field": "include", - "resolve": true, - "relative": true - }, - { - "field": "libraries", - "resolve": false, - "relative": false - }, - { - "field": "libpath", - "resolve": true, - "relative": false - } - ], - "confs": [ - { - "task": "build", - "os": "linux", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.f", - "./src/dger_f.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "linux", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - { - "task": "examples", - "os": "linux", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - - { - "task": "build", - "os": "linux", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "linux", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - { - "task": "examples", - "os": "linux", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - - { - "task": "build", - "os": "mac", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.f", - "./src/dger_f.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "mac", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - { - "task": "examples", - "os": "mac", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - - { - "task": "build", - "os": "mac", - "blas": "apple_accelerate_framework", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lblas" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "mac", - "blas": "apple_accelerate_framework", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lblas" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - { - "task": "examples", - "os": "mac", - "blas": "apple_accelerate_framework", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lblas" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - - { - "task": "build", - "os": "mac", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "mac", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - { - "task": "examples", - "os": "mac", - "blas": "openblas", - "wasm": false, - "src": [ - "./src/dger_cblas.c" - ], - "include": [ - "./include" - ], - "libraries": [ - "-lopenblas", - "-lpthread" - ], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared" - ] - }, - - { - "task": "build", - "os": "win", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla", - "@stdlib/napi/export", - "@stdlib/napi/argv", - "@stdlib/napi/argv-int64", - "@stdlib/napi/argv-int32", - "@stdlib/napi/argv-strided-float64array", - "@stdlib/napi/argv-double" - ] - }, - { - "task": "benchmark", - "os": "win", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - { - "task": "examples", - "os": "win", - "blas": "", - "wasm": false, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - }, - - { - "task": "build", - "os": "", - "blas": "", - "wasm": true, - "src": [ - "./src/dger.c" - ], - "include": [ - "./include" - ], - "libraries": [], - "libpath": [], - "dependencies": [ - "@stdlib/blas/base/shared", - "@stdlib/blas/base/xerbla" - ] - } - ] -} diff --git a/lib/node_modules/@stdlib/blas/base/dger/package.json b/lib/node_modules/@stdlib/blas/base/dger/package.json old mode 100644 new mode 100755 index 62732f278dd4..a4e79026e71d --- a/lib/node_modules/@stdlib/blas/base/dger/package.json +++ b/lib/node_modules/@stdlib/blas/base/dger/package.json @@ -15,12 +15,10 @@ ], "main": "./lib", "browser": "./lib/main.js", - "gypfile": true, "directories": { "example": "./examples", - "include": "./include", + "doc": "./docs", "lib": "./lib", - "src": "./src", "test": "./test" }, "types": "./docs/types", diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/Makefile b/lib/node_modules/@stdlib/blas/base/dger/src/Makefile deleted file mode 100644 index bcf18aa46655..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2024 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# VARIABLES # - -ifndef VERBOSE - QUIET := @ -else - QUIET := -endif - -# Determine the OS ([1][1], [2][2]). -# -# [1]: https://en.wikipedia.org/wiki/Uname#Examples -# [2]: http://stackoverflow.com/a/27776822/2225624 -OS ?= $(shell uname) -ifneq (, $(findstring MINGW,$(OS))) - OS := WINNT -else -ifneq (, $(findstring MSYS,$(OS))) - OS := WINNT -else -ifneq (, $(findstring CYGWIN,$(OS))) - OS := WINNT -else -ifneq (, $(findstring Windows_NT,$(OS))) - OS := WINNT -endif -endif -endif -endif - - -# RULES # - -#/ -# Removes generated files for building an add-on. -# -# @example -# make clean-addon -#/ -clean-addon: - $(QUIET) -rm -f *.o *.node - -.PHONY: clean-addon - -#/ -# Removes generated files. -# -# @example -# make clean -#/ -clean: clean-addon - -.PHONY: clean diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/addon.c b/lib/node_modules/@stdlib/blas/base/dger/src/addon.c deleted file mode 100644 index 10b035c54414..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/addon.c +++ /dev/null @@ -1,61 +0,0 @@ - -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/base/dger.h" -#include "stdlib/blas/base/shared.h" -#include "stdlib/napi/export.h" -#include "stdlib/napi/argv.h" -#include "stdlib/napi/argv_int64.h" -#include "stdlib/napi/argv_int32.h" -#include "stdlib/napi/argv_double.h" -#include "stdlib/napi/argv_strided_float64array.h" -#include - -/** -* Receives JavaScript callback invocation data. -* -* @param env environment under which the function is invoked -* @param info callback data -* @return Node-API value -*/ -static napi_value addon( napi_env env, napi_callback_info info ) { - STDLIB_NAPI_ARGV( env, info, argv, argc, 10 ); - - STDLIB_NAPI_ARGV_INT32( env, layout, argv, 0 ); - - STDLIB_NAPI_ARGV_INT64( env, M, argv, 1 ); - STDLIB_NAPI_ARGV_INT64( env, N, argv, 2 ); - STDLIB_NAPI_ARGV_INT64( env, LDA, argv, 9 ); - - STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 3 ); - - STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 5 ); - STDLIB_NAPI_ARGV_INT64( env, strideY, argv, 7 ); - - STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, M, strideX, argv, 4 ); - STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, Y, N, strideY, argv, 6 ); - - STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, A, ((M-1)*LDA) + N, 1, argv, 8 ); - - API_SUFFIX(c_dger)( layout, M, N, alpha, X, strideX, Y, strideY, A, LDA ); - - return NULL; -} - -STDLIB_NAPI_MODULE_EXPORT_FCN( addon ) diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/dger.c b/lib/node_modules/@stdlib/blas/base/dger/src/dger.c deleted file mode 100644 index c96e481b7293..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/dger.c +++ /dev/null @@ -1,158 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/base/dger.h" -#include "stdlib/blas/base/xerbla.h" -#include "stdlib/blas/base/shared.h" - -/** -* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix. -* -* ## Notes -* -* - The function follows the CBLAS interface which reflects the corresponding Fortran interface, which in turn assumes column-major order. As a matrix stored in row-major order is equivalent to storing the matrix's transpose in column-major order, we can interpret an M-by-N row-major matrix "B" as the matrix "A^T" stored in column-major. In which case, we can derive an update equation for `B` as follows: -* -* ```tex -* \begin{align*} -* B &= A^T \\ -* &= (\alpha \bar{x} \bar{y}^T + A)^T \\ -* &= (\alpha \bar{x} \bar{y}^T)^T + A^T \\ -* &= \alpha (\bar{x} \bar{y}^T)^T + A^T \\ -* &= \alpha \bar{y} \bar{x}^T + A^T \\ -* &= \alpha \bar{y} \bar{x}^T + B -* \end{align*} -* ``` -* -* Accordingly, the C calling convention for row-major order is to swap the order of input arguments such that for a column-major `A` where the stride of the "major" (outer) dimension is `LDA = N` -* -* ```c -* c_dger( CblasColMajor, M, N, alpha, X, strideX, Y, strideY, A, N ) -* ``` -* -* and for a row-major `B = A^T` where the stride of the "major" (outer) dimension is `LDA = M` -* -* ```c -* c_dger( CblasRowMajor, N, M, alpha, Y, strideY, X, strideX, A^T, M ) -* ``` -* -* @param layout storage layout -* @param M number of rows in the matrix `A` -* @param N number of columns in the matrix `A` -* @param alpha scalar constant -* @param X an `M` element vector -* @param strideX X stride length -* @param Y an `N` element vector -* @param strideY Y stride length -* @param A matrix of coefficients -* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -*/ -void API_SUFFIX(c_dger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, double *Y, const CBLAS_INT strideY, double *A, const CBLAS_INT LDA ) { - CBLAS_INT info; - CBLAS_INT sx; - CBLAS_INT sy; - CBLAS_INT ix; - CBLAS_INT jy; - CBLAS_INT kx; - CBLAS_INT i; - CBLAS_INT j; - CBLAS_INT m; - CBLAS_INT n; - double tmp; - double *x; - double *y; - - // Perform input argument validation... - info = 0; - if ( M < 0 ) { - info = 1; - } else if ( N < 0 ) { - info = 2; - } else if ( strideX == 0 ) { - info = 5; - } else if ( strideY == 0 ) { - info = 7; - } else { - if ( M < 1 ) { - j = 1; - } else { - j = M; - } - if ( LDA < j ) { - info = 9; - } - } - if ( info != 0 ) { - c_xerbla( info, "c_dger", "" ); - return; - } - // Check whether we can avoid computation altogether... - if ( M == 0 || N == 0 || alpha == 0.0 ) { - return; - } - // When provided a row-major matrix, we need to swap arguments... - if ( layout == CblasRowMajor ) { - x = Y; - y = X; - m = N; - n = M; - sx = strideY; - sy = strideX; - } else { - x = X; - y = Y; - m = M; - n = N; - sx = strideX; - sy = strideY; - } - // Proceed with computation... - if ( sy > 0 ) { - jy = 0; - } else { - jy = ( 1 - n ) * sy; - } - if ( sx == 1 ) { - for ( j = 0; j < n; j++ ) { - if ( y[ jy ] != 0.0 ) { - tmp = alpha * y[ jy ]; - for ( i = 0; i < m; i++ ) { - A[ (j*LDA)+i ] += x[ i ] * tmp; // per above, x has unit stride - } - } - jy += sy; - } - return; - } - if ( sx > 0 ) { - kx = 0; - } else { - kx = ( 1 - m ) * sx; - } - for ( j = 0; j < n; j++ ) { - if ( y[ jy ] != 0.0 ) { - tmp = alpha * y[ jy ]; - ix = kx; - for ( i = 0; i < m; i++ ) { - A[ (j*LDA)+i ] += x[ ix ] * tmp; - ix += sx; - } - } - jy += sy; - } - return; -} diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/dger.f b/lib/node_modules/@stdlib/blas/base/dger/src/dger.f deleted file mode 100644 index 0a56eb9da5c4..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/dger.f +++ /dev/null @@ -1,148 +0,0 @@ -!> -! @license Apache-2.0 -! -! Copyright (c) 2024 The Stdlib Authors. -! -! Licensed under the Apache License, Version 2.0 (the "License"); -! you may not use this file except in compliance with the License. -! You may obtain a copy of the License at -! -! http://www.apache.org/licenses/LICENSE-2.0 -! -! Unless required by applicable law or agreed to in writing, software -! distributed under the License is distributed on an "AS IS" BASIS, -! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -! See the License for the specific language governing permissions and -! limitations under the License. -!< - -!> Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix. -! -! ## Notes -! -! * Modified version of reference BLAS routine (version 3.12.0). Updated to "free form" Fortran 95. -! -! ## Authors -! -! * Univ. of Tennessee -! * Univ. of California Berkeley -! * Univ. of Colorado Denver -! * NAG Ltd. -! -! ## History -! -! * Written on 22-October-1986. -! -! - Jack Dongarra, Argonne National Lab. -! - Jermey Du Croz, Nag Central Office. -! - Sven Hammarling, Nag Central Office. -! - Richard Hanson, Sandia National Labs. -! -! ## License -! -! From : -! -! > The reference BLAS is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web. Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors. -! > -! > Like all software, it is copyrighted. It is not trademarked, but we do ask the following: -! > -! > * If you modify the source for these routines we ask that you change the name of the routine and comment the changes made to the original. -! > -! > * We will gladly answer any questions regarding the software. If a modification is done, however, it is the responsibility of the person who modified the routine to provide support. -! -! @param {integer} M - number of rows in the matrix `A` -! @param {integer} N - number of columns in the matrix `A` -! @param {double} alpha - scalar constant -! @param {Array} X - an `M` element vector -! @param {integer} strideX - `X` stride length -! @param {Array} Y - an `N` element vector -! @param {integer} strideY - `Y` stride length -! @param {Array} A - matrix of coefficients -! @param {integer} LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -!< -subroutine dger( M, N, alpha, X, strideX, Y, strideY, A, LDA ) - implicit none - ! .. - ! Internal parameters: - integer, parameter :: dp=kind(0.0d0) ! double-precision - ! .. - ! Scalar arguments: - real(dp) :: alpha - integer :: strideX, strideY, LDA, M, N - ! .. - ! Array arguments: - real(dp) :: A(LDA,*), X(*), Y(*) - ! .. - ! Local scalars: - real(dp) :: temp - integer :: i, info, ix, j, jy, kx - ! .. - ! External functions: - interface - subroutine xerbla( srname, info ) - character*(*) :: srname - integer :: info - end subroutine xerbla - end interface - ! .. - ! Intrinsic functions: - intrinsic max - ! .. - ! Validate input arguments... - info = 0 - if ( M < 0 ) then - info = 1 - else if ( N < 0 ) then - info = 2 - else if ( strideX == 0 ) then - info = 5 - else if ( strideY == 0 ) then - info = 7 - else if ( LDA < max( 1, M ) ) then - info = 9 - end if - if ( info /= 0 ) then - call xerbla( 'dger ', info ) - return - end if - ! .. - ! Check whether we can avoid computation altogether... - if ( M == 0 .OR. N == 0 .OR. alpha == 0.0d0 ) then - return - end if - ! .. - if ( strideY > 0 ) then - jy = 1 - else - jy = 1 - ( (N-1) * strideY ) - end if - if ( strideX == 1 ) then - do j = 1, N - if ( Y( jy ) /= 0.0d0 ) then - temp = alpha * Y( jy ) - do i = 1, M - A( i, j ) = A( i, j ) + ( X( i ) * temp ) - end do - end if - jy = jy + strideY - end do - else - if ( strideX > 0 ) then - kx = 1 - else - kx = 1 - ( (M-1) * strideX ) - end if - do j = 1, N - if ( Y( jy ) /= 0.0d0 ) then - temp = alpha * Y( jy ) - ix = kx - do i = 1, M - A( i, j ) = A( i, j ) + ( X( ix ) * temp ) - ix = ix + strideX - end do - end if - jy = jy + strideY - end do - end if - return -end subroutine dger \ No newline at end of file diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/dger_cblas.c b/lib/node_modules/@stdlib/blas/base/dger/src/dger_cblas.c deleted file mode 100644 index d2445a4ed309..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/dger_cblas.c +++ /dev/null @@ -1,39 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/base/dger.h" -#include "stdlib/blas/base/dger_cblas.h" -#include "stdlib/blas/base/shared.h" - -/** -* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix. -* -* @param layout storage layout -* @param M number of rows in the matrix `A` -* @param N number of columns in the matrix `A` -* @param alpha scalar constant -* @param X an `M` element vector -* @param strideX X stride length -* @param Y an `N` element vector -* @param strideY Y stride length -* @param A matrix of coefficients -* @param LDA index of the first dimension of `A` -*/ -void API_SUFFIX(c_dger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const double alpha, const double *X, const CBLAS_INT strideX, const double *Y, const CBLAS_INT strideY, double *A, const CBLAS_INT LDA ) { - API_SUFFIX(cblas_dger)( layout, M, N, alpha, X, strideX, Y, strideY, A, LDA ); -} diff --git a/lib/node_modules/@stdlib/blas/base/dger/src/dger_f.c b/lib/node_modules/@stdlib/blas/base/dger/src/dger_f.c deleted file mode 100644 index 9f5a8d88af0e..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/src/dger_f.c +++ /dev/null @@ -1,55 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/base/dger.h" -#include "stdlib/blas/base/dger_fortran.h" -#include "stdlib/blas/base/shared.h" -#include "stdlib/blas/base/xerbla.h" - -/** -* Performs the rank 1 operation `A = alpha*x*y^T + A`, where `alpha` is a scalar, `x` is an `M` element vector, `y` is an `N` element vector, and `A` is an `M`-by-`N` matrix. -* -* @param layout storage layout -* @param M number of rows in the matrix `A` -* @param N number of columns in the matrix `A` -* @param alpha scalar constant -* @param X an `M` element vector -* @param strideX X stride length -* @param Y an `N` element vector -* @param strideY Y stride length -* @param A matrix of coefficients -* @param LDA stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) -*/ -void API_SUFFIX(c_dger)( const CBLAS_LAYOUT layout, const CBLAS_INT M, const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, double *Y, const CBLAS_INT strideY, double *A, const CBLAS_INT LDA ) { - extern int RowMajorStrg; // global flag - - RowMajorStrg = 0; - if ( layout == CblasColMajor ) { - dger( &M, &N, &alpha, X, &strideX, Y, &strideY, A, &LDA ); - return; - } - if ( layout == CblasRowMajor ) { - RowMajorStrg = 1; - dger( &N, &M, &alpha, Y, &strideY, X, &strideX, A, &LDA ); - RowMajorStrg = 0; - return; - } - c_xerbla( 1, "c_dger", "Error: invalid argument. First argument must be a valid storage layout. Value: `%d`.", layout ); - RowMajorStrg = 0; - return; -} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json new file mode 100755 index 000000000000..19adb72ab470 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json @@ -0,0 +1,18 @@ +{ + "order": "column-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 1.0 ], + "strideX": 1, + "offsetX": 0, + "y": [ 1.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json new file mode 100755 index 000000000000..d52726883a6d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 2.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0 ], + "strideA1": -2, + "strideA2": -8, + "offsetA": 22, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json new file mode 100755 index 000000000000..6bb4f94e3616 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "strideA1": 1, + "strideA2": 2, + "offsetA": 1, + "A_out": [ 0.0, 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json new file mode 100755 index 000000000000..20c43b149187 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 6.0, 0.0 ], + "strideA1": 2, + "strideA2": 8, + "offsetA": 4, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 12.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json new file mode 100755 index 000000000000..ab7ac9e8897d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 4.0, 0.0 ], + "strideA1": 2, + "strideA2": -8, + "offsetA": 20, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 6.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json new file mode 100755 index 000000000000..82884c1c0804 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0 ], + "strideA1": -2, + "strideA2": 8, + "offsetA": 6, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json new file mode 100755 index 000000000000..ba307fda875c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0 ], + "strideA1": -2, + "strideA2": -8, + "offsetA": 22, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json new file mode 100755 index 000000000000..f107aa4eb727 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json @@ -0,0 +1,18 @@ +{ + "order": "column-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json new file mode 100755 index 000000000000..fcfb609eb3f0 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json @@ -0,0 +1,18 @@ +{ + "order": "column-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json new file mode 100755 index 000000000000..2cc21048ac0d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json @@ -0,0 +1,18 @@ +{ + "order": "column-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json new file mode 100755 index 000000000000..7ddda6580f6b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json @@ -0,0 +1,18 @@ +{ + "order": "column-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 1.0, 4.0, 2.0, 5.0, 3.0, 6.0 ], + "lda": 2, + "strideA1": 1, + "strideA2": 2, + "offsetA": 0, + "A_out": [ 2.0, 5.0, 3.0, 6.0, 4.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json new file mode 100755 index 000000000000..6c5a8c89a176 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json @@ -0,0 +1,18 @@ +{ + "order": "row-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 1.0 ], + "strideX": 1, + "offsetX": 0, + "y": [ 1.0, 1.0, 1.0 ], + "strideY": 1, + "offsetY": 0, + "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json new file mode 100755 index 000000000000..53f86d6f795d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 2.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 0.0, 6.0, 0.0, 5.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 2.0, 0.0, 1.0, 0.0 ], + "strideA1": -14, + "strideA2": -2, + "offsetA": 19, + "A_out": [ 0.0, 12.0, 0.0, 9.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 4.0, 0.0, 2.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json new file mode 100755 index 000000000000..dce60e368fb3 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "strideA1": 3, + "strideA2": 1, + "offsetA": 1, + "A_out": [ 0.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json new file mode 100755 index 000000000000..6fd51996873f --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 5.0, 0.0, 6.0, 0.0 ], + "strideA1": 14, + "strideA2": 2, + "offsetA": 1, + "A_out": [ 0.0, 2.0, 0.0, 4.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 9.0, 0.0, 12.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json new file mode 100755 index 000000000000..ab7ac9e8897d --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 4.0, 0.0 ], + "strideA1": 2, + "strideA2": -8, + "offsetA": 20, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 6.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json new file mode 100755 index 000000000000..82884c1c0804 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0 ], + "strideA1": -2, + "strideA2": 8, + "offsetA": 6, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json new file mode 100755 index 000000000000..ba307fda875c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json @@ -0,0 +1,16 @@ +{ + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 2.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 1.0, 0.0 ], + "strideA1": -2, + "strideA2": -8, + "offsetA": 22, + "A_out": [ 0.0, 0.0, 0.0, 0.0, 12.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0, 6.0, 0.0, 2.0, 0.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json new file mode 100755 index 000000000000..7713b84d9d54 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json @@ -0,0 +1,18 @@ +{ + "order": "row-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json new file mode 100755 index 000000000000..fea1b4dbd0a0 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json @@ -0,0 +1,18 @@ +{ + "order": "row-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": -2, + "offsetX": 2, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json new file mode 100755 index 000000000000..e89ebada429c --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json @@ -0,0 +1,18 @@ +{ + "order": "row-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": -2, + "offsetY": 4, + "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json new file mode 100755 index 000000000000..4291cb6a8b27 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json @@ -0,0 +1,18 @@ +{ + "order": "row-major", + "M": 2, + "N": 3, + "alpha": 1.0, + "x": [ 1.0, 0.0, 1.0, 0.0 ], + "strideX": 2, + "offsetX": 0, + "y": [ 1.0, 0.0, 1.0, 0.0, 1.0, 0.0 ], + "strideY": 2, + "offsetY": 0, + "A": [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ], + "lda": 3, + "strideA1": 3, + "strideA2": 1, + "offsetA": 0, + "A_out": [ 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 ] +} diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js new file mode 100755 index 000000000000..a8da5b588089 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js @@ -0,0 +1,534 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len */ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var dger = require( './../lib/dger.js' ); + + +// FIXTURES // + +var cm = require( './fixtures/column_major.json' ); +var cxpyp = require( './fixtures/column_major_xpyp.json' ); +var cxnyp = require( './fixtures/column_major_xnyp.json' ); +var cxpyn = require( './fixtures/column_major_xpyn.json' ); +var cxnyn = require( './fixtures/column_major_xnyn.json' ); + +var rm = require( './fixtures/row_major.json' ); +var rxpyp = require( './fixtures/row_major_xpyp.json' ); +var rxnyp = require( './fixtures/row_major_xnyp.json' ); +var rxpyn = require( './fixtures/row_major_xpyn.json' ); +var rxnyn = require( './fixtures/row_major_xnyn.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dger, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 10', function test( t ) { + t.strictEqual( dger.length, 10, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided an invalid first argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + 'foo', + 'bar', + 'beep', + 'boop' + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), TypeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( value, data.M, data.N, data.alpha, new Float64Array( data.x ), data.strideX, new Float64Array( data.y ), data.strideY, new Float64Array( data.A ), data.LDA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid second argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + -1, + -2, + -3 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.order, value, data.N, data.alpha, new Float64Array( data.x ), data.strideX, new Float64Array( data.y ), data.strideY, new Float64Array( data.A ), data.LDA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid third argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + -1, + -2, + -3 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.order, data.M, value, data.alpha, new Float64Array( data.x ), data.strideX, new Float64Array( data.y ), data.strideY, new Float64Array( data.A ), data.LDA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid sixth argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + 0 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.order, data.M, data.N, data.alpha, new Float64Array( data.x ), value, new Float64Array( data.y ), data.strideY, new Float64Array( data.A ), data.LDA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid eighth argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + 0 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.order, data.M, data.N, data.alpha, new Float64Array( data.x ), data.strideX, new Float64Array( data.y ), value, new Float64Array( data.A ), data.LDA ); + }; + } +}); + +tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a reference to the input matrix (row-major)', function test( t ) { + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a reference to the input matrix (column-major)', function test( t ) { + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.end(); +}); + +tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + out = dger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.order, 0, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + out = dger( data.order, data.M, 0, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.order, data.M, data.N, 0.0, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxpyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxpyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxnyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxnyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxpyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxpyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports complex access patterns (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxnyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports complex access patterns (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxnyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.order, data.M, data.N, data.alpha, x, data.strideX, y, data.strideY, a, data.lda ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.js old mode 100644 new mode 100755 index eb3153fe3685..d1a424ff92d7 --- a/lib/node_modules/@stdlib/blas/base/dger/test/test.js +++ b/lib/node_modules/@stdlib/blas/base/dger/test/test.js @@ -22,14 +22,14 @@ var tape = require( 'tape' ); var proxyquire = require( 'proxyquire' ); -var isBrowser = require( '@stdlib/assert/is-browser' ); +var IS_BROWSER = require( '@stdlib/assert/is-browser' ); var dger = require( './../lib' ); // VARIABLES // var opts = { - 'skip': isBrowser + 'skip': IS_BROWSER }; diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js new file mode 100755 index 000000000000..494f9dd71007 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js @@ -0,0 +1,784 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* eslint-disable max-len */ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var Float64Array = require( '@stdlib/array/float64' ); +var dger = require( './../lib/ndarray.js' ); + + +// FIXTURES // + +var cm = require( './fixtures/column_major.json' ); +var coa = require( './fixtures/column_major_oa.json' ); +var cxpyp = require( './fixtures/column_major_xpyp.json' ); +var cxnyp = require( './fixtures/column_major_xnyp.json' ); +var cxpyn = require( './fixtures/column_major_xpyn.json' ); +var cxnyn = require( './fixtures/column_major_xnyn.json' ); +var csa1sa2 = require( './fixtures/column_major_sa1_sa2.json' ); +var csa1nsa2 = require( './fixtures/column_major_sa1n_sa2.json' ); +var csa1sa2n = require( './fixtures/column_major_sa1_sa2n.json' ); +var csa1nsa2n = require( './fixtures/column_major_sa1n_sa2n.json' ); +var ccap = require( './fixtures/column_major_complex_access_pattern.json' ); + +var rm = require( './fixtures/row_major.json' ); +var roa = require( './fixtures/row_major_oa.json' ); +var rxpyp = require( './fixtures/row_major_xpyp.json' ); +var rxnyp = require( './fixtures/row_major_xnyp.json' ); +var rxpyn = require( './fixtures/row_major_xpyn.json' ); +var rxnyn = require( './fixtures/row_major_xnyn.json' ); +var rsa1sa2 = require( './fixtures/row_major_sa1_sa2.json' ); +var rsa1nsa2 = require( './fixtures/row_major_sa1n_sa2.json' ); +var rsa1sa2n = require( './fixtures/row_major_sa1_sa2n.json' ); +var rsa1nsa2n = require( './fixtures/row_major_sa1n_sa2n.json' ); +var rcap = require( './fixtures/row_major_complex_access_pattern.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof dger, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'the function has an arity of 13', function test( t ) { + t.strictEqual( dger.length, 13, 'returns expected value' ); + t.end(); +}); + +tape( 'the function throws an error if provided an invalid first argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + -1, + -2, + -3 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( value, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.y ), data.strideY, data.offsetY, new Float64Array( data.A ), data.strideA1, data.strideA2, data.offsetA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid second argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + -1, + -2, + -3 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.M, value, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.y ), data.strideY, data.offsetY, new Float64Array( data.A ), data.strideA1, data.strideA2, data.offsetA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid fifth argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + 0 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.M, data.N, data.alpha, new Float64Array( data.x ), value, data.offsetX, new Float64Array( data.y ), data.strideY, data.offsetY, new Float64Array( data.A ), data.strideA1, data.strideA2, data.offsetA ); + }; + } +}); + +tape( 'the function throws an error if provided an invalid eighth argument', function test( t ) { + var values; + var data; + var i; + + data = rm; + + values = [ + 0 + ]; + + for ( i = 0; i < values.length; i++ ) { + t.throws( badValue( values[ i ] ), RangeError, 'throws an error when provided ' + values[ i ] ); + } + t.end(); + + function badValue( value ) { + return function badValue() { + dger( data.M, data.N, data.alpha, new Float64Array( data.x ), data.strideX, data.offsetX, new Float64Array( data.y ), value, data.offsetY, new Float64Array( data.A ), data.strideA1, data.strideA2, data.offsetA ); + }; + } +}); + +tape( 'the function the rank 1 operation `A = α*x*y^T + A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function the rank 1 operation `A = α*x*y^T + A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a reference to the input matrix (row-major)', function test( t ) { + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.end(); +}); + +tape( 'the function returns a reference to the input matrix (column-major)', function test( t ) { + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.end(); +}); + +tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + out = dger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if either `M` or `N` is `0`, the function returns the input matrix unchanged (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( 0, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + out = dger( data.M, 0, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'if `α` is `0.0`, the function returns the input matrix unchanged (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cm; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A ); + + out = dger( data.M, data.N, 0.0, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function supports specifying the strides of the first and second dimensions of `A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rsa1sa2; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying the strides of the first and second dimensions of `A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = csa1sa2; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports a negative stride for the first dimension of `A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rsa1nsa2; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports a negative stride for the first dimension of `A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = csa1nsa2; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports a negative stride for the second dimension of `A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rsa1sa2n; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports a negative stride for the second dimension of `A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = csa1sa2n; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports negative strides for `A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rsa1nsa2n; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports negative strides for `A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = csa1nsa2n; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying an offset parameter for `A` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = roa; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying an offset parameter for `A` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = coa; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxpyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying `x` and `y` strides (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxpyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxnyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `x` stride (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxnyp; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxpyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying a negative `y` stride (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxpyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rxnyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports specifying negative strides for `x` and `y` (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = cxnyn; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports complex access patterns (row-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = rcap; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); + +tape( 'the function supports complex access patterns (column-major)', function test( t ) { + var expected; + var data; + var out; + var a; + var x; + var y; + + data = ccap; + + a = new Float64Array( data.A ); + x = new Float64Array( data.x ); + y = new Float64Array( data.y ); + + expected = new Float64Array( data.A_out ); + + out = dger( data.M, data.N, data.alpha, x, data.strideX, data.offsetX, y, data.strideY, data.offsetY, a, data.strideA1, data.strideA2, data.offsetA ); + t.strictEqual( out, a, 'returns expected value' ); + t.deepEqual( out, expected, 'returns expected value' ); + t.end(); +}); From 0f8696e8a89e5969d255ae4708403e93a0ae4ebe Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Wed, 26 Mar 2025 13:04:08 +0000 Subject: [PATCH 2/5] chore: update copyright years --- lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js | 2 +- .../@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js | 2 +- lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts | 2 +- lib/node_modules/@stdlib/blas/base/dger/lib/base.js | 2 +- lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js | 2 +- lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js index 3d20265c4ee4..19760efde23d 100755 --- a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js index 9c26e795904b..c6827d87000a 100755 --- a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts index f3ff52bbbb05..f9e61fce3fc8 100644 --- a/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/base/dger/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts b/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts index cd12e125011a..05a2df32cdef 100644 --- a/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts +++ b/lib/node_modules/@stdlib/blas/base/dger/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/base.js b/lib/node_modules/@stdlib/blas/base/dger/lib/base.js index 6d9d7afe8f4c..84d15d55e228 100755 --- a/lib/node_modules/@stdlib/blas/base/dger/lib/base.js +++ b/lib/node_modules/@stdlib/blas/base/dger/lib/base.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js index a8da5b588089..bbb5d60bff12 100755 --- a/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js +++ b/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js index 494f9dd71007..c749f1a76dca 100755 --- a/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From f1792dcfd6e8a9fc756094ddc56398edc289c414 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> Date: Wed, 26 Mar 2025 18:38:43 +0530 Subject: [PATCH 3/5] remove: c examples Signed-off-by: Shabareesh Shetty <139731143+ShabiShett07@users.noreply.github.com> --- .../blas/base/dger/examples/c/Makefile | 146 ------------------ .../blas/base/dger/examples/c/example.c | 54 ------- 2 files changed, 200 deletions(-) delete mode 100755 lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile delete mode 100755 lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile b/lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile deleted file mode 100755 index 6aed70daf167..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/examples/c/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -#/ -# @license Apache-2.0 -# -# Copyright (c) 2024 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#/ - -# VARIABLES # - -ifndef VERBOSE - QUIET := @ -else - QUIET := -endif - -# Determine the OS ([1][1], [2][2]). -# -# [1]: https://en.wikipedia.org/wiki/Uname#Examples -# [2]: http://stackoverflow.com/a/27776822/2225624 -OS ?= $(shell uname) -ifneq (, $(findstring MINGW,$(OS))) - OS := WINNT -else -ifneq (, $(findstring MSYS,$(OS))) - OS := WINNT -else -ifneq (, $(findstring CYGWIN,$(OS))) - OS := WINNT -else -ifneq (, $(findstring Windows_NT,$(OS))) - OS := WINNT -endif -endif -endif -endif - -# Define the program used for compiling C source files: -ifdef C_COMPILER - CC := $(C_COMPILER) -else - CC := gcc -endif - -# Define the command-line options when compiling C files: -CFLAGS ?= \ - -std=c99 \ - -O3 \ - -Wall \ - -pedantic - -# Determine whether to generate position independent code ([1][1], [2][2]). -# -# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options -# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option -ifeq ($(OS), WINNT) - fPIC ?= -else - fPIC ?= -fPIC -endif - -# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): -INCLUDE ?= - -# List of source files: -SOURCE_FILES ?= - -# List of libraries (e.g., `-lopenblas -lpthread`): -LIBRARIES ?= - -# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): -LIBPATH ?= - -# List of C targets: -c_targets := example.out - - -# RULES # - -#/ -# Compiles source files. -# -# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) -# @param {string} [CFLAGS] - C compiler options -# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) -# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) -# @param {string} [SOURCE_FILES] - list of source files -# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) -# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) -# -# @example -# make -# -# @example -# make all -#/ -all: $(c_targets) - -.PHONY: all - -#/ -# Compiles C source files. -# -# @private -# @param {string} CC - C compiler (e.g., `gcc`) -# @param {string} CFLAGS - C compiler options -# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) -# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) -# @param {string} SOURCE_FILES - list of source files -# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) -# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) -#/ -$(c_targets): %.out: %.c - $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) - -#/ -# Runs compiled examples. -# -# @example -# make run -#/ -run: $(c_targets) - $(QUIET) ./$< - -.PHONY: run - -#/ -# Removes generated files. -# -# @example -# make clean -#/ -clean: - $(QUIET) -rm -f *.o *.out - -.PHONY: clean diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c b/lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c deleted file mode 100755 index 63fb90b3ea5a..000000000000 --- a/lib/node_modules/@stdlib/blas/base/dger/examples/c/example.c +++ /dev/null @@ -1,54 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2024 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include "stdlib/blas/base/dger.h" -#include "stdlib/blas/base/shared.h" -#include - -int main( void ) { - // Define a 4x3 matrix `B` stored in row-major order (i.e., equivalent to the transpose `A^T` of a 3x4 matrix `A` stored in column-major order): - double B[ 4*3 ] = { - 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0 - }; - // Define `x^T` and `y` vectors: - double x[ 4 ] = { 0.0, 1.0, 2.0, 3.0 }; // M - double y[ 3 ] = { 1.0, 4.0, 0.0 }; // N - - // Specify the number of rows and columns: - const int M = 4; - const int N = 3; - - // Specify stride lengths: - const int strideX = 1; - const int strideY = 1; - - // Specify the matrix layout: - const CBLAS_LAYOUT layout = CblasRowMajor; - - // Perform operation (note: arguments are reordered as: A_{M,N} = α⋅x_M⋅y^T_N + A_{M,N} => B = A^T = α⋅y⋅x^T + A^T = α⋅y⋅x^T + B): - c_dger( layout, N, M, 1.0, y, strideY, x, strideX, B, M ); - - // Print the result: - for ( int i = 0; i < N; i++ ) { - for ( int j = 0; j < M; j++ ) { - printf( "B[%i,%i] = %lf\n", i, j, B[ (i*M)+j ] ); - } - } -} From c773adf1fa7287c80258c01cac934365ed27e858 Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 26 Mar 2025 18:43:09 +0530 Subject: [PATCH 4/5] fix: changed file permissions --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/dger/README.md | 0 lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js | 0 .../@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js | 0 lib/node_modules/@stdlib/blas/base/dger/examples/index.js | 0 lib/node_modules/@stdlib/blas/base/dger/lib/base.js | 0 lib/node_modules/@stdlib/blas/base/dger/lib/dger.js | 0 lib/node_modules/@stdlib/blas/base/dger/lib/index.js | 0 lib/node_modules/@stdlib/blas/base/dger/lib/main.js | 0 lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js | 0 lib/node_modules/@stdlib/blas/base/dger/package.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major.json | 0 .../dger/test/fixtures/column_major_complex_access_pattern.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major_oa.json | 0 .../blas/base/dger/test/fixtures/column_major_sa1_sa2.json | 0 .../blas/base/dger/test/fixtures/column_major_sa1_sa2n.json | 0 .../blas/base/dger/test/fixtures/column_major_sa1n_sa2.json | 0 .../blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json | 0 .../@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major.json | 0 .../base/dger/test/fixtures/row_major_complex_access_pattern.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_oa.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json | 0 .../@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json | 0 lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js | 0 lib/node_modules/@stdlib/blas/base/dger/test/test.js | 0 lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js | 0 35 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/README.md mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/examples/index.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/lib/base.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/lib/dger.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/lib/index.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/lib/main.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/package.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/test.js mode change 100755 => 100644 lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js diff --git a/lib/node_modules/@stdlib/blas/base/dger/README.md b/lib/node_modules/@stdlib/blas/base/dger/README.md old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/benchmark/benchmark.ndarray.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/examples/index.js b/lib/node_modules/@stdlib/blas/base/dger/examples/index.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/base.js b/lib/node_modules/@stdlib/blas/base/dger/lib/base.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js b/lib/node_modules/@stdlib/blas/base/dger/lib/dger.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/index.js b/lib/node_modules/@stdlib/blas/base/dger/lib/index.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/main.js b/lib/node_modules/@stdlib/blas/base/dger/lib/main.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/lib/ndarray.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/package.json b/lib/node_modules/@stdlib/blas/base/dger/package.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_complex_access_pattern.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_oa.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1_sa2n.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_sa1n_sa2n.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyn.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xnyp.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyn.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/column_major_xpyp.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_complex_access_pattern.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_oa.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1_sa2n.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_sa1n_sa2n.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyn.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xnyp.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyn.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json b/lib/node_modules/@stdlib/blas/base/dger/test/fixtures/row_major_xpyp.json old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.dger.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.js old mode 100755 new mode 100644 diff --git a/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js b/lib/node_modules/@stdlib/blas/base/dger/test/test.ndarray.js old mode 100755 new mode 100644 From 0d43dbd06f530d136786a2aceb31254ff546061d Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 26 Mar 2025 18:49:13 +0530 Subject: [PATCH 5/5] fix: package.json lint error --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/dger/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/dger/package.json b/lib/node_modules/@stdlib/blas/base/dger/package.json index a4e79026e71d..eaef5fd98497 100644 --- a/lib/node_modules/@stdlib/blas/base/dger/package.json +++ b/lib/node_modules/@stdlib/blas/base/dger/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/blas/base/dger", "version": "0.0.0", - "description": "Perform the rank 1 operation A = alpha⋅x⋅y^T + A.", + "description": "Perform the rank 1 operation `A = α*x*y^T + A`.", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", @@ -14,10 +14,10 @@ } ], "main": "./lib", - "browser": "./lib/main.js", "directories": { - "example": "./examples", + "benchmark": "./benchmark", "doc": "./docs", + "example": "./examples", "lib": "./lib", "test": "./test" },