From f07b52e21a6881fb75c50891c9a8a1dc301fa64f Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 9 Jul 2025 10:26:08 +0530 Subject: [PATCH 01/28] chore: revert other file changes --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../stats/base/stdevwd/test/test.main.js | 360 ------------------ 1 file changed, 360 deletions(-) delete mode 100644 lib/node_modules/@stdlib/stats/base/stdevwd/test/test.main.js diff --git a/lib/node_modules/@stdlib/stats/base/stdevwd/test/test.main.js b/lib/node_modules/@stdlib/stats/base/stdevwd/test/test.main.js deleted file mode 100644 index f54420c59298..000000000000 --- a/lib/node_modules/@stdlib/stats/base/stdevwd/test/test.main.js +++ /dev/null @@ -1,360 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2020 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MODULES // - -var tape = require( 'tape' ); -var sqrt = require( '@stdlib/math/base/special/sqrt' ); -var isnan = require( '@stdlib/math/base/assert/is-nan' ); -var Float64Array = require( '@stdlib/array/float64' ); -var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' ); -var stdevwd = require( './../lib' ); - - -// TESTS // - -tape( 'main export is a function', function test( t ) { - t.ok( true, __filename ); - t.strictEqual( typeof stdevwd, 'function', 'main export is a function' ); - t.end(); -}); - -tape( 'the function has an arity of 4', function test( t ) { - t.strictEqual( stdevwd.length, 4, 'has expected arity' ); - t.end(); -}); - -tape( 'the function calculates the population standard deviation of a strided array', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ]; - v = stdevwd( x.length, 0, x, 1 ); - t.strictEqual( v, sqrt( 53.5/x.length ), 'returns expected value' ); - - x = [ -4.0, -4.0 ]; - v = stdevwd( x.length, 0, x, 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - x = [ NaN, 4.0 ]; - v = stdevwd( x.length, 0, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function calculates the population standard deviation of a strided array (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ]; - v = stdevwd( x.length, 0, toAccessorArray( x ), 1 ); - t.strictEqual( v, sqrt( 53.5/x.length ), 'returns expected value' ); - - x = [ -4.0, -4.0 ]; - v = stdevwd( x.length, 0, toAccessorArray( x ), 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - x = [ NaN, 4.0 ]; - v = stdevwd( x.length, 0, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function calculates the sample standard deviation of a strided array', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ]; - v = stdevwd( x.length, 1, x, 1 ); - t.strictEqual( v, sqrt( 53.5/(x.length-1) ), 'returns expected value' ); - - x = [ -4.0, -4.0 ]; - v = stdevwd( x.length, 1, x, 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - x = [ NaN, 4.0 ]; - v = stdevwd( x.length, 1, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function calculates the sample standard deviation of a strided array (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 0.0, 3.0 ]; - v = stdevwd( x.length, 1, toAccessorArray( x ), 1 ); - t.strictEqual( v, sqrt( 53.5/(x.length-1) ), 'returns expected value' ); - - x = [ -4.0, -4.0 ]; - v = stdevwd( x.length, 1, toAccessorArray( x ), 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - x = [ NaN, 4.0 ]; - v = stdevwd( x.length, 1, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN`', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( 0, 1, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - v = stdevwd( -1, 1, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided an `N` parameter less than or equal to `0`, the function returns `NaN` (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( 0, 1, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - v = stdevwd( -1, 1, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided an `N` parameter equal to `1`, the function returns a population standard deviation of `0`', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( 1, 0, x, 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided an `N` parameter equal to `1`, the function returns a population standard deviation of `0` (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( 1, 0, toAccessorArray( x ), 1 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided a `correction` parameter yielding `N-correction` less than or equal to `0`, the function returns `NaN`', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( x.length, x.length, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - v = stdevwd( x.length, x.length+1, x, 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided a `correction` parameter yielding `N-correction` less than or equal to `0`, the function returns `NaN` (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( x.length, x.length, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - v = stdevwd( x.length, x.length+1, toAccessorArray( x ), 1 ); - t.strictEqual( isnan( v ), true, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports a `stride` parameter', function test( t ) { - var x; - var v; - - x = [ - 1.0, // 0 - 2.0, - 2.0, // 1 - -7.0, - -2.0, // 2 - 3.0, - 4.0, // 3 - 2.0 - ]; - - v = stdevwd( 4, 1, x, 2 ); - - t.strictEqual( v, 2.5, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports a `stride` parameter (accessors)', function test( t ) { - var x; - var v; - - x = [ - 1.0, // 0 - 2.0, - 2.0, // 1 - -7.0, - -2.0, // 2 - 3.0, - 4.0, // 3 - 2.0 - ]; - - v = stdevwd( 4, 1, toAccessorArray( x ), 2 ); - - t.strictEqual( v, 2.5, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports a negative `stride` parameter', function test( t ) { - var x; - var v; - - x = [ - 1.0, // 3 - 2.0, - 2.0, // 2 - -7.0, - -2.0, // 1 - 3.0, - 4.0, // 0 - 2.0 - ]; - - v = stdevwd( 4, 1, x, -2 ); - - t.strictEqual( v, 2.5, 'returns expected value' ); - t.end(); -}); - -tape( 'the function supports a negative `stride` parameter (accessors)', function test( t ) { - var x; - var v; - - x = [ - 1.0, // 3 - 2.0, - 2.0, // 2 - -7.0, - -2.0, // 1 - 3.0, - 4.0, // 0 - 2.0 - ]; - - v = stdevwd( 4, 1, toAccessorArray( x ), -2 ); - - t.strictEqual( v, 2.5, 'returns expected value' ); - t.end(); -}); - -tape( 'if provided a `stride` parameter equal to `0`, the function returns `0`', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( x.length, 1, x, 0 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - t.end(); -}); - -tape( 'if provided a `stride` parameter equal to `0`, the function returns `0` (accessors)', function test( t ) { - var x; - var v; - - x = [ 1.0, -2.0, -4.0, 5.0, 3.0 ]; - - v = stdevwd( x.length, 1, toAccessorArray( x ), 0 ); - t.strictEqual( v, 0.0, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports view offsets', function test( t ) { - var x0; - var x1; - var v; - - x0 = new Float64Array([ - 2.0, - 1.0, // 0 - 2.0, - -2.0, // 1 - -2.0, - 2.0, // 2 - 3.0, - 4.0, // 3 - 6.0 - ]); - - x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element - - v = stdevwd( 4, 1, x1, 2 ); - t.strictEqual( v, 2.5, 'returns expected value' ); - - t.end(); -}); - -tape( 'the function supports view offsets (accessors)', function test( t ) { - var x0; - var x1; - var v; - - x0 = new Float64Array([ - 2.0, - 1.0, // 0 - 2.0, - -2.0, // 1 - -2.0, - 2.0, // 2 - 3.0, - 4.0, // 3 - 6.0 - ]); - - x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element - - v = stdevwd( 4, 1, toAccessorArray( x1 ), 2 ); - t.strictEqual( v, 2.5, 'returns expected value' ); - - t.end(); -}); From 7cfc153586b8f9e0c79a3a9a3638884bc6d657dd Mon Sep 17 00:00:00 2001 From: ShabiShett07 Date: Wed, 9 Jul 2025 10:41:11 +0530 Subject: [PATCH 02/28] feat: add blas/base/zaxpy --- 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: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - task: lint_c_examples status: missing_dependencies - task: lint_c_benchmarks status: missing_dependencies - 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 --- --- .../@stdlib/blas/base/zaxpy/README.md | 161 +++- .../blas/base/zaxpy/benchmark/c/Makefile | 146 ++++ .../base/zaxpy/benchmark/c/benchmark.length.c | 204 +++++ .../@stdlib/blas/base/zaxpy/binding.gyp | 265 +++++++ .../blas/base/zaxpy/examples/c/Makefile | 147 ++++ .../blas/base/zaxpy/examples/c/example.c | 54 ++ .../@stdlib/blas/base/zaxpy/include.gypi | 265 +++++++ .../zaxpy/include/stdlib/blas/base/zaxpy.h | 49 ++ .../include/stdlib/blas/base/zaxpy_cblas.h | 44 ++ .../@stdlib/blas/base/zaxpy/lib/native.js | 35 + .../blas/base/zaxpy/lib/ndarray.native.js | 67 ++ .../blas/base/zaxpy/lib/zaxpy.native.js | 65 ++ .../@stdlib/blas/base/zaxpy/manifest.json | 495 +++++++++++++ .../@stdlib/blas/base/zaxpy/package.json | 4 + .../@stdlib/blas/base/zaxpy/src/Makefile | 70 ++ .../@stdlib/blas/base/zaxpy/src/addon.c | 68 ++ .../@stdlib/blas/base/zaxpy/src/zaxpy.c | 38 + .../@stdlib/blas/base/zaxpy/src/zaxpy_cblas.c | 36 + .../blas/base/zaxpy/src/zaxpy_ndarray.c | 60 ++ .../base/zaxpy/test/test.ndarray.native.js | 696 ++++++++++++++++++ .../blas/base/zaxpy/test/test.zaxpy.native.js | 611 +++++++++++++++ 21 files changed, 3577 insertions(+), 3 deletions(-) create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/c/benchmark.length.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/include.gypi create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy.h create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_cblas.h create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/lib/native.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/lib/ndarray.native.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/lib/zaxpy.native.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/manifest.json create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/Makefile create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/addon.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_cblas.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_ndarray.c create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/test/test.ndarray.native.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/test/test.zaxpy.native.js diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/README.md b/lib/node_modules/@stdlib/blas/base/zaxpy/README.md index 12e11b4a6dd3..220a72046d2f 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/README.md +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/README.md @@ -51,9 +51,9 @@ The function has the following parameters: - **N**: number of indexed elements. - **alpha**: scalar [`Complex128`][@stdlib/complex/float64/ctor] constant. - **x**: first input [`Complex128Array`][@stdlib/array/complex128]. -- **strideX**: index increment for `x`. +- **strideX**: stride length for `x`. - **y**: second input [`Complex128Array`][@stdlib/array/complex128]. -- **strideY**: index increment for `y`. +- **strideY**: stride length for `y`. The `N` and stride parameters determine how values from `x` are scaled by `alpha` and added to `y`. For example, to scale every other value in `x` by `alpha` and add the result to every other value of `y`, @@ -137,6 +137,7 @@ zaxpy.ndarray( 3, alpha, x, 1, 1, y, 1, 1 ); ## Notes - If `N <= 0`, both functions return `y` unchanged. +- If `alpha === 0`, both functions return `y` unchanged. - `zaxpy()` corresponds to the [BLAS][blas] level 1 function [`zaxpy`][zaxpy]. @@ -171,6 +172,14 @@ var alpha = new Complex128( 2.0, 2.0 ); // Scale values from `x` by `alpha` and add the result to `y`: zaxpy( x.length, alpha, x, 1, y, 1 ); +// Print the results: +logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y ); + +yc = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 ); + +// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics: +zaxpy.ndarray( x.length, alpha, x, 1, 0, y, 1, 0 ); + // Print the results: logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y ); ``` @@ -179,6 +188,152 @@ logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y ); + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/blas/base/zaxpy.h" +``` + +#### c_zaxpy( N, alpha, \*X, strideX, \*Y, strideY ) + +Scales values from `X` by `alpha` and adds the result to `Y`. + +```c +#include "stdlib/complex/float32/ctor.h" + +float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 }; +float y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 }; +const stdlib_complex128_t alpha = stdlib_complex128( 2.0, 2.0 ); + +c_zaxpy( 4, alpha, (void *)x, 1, (void *)y, 1 ); +``` + +The function accepts the following arguments: + +- **N**: `[in] CBLAS_INT` number of indexed elements. +- **alpha**: `[in] stdlib_complex128_t` scalar constant. +- **X**: `[in] void*` input array. +- **strideX**: `[in] CBLAS_INT` stride length for `X`. +- **Y**: `[inout] void*` output array. +- **strideY**: `[in] CBLAS_INT` stride length for `Y`. + +```c +void c_zaxpy( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *x, const CBLAS_INT strideX, void *y, const CBLAS_INT strideY ); +``` + +#### c_zaxpy_ndarray( N, alpha, \*X, strideX, offsetX, \*Y, strideY, offsetY ) + +Scales values from `X` by `alpha` and adds the result to `Y` using alternative indexing semantics. + +```c +#include "stdlib/complex/float32/ctor.h" + +float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 }; +float y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 }; +const stdlib_complex128_t alpha = stdlib_complex128( 2.0, 2.0 ); + +c_zaxpy_ndarray( 4, alpha, (void *)x, 1, 0, (void *)y, 1, 0 ); +``` + +The function accepts the following arguments: + +- **N**: `[in] CBLAS_INT` number of indexed elements. +- **alpha**: `[in] stdlib_complex128_t` scalar constant. +- **X**: `[in] void*` input array. +- **strideX**: `[in] CBLAS_INT` stride length for `X`. +- **offsetX**: `[in] CBLAS_INT` starting index for `X`. +- **Y**: `[inout] void*` output array. +- **strideY**: `[in] CBLAS_INT` stride length for `Y`. +- **offsetY**: `[in] CBLAS_INT` starting index for `Y`. + +```c +void c_zaxpy_ndarray( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *x, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/blas/base/zaxpy.h" +#include "stdlib/complex/float32/ctor.h" +#include + +int main( void ) { + // Create strided arrays: + double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 }; + double y[] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; + + // Create a complex scalar: + const stdlib_complex128_t alpha = stdlib_complex128( 2.0, 2.0 ); + + // Specify the number of elements: + const int N = 4; + + // Specify stride lengths: + const int strideX = 1; + const int strideY = 1; + + // Scale values from `x` by `alpha` and add the result to `y`: + c_zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY ); + + // Print the result: + for ( int i = 0; i < N; i++ ) { + printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] ); + } + + // Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics: + c_zaxpy_ndarray( N, alpha, (void *)x, strideX, 0, (void *)y, strideY, 0 ); + + // Print the result: + for ( int i = 0; i < N; i++ ) { + printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] ); + } +} +``` + +
+ + + +
+ + + diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js b/lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js index c1369cdf919f..9a871b5a6f37 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js @@ -32,7 +32,7 @@ function rand() { var x = filledarrayBy( 10, 'complex128', rand ); var y = filledarrayBy( 10, 'complex128', rand ); -var yc = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 ); +var yc1 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 ); var alpha = new Complex128( 2.0, 2.0 ); @@ -40,4 +40,12 @@ var alpha = new Complex128( 2.0, 2.0 ); zaxpy( x.length, alpha, x, 1, y, 1 ); // Print the results: -logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y ); +logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc1, y ); + +var yc2 = zcopy( yc1.length, yc1, 1, zeros( yc1.length, 'complex128' ), 1 ); + +// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics: +zaxpy.ndarray( x.length, alpha, x, 1, 0, yc1, 1, 0 ); + +// Print the results: +logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 ); From 8a267f456d664e4d266c75a3b8c76f9b23aaf0d3 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Tue, 12 Aug 2025 22:04:31 +0530 Subject: [PATCH 10/28] chore: update binding.gyp --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp b/lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp index 08de71a2020e..02a2799da097 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/binding.gyp @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. From a1546ab2e617550f08736baa21bc15d57fc67cd2 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Tue, 12 Aug 2025 22:08:50 +0530 Subject: [PATCH 11/28] chore: update include.gypi --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../@stdlib/blas/base/zaxpy/include.gypi | 273 +++--------------- 1 file changed, 39 insertions(+), 234 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/include.gypi b/lib/node_modules/@stdlib/blas/base/zaxpy/include.gypi index 08de71a2020e..497aeca15320 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/include.gypi +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/include.gypi @@ -1,6 +1,6 @@ # @license Apache-2.0 # -# Copyright (c) 2025 The Stdlib Authors. +# 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. @@ -14,252 +14,57 @@ # 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. +# 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 { - # 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', + 'variables': { + # Host BLAS library (to override -Dblas=): + 'blas%': '', - # Fortran compiler flags: - 'fflags': [ - # Specify the Fortran standard to which a program is expected to conform: - '-std=f95', + # Path to BLAS library (to override -Dblas_dir=): + 'blas_dir%': '', + }, # end variables - # Indicate that the layout is free-form source code: - '-ffree-form', + # Source directory: + 'src_dir': './src', - # 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', + # Include directories: + 'include_dirs': [ + '<@(blas_dir)', + ' Date: Tue, 12 Aug 2025 22:38:45 +0530 Subject: [PATCH 12/28] bench: add native and fortran benchmarks --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../base/zaxpy/benchmark/benchmark.native.js | 120 ++++++++++ .../benchmark/benchmark.native.ndarray.js | 120 ++++++++++ .../base/zaxpy/benchmark/fortran/Makefile | 141 ++++++++++++ .../benchmark/fortran/benchmark.length.f | 216 ++++++++++++++++++ 4 files changed, 597 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.ndarray.js create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/Makefile create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/benchmark.length.f diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js new file mode 100644 index 000000000000..06bcaad5061b --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js @@ -0,0 +1,120 @@ +/** +* @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( 'path' ).resolve; +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 Complex128Array = require( '@stdlib/array/complex128' ); +var Complex128 = require( '@stdlib/complex/float64/ctor' ); +var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var zaxpy = tryRequire( resolve( __dirname, './../lib/zaxpy.native.js' ) ); +var opts = { + 'skip': ( zaxpy instanceof Error ) +}; +var options = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + var viewY; + var alpha; + var x; + var y; + + x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) ); + y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) ); + + viewY = reinterpret( y, 0 ); + + alpha = new Complex128( 1.0, 0.0 ); + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + zaxpy( x.length, alpha, x, 1, y, 1 ); + if ( isnan( viewY[ i%(N*2) ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( viewY[ i%(N*2) ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var min; + var max; + var N; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + N = pow( 10, i ); + f = createBenchmark( N ); + bench( pkg+'::native:size='+N, opts, f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.ndarray.js b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.ndarray.js new file mode 100644 index 000000000000..cfe03ad27259 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.ndarray.js @@ -0,0 +1,120 @@ +/** +* @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( 'path' ).resolve; +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 Complex128Array = require( '@stdlib/array/complex128' ); +var Complex128 = require( '@stdlib/complex/float64/ctor' ); +var reinterpret = require( '@stdlib/strided/base/reinterpret-complex128' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var zaxpy = tryRequire( resolve( __dirname, './../lib/ndarray.native.js' ) ); +var opts = { + 'skip': ( zaxpy instanceof Error ) +}; +var options = { + 'dtype': 'float64' +}; + + +// FUNCTIONS // + +/** +* Creates a benchmark function. +* +* @private +* @param {PositiveInteger} N - array length +* @returns {Function} benchmark function +*/ +function createBenchmark( N ) { + var viewY; + var alpha; + var x; + var y; + + x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) ); + y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) ); + + viewY = reinterpret( y, 0 ); + + alpha = new Complex128( 1.0, 0.0 ); + + return benchmark; + + /** + * Benchmark function. + * + * @private + * @param {Benchmark} b - benchmark instance + */ + function benchmark( b ) { + var i; + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + zaxpy( x.length, alpha, x, 1, 0, y, 1, 0 ); + if ( isnan( viewY[ i%(N*2) ] ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( viewY[ i%(N*2) ] ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); + } +} + + +// MAIN // + +/** +* Main execution sequence. +* +* @private +*/ +function main() { + var min; + var max; + var N; + var f; + var i; + + min = 1; // 10^min + max = 6; // 10^max + + for ( i = min; i <= max; i++ ) { + N = pow( 10, i ); + f = createBenchmark( N ); + bench( pkg+'::native:ndarray:size='+N, opts, f ); + } +} + +main(); diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/Makefile b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/Makefile new file mode 100644 index 000000000000..4c556aedee47 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/Makefile @@ -0,0 +1,141 @@ +#/ +# @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 Fortran source files: +ifdef FORTRAN_COMPILER + FC := $(FORTRAN_COMPILER) +else + FC := gfortran +endif + +# Define the command-line options when compiling Fortran files: +FFLAGS ?= \ + -std=f95 \ + -ffree-form \ + -O3 \ + -Wall \ + -Wextra \ + -Wno-compare-reals \ + -Wimplicit-interface \ + -fno-underscoring \ + -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 ?= + +# List of Fortran source files: +SOURCE_FILES ?= ../../src/zaxpy.f + +# List of Fortran targets: +f_targets := benchmark.length.out + + +# RULES # + +#/ +# Compiles Fortran source files. +# +# @param {string} SOURCE_FILES - list of Fortran source files +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {string} [FORTRAN_COMPILER] - Fortran compiler +# @param {string} [FFLAGS] - Fortran compiler flags +# @param {(string|void)} [fPIC] - compiler flag indicating whether to generate position independent code +# +# @example +# make +# +# @example +# make all +#/ +all: $(f_targets) + +.PHONY: all + +#/ +# Compiles Fortran source files. +# +# @private +# @param {string} SOURCE_FILES - list of Fortran source files +# @param {(string|void)} INCLUDE - list of includes (e.g., `-I /foo/bar -I /beep/boop`) +# @param {string} FC - Fortran compiler +# @param {string} FFLAGS - Fortran compiler flags +# @param {(string|void)} fPIC - compiler flag indicating whether to generate position independent code +#/ +$(f_targets): %.out: %.f + $(QUIET) $(FC) $(FFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(f_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/zaxpy/benchmark/fortran/benchmark.length.f b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/benchmark.length.f new file mode 100644 index 000000000000..7d9dd75b06dc --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/fortran/benchmark.length.f @@ -0,0 +1,216 @@ +!> +! @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. +!< + +program bench + implicit none + ! .. + ! Local constants: + character(5), parameter :: name = 'zaxpy' ! if changed, be sure to adjust length + integer, parameter :: iterations = 10000000 + integer, parameter :: repeats = 3 + integer, parameter :: min = 1 + integer, parameter :: max = 6 + ! .. + ! Run the benchmarks: + call main() + ! .. + ! Functions: +contains + ! .. + ! Prints the TAP version. + ! .. + subroutine print_version() + print '(A)', 'TAP version 13' + end subroutine print_version + ! .. + ! Prints the TAP summary. + ! + ! @param {integer} total - total number of tests + ! @param {integer} passing - total number of passing tests + ! .. + subroutine print_summary( total, passing ) + ! .. + ! Scalar arguments: + integer, intent(in) :: total, passing + ! .. + ! Local variables: + character(len=999) :: str, tmp + ! .. + ! Intrinsic functions: + intrinsic adjustl, trim + ! .. + print '(A)', '#' + ! .. + write (str, '(I15)') total ! TAP plan + tmp = adjustl( str ) + print '(A,A)', '1..', trim( tmp ) + ! .. + print '(A,A)', '# total ', trim( tmp ) + ! .. + write (str, '(I15)') passing + tmp = adjustl( str ) + print '(A,A)', '# pass ', trim( tmp ) + ! .. + print '(A)', '#' + print '(A)', '# ok' + end subroutine print_summary + ! .. + ! Prints benchmarks results. + ! + ! @param {integer} iterations - number of iterations + ! @param {double} elapsed - elapsed time in seconds + ! .. + subroutine print_results( iterations, elapsed ) + ! .. + ! Scalar arguments: + double precision, intent(in) :: elapsed + integer, intent(in) :: iterations + ! .. + ! Local variables: + double precision :: rate + character(len=999) :: str, tmp + ! .. + ! Intrinsic functions: + intrinsic dble, adjustl, trim + ! .. + rate = dble( iterations ) / elapsed + ! .. + print '(A)', ' ---' + ! .. + write (str, '(I15)') iterations + tmp = adjustl( str ) + print '(A,A)', ' iterations: ', trim( tmp ) + ! .. + write (str, '(f100.9)') elapsed + tmp = adjustl( str ) + print '(A,A)', ' elapsed: ', trim( tmp ) + ! .. + write( str, '(f100.9)') rate + tmp = adjustl( str ) + print '(A,A)', ' rate: ', trim( tmp ) + ! .. + print '(A)', ' ...' + end subroutine print_results + ! .. + ! Runs a benchmark. + ! + ! @param {integer} iterations - number of iterations + ! @param {integer} N - array length + ! @return {double} elapsed time in seconds + ! .. + double precision function benchmark( iterations, N ) + ! .. + ! External functions: + interface + subroutine zaxpy( N, x, strideX, y, strideY ) + complex(kind=kind(0.0d0)) :: x(*), y(*) + integer :: strideX, strideY, N + end subroutine zaxpy + end interface + ! .. + ! Scalar arguments: + integer, intent(in) :: iterations, N + ! .. + ! Local scalars: + double precision :: elapsed, r1, r2 + real :: t1, t2 + integer :: i + ! .. + ! Local arrays: + complex(kind=8), allocatable :: x(:), y(:) + ! .. + ! Local scalar: + complex(kind=kind(0.0d0)) :: alpha + ! .. + ! Intrinsic functions: + intrinsic random_number, cpu_time, cmplx + ! .. + ! Allocate arrays: + allocate( x(N), y(N) ) + ! .. + call random_number( r1 ) + call random_number( r2 ) + alpha = cmplx( (r1*1.0d0), (r2*0.0d0), kind=kind(0.0d0) ) + do i = 1, N + call random_number( r1 ) + call random_number( r2 ) + x( i ) = cmplx( (r1*10000.0d0)-5000.0d0, (r2*1000.0d0)-5000.0d0, kind=kind(0.0d0) ) + y( i ) = cmplx( (r1*10000.0d0)-5000.0d0, (r2*1000.0d0)-5000.0d0, kind=kind(0.0d0) ) + end do + ! .. + call cpu_time( t1 ) + ! .. + do i = 1, iterations + call zaxpy( N, alpha, x, 1, y, 1 ); + if ( y( 1 ) /= y( 1 ) ) then + print '(A)', 'should not return NaN' + exit + end if + end do + ! .. + call cpu_time( t2 ) + ! .. + elapsed = t2 - t1 + ! .. + if ( y( 1 ) /= y( 1 ) ) then + print '(A)', 'should not return NaN' + end if + ! .. + ! Deallocate arrays: + deallocate( x, y ) + ! .. + benchmark = elapsed + return + end function benchmark + ! .. + ! Main execution sequence. + ! .. + subroutine main() + ! .. + ! Local variables: + integer :: count, iter, N, i, j + double precision :: elapsed + character(len=999) :: str, tmp + ! .. + ! Intrinsic functions: + intrinsic adjustl, trim + ! .. + call print_version() + count = 0 + do i = min, max + N = 10**i + iter = iterations / 10**(i-1) + do j = 1, repeats + count = count + 1 + ! .. + write (str, '(I15)') N + tmp = adjustl( str ) + print '(A,A,A,A)', '# fortran::', name, ':size=', trim( tmp ) + ! .. + elapsed = benchmark( iter, N ) + ! .. + call print_results( iter, elapsed ) + ! .. + write (str, '(I15)') count + tmp = adjustl( str ) + print '(A,A,A)', 'ok ', trim( tmp ), ' benchmark finished' + end do + end do + call print_summary( count, count ) + end subroutine main +end program bench From c992597417f04a818f636e6a9a1adf86e9df7f3c Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:05:29 +0530 Subject: [PATCH 13/28] chore: add FORTRAN implementation --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - 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 --- --- .../@stdlib/blas/base/zaxpy/src/zaxpy.f | 96 +++++++++++++++++++ .../@stdlib/blas/base/zaxpy/src/zaxpy_f.c | 38 ++++++++ 2 files changed, 134 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f new file mode 100644 index 000000000000..06181759ceb8 --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -0,0 +1,96 @@ +!> +! @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. +!< + +!> Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector. +! +! ## Notes +! +! * Modified version of reference BLAS level1 routine (version 3.9.0). Updated to "free form" Fortran 95. +! +! ## Authors +! +! * Univ. of Tennessee +! * Univ. of California Berkeley +! * Univ. of Colorado Denver +! * NAG Ltd. +! +! ## History +! +! * Jack Dongarra, linpack, 4/11/78. +! +! - modified 12/3/93, array(1) declarations changed to array(*) +! +! ## 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} N - number of indexed elements +! @param {complex} alpha - scalar constant +! @param {Array>} x - input array +! @param {integer} strideX - `x` stride length +! @param {Array>} y - output array +! @param {integer} strideY - `y` stride length +!< +subroutine zapxy( N, alpha, x, strideX, y, strideY ) + implicit none + ! .. + ! Scalar arguments: + complex(kind=kind(0.0d0)) :: alpha + integer :: strideX, strideY, N + ! .. + ! Array arguments: + complex(kind=kind(0.0d0)) :: x(*), y(*) + ! .. + ! Local scalars: + integer :: ix, iy, i + ! .. + if ( N <= 0 .OR. dcabs1( alpha ) == 0.0 ) then + return + end if + ! .. + if ( strideX == 1 .AND. strideY == 1 ) then + do i = 1, N + y( i ) = y( i ) + alpha * x( i ) + end do + else + if ( strideX < 0 ) then + ix = ((1-N)*strideX) + 1 + else + ix = 1 + end if + if ( strideY < 0 ) then + iy = ((1-N)*strideY) + 1 + else + iy = 1 + end if + do i = 1, N + y( iy ) = y( iy ) + alpha * x( ix ) + ix = ix + strideX + iy = iy + strideY + end do + end if + return +end subroutine zcopy diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c new file mode 100644 index 000000000000..13517d37175e --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c @@ -0,0 +1,38 @@ +/** +* @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/zaxpy.h" +#include "stdlib/blas/base/zaxpy_fortran.h" +#include "stdlib/blas/base/shared.h" +#include "stdlib/complex/float64/ctor.h" +#include "stdlib/blas/base/xerbla.h" + +/** +* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector. +* +* @param N number of indexed elements +* @param alpha scalar constant +* @param X input array +* @param strideX X stride length +* @param Y output array +* @param strideY Y stride length +*/ +void API_SUFFIX(c_zaxpy)( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY ) { + zaxpy( &N, &alpha, X, &strideX, Y, &strideY ); + return; +} From cd22030eb26899f16ae200aad9a9accca392faa9 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:09:27 +0530 Subject: [PATCH 14/28] chore: update package name --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 06181759ceb8..7a3dd0582745 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -54,7 +54,7 @@ ! @param {Array>} y - output array ! @param {integer} strideY - `y` stride length !< -subroutine zapxy( N, alpha, x, strideX, y, strideY ) +subroutine zaxpy( N, alpha, x, strideX, y, strideY ) implicit none ! .. ! Scalar arguments: From e86b6dec2a399d9047b1082a68f08cbd3324885c Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:11:54 +0530 Subject: [PATCH 15/28] chore: update package name --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 7a3dd0582745..1feb8e3ca71c 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -93,4 +93,4 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) end do end if return -end subroutine zcopy +end subroutine zaxpy From 4ff51c9e28c5fe234eb4a9e7aac13b78fa7b519e Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:19:16 +0530 Subject: [PATCH 16/28] chore: update FORTRAN --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 1feb8e3ca71c..296fde7fe163 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -57,6 +57,13 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) implicit none ! .. + ! External functions: + interface + real function scabs1( c ) + complex :: c + end function scabs1 + end interface + ! .. ! Scalar arguments: complex(kind=kind(0.0d0)) :: alpha integer :: strideX, strideY, N From e05707e0b85934a4b71df97a5438f3d688c7f198 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:23:27 +0530 Subject: [PATCH 17/28] chore: update FORTRAN --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 296fde7fe163..cab6b2ab9a68 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,9 +59,9 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - real function scabs1( c ) + real function dcabs1( c ) complex :: c - end function scabs1 + end function dcabs1 end interface ! .. ! Scalar arguments: From 736333c149dbd089cf3a3dae85f8e04ad1bbdd73 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:28:35 +0530 Subject: [PATCH 18/28] chore: update FORTRAN --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index cab6b2ab9a68..044b41ae5c81 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,8 +59,8 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - real function dcabs1( c ) - complex :: c + real(kind=kind(0.0d0)) function dcabs1( c ) + complex(kind=kind(0.0d0)) :: c end function dcabs1 end interface ! .. From 77a536a139cb6f7e333bbbcb4ca52adccbf65845 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:34:16 +0530 Subject: [PATCH 19/28] chore: add include file for FORTRAN --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../include/stdlib/blas/base/zaxpy_fortran.h | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_fortran.h diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_fortran.h b/lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_fortran.h new file mode 100644 index 000000000000..cdcde75024ca --- /dev/null +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_fortran.h @@ -0,0 +1,43 @@ +/** +* @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. +*/ + +/** +* Header file containing function declarations for the Fortran interface to the BLAS Level 1 routine `zaxpy`. +*/ +#ifndef STDLIB_BLAS_BASE_ZAXPY_FORTRAN_H +#define STDLIB_BLAS_BASE_ZAXPY_FORTRAN_H + +#include "stdlib/complex/float64/ctor.h" + +/* +* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C/Fortran compiler (a Fortran compiler must be configured to not attach underscores). +*/ +#ifdef __cplusplus +extern "C" { +#endif + +/** +* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector. +*/ +void zaxpy( const int *, const stdlib_complex128_t *, const void *, const int *, void *, const int * ); + +#ifdef __cplusplus +} +#endif + +#endif // !STDLIB_BLAS_BASE_ZAXPY_FORTRAN_H From 8bd7a53cc3974145e7b058816ca13a253c5c0b1b Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:38:58 +0530 Subject: [PATCH 20/28] remove: unused packages --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: missing_dependencies - 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/zaxpy/src/zaxpy_f.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c index 13517d37175e..3846d8dc4e4e 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy_f.c @@ -20,7 +20,6 @@ #include "stdlib/blas/base/zaxpy_fortran.h" #include "stdlib/blas/base/shared.h" #include "stdlib/complex/float64/ctor.h" -#include "stdlib/blas/base/xerbla.h" /** * Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector. From d1e7cde64ef2ebfde327abb94cd412588dc5ad11 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:44:01 +0530 Subject: [PATCH 21/28] chore: update package name --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 044b41ae5c81..cb93493c7e67 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,8 +59,8 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - real(kind=kind(0.0d0)) function dcabs1( c ) - complex(kind=kind(0.0d0)) :: c + double precision function dcabs1( z ) + complex(kind=kind(0.0d0)) :: z end function dcabs1 end interface ! .. From 4a43dd09889c3c7c1e750ea42ccccf5ec2e5fde1 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:52:55 +0530 Subject: [PATCH 22/28] chore: update package name --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index cb93493c7e67..f3062fdd197f 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,7 +59,7 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - double precision function dcabs1( z ) + subroutine dcabs1( z ) complex(kind=kind(0.0d0)) :: z end function dcabs1 end interface From 90bead424177704b641fc843b9d10d2ae1ed3257 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 21:58:09 +0530 Subject: [PATCH 23/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index f3062fdd197f..fed20cfa0b97 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -61,7 +61,7 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) interface subroutine dcabs1( z ) complex(kind=kind(0.0d0)) :: z - end function dcabs1 + end subroutine dcabs1 end interface ! .. ! Scalar arguments: From beb361147a45482ddbd6e0ffe0ec5c674c2bd797 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 22:05:21 +0530 Subject: [PATCH 24/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index fed20cfa0b97..91d829b1eaf6 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,9 +59,9 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - subroutine dcabs1( z ) + function dcabs1( z ) complex(kind=kind(0.0d0)) :: z - end subroutine dcabs1 + end function dcabs1 end interface ! .. ! Scalar arguments: From 7252cc643ef5e1a907ab2658d7ae2e37ecb2e1d8 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 22:07:55 +0530 Subject: [PATCH 25/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 91d829b1eaf6..fed20cfa0b97 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -59,9 +59,9 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) ! .. ! External functions: interface - function dcabs1( z ) + subroutine dcabs1( z ) complex(kind=kind(0.0d0)) :: z - end function dcabs1 + end subroutine dcabs1 end interface ! .. ! Scalar arguments: From debc6329760e2b89252027c064094f76dafff3f4 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 22:09:48 +0530 Subject: [PATCH 26/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index fed20cfa0b97..53e02411135b 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -57,12 +57,8 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) implicit none ! .. - ! External functions: - interface - subroutine dcabs1( z ) - complex(kind=kind(0.0d0)) :: z - end subroutine dcabs1 - end interface + ! Intrinsic functions: + intrinsic dcabs1 ! .. ! Scalar arguments: complex(kind=kind(0.0d0)) :: alpha From 761f4ecec08d2924a9063534269658944001832e Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 22:16:03 +0530 Subject: [PATCH 27/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 53e02411135b..8caa65747731 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -57,8 +57,9 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) implicit none ! .. - ! Intrinsic functions: - intrinsic dcabs1 + ! External functions: + real(dp) :: dcabs1 + external dcabs1 ! .. ! Scalar arguments: complex(kind=kind(0.0d0)) :: alpha From ab325fd8863abb23ac6e5a3d82d375b5f2d78632 Mon Sep 17 00:00:00 2001 From: Shabareesh Shetty Date: Thu, 14 Aug 2025 22:26:04 +0530 Subject: [PATCH 28/28] chore: fix FORTRAN errors --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f index 8caa65747731..aea5b80cfd6e 100644 --- a/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f +++ b/lib/node_modules/@stdlib/blas/base/zaxpy/src/zaxpy.f @@ -58,7 +58,7 @@ subroutine zaxpy( N, alpha, x, strideX, y, strideY ) implicit none ! .. ! External functions: - real(dp) :: dcabs1 + complex(kind=kind(0.0d0)) :: dcabs1 external dcabs1 ! .. ! Scalar arguments: