From a53c7d315325ea51c825b10e4419b47730eb745f Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Mon, 10 Feb 2025 10:43:20 +0000 Subject: [PATCH] docs: update to follow current project conventions --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../blas/ext/base/dcusumkbn2/README.md | 28 ++++++++----------- .../blas/ext/base/dcusumkbn2/docs/repl.txt | 16 +++++------ .../ext/base/dcusumkbn2/docs/types/index.d.ts | 12 ++++---- .../ext/base/dcusumkbn2/lib/dcusumkbn2.js | 4 +-- .../base/dcusumkbn2/lib/dcusumkbn2.native.js | 7 ++--- .../blas/ext/base/dcusumkbn2/lib/index.js | 6 ++-- .../blas/ext/base/dcusumkbn2/lib/ndarray.js | 7 ++--- .../ext/base/dcusumkbn2/lib/ndarray.native.js | 7 ++--- .../blas/ext/base/dcusumkbn2/src/main.c | 12 ++++---- 9 files changed, 44 insertions(+), 55 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/README.md b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/README.md index 60925aa656d9..2c80cfad2104 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/README.md @@ -61,11 +61,11 @@ The function has the following parameters: - **N**: number of indexed elements. - **sum**: initial sum. - **x**: input [`Float64Array`][@stdlib/array/float64]. -- **strideX**: index increment for `x`. +- **strideX**: stride length for `x`. - **y**: output [`Float64Array`][@stdlib/array/float64]. -- **strideY**: index increment for `y`. +- **strideY**: stride length for `y`. -The `N` and stride parameters determine which elements in `x` and `y` are accessed at runtime. For example, to compute the cumulative sum of every other element in `x`, +The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to compute the cumulative sum of every other element: ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -73,9 +73,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] ); var y = new Float64Array( x.length ); -var N = 4; - -var v = dcusumkbn2( N, 0.0, x, 2, y, 1 ); +var v = dcusumkbn2( 4, 0.0, x, 2, y, 1 ); // y => [ 1.0, 3.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ] ``` @@ -94,9 +92,7 @@ var y0 = new Float64Array( x0.length ); 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*3 ); // start at 4th element -var N = 4; - -dcusumkbn2( N, 0.0, x1, -2, y1, 1 ); +dcusumkbn2( 4, 0.0, x1, -2, y1, 1 ); // y0 => [ 0.0, 0.0, 0.0, 4.0, 6.0, 4.0, 5.0, 0.0 ] ``` @@ -119,7 +115,7 @@ The function has the following additional parameters: - **offsetX**: starting index for `x`. - **offsetY**: starting index for `y`. -While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offsetX and offsetY parameters support indexing semantics based on a starting indices. For example, to calculate the cumulative sum of every other value in `x` starting from the second value and to store in the last `N` elements of `y` starting from the last element +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, to calculate the cumulative sum of every other value in `x` starting from the second value and to store in the last `N` elements of `y` starting from the last element: ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -127,9 +123,7 @@ var Float64Array = require( '@stdlib/array/float64' ); var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] ); var y = new Float64Array( x.length ); -var N = 4; - -dcusumkbn2.ndarray( N, 0.0, x, 2, 1, y, -1, y.length-1 ); +dcusumkbn2.ndarray( 4, 0.0, x, 2, 1, y, -1, y.length-1 ); // y => [ 0.0, 0.0, 0.0, 0.0, 5.0, 1.0, -1.0, 1.0 ] ``` @@ -216,9 +210,9 @@ The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. - **sum**: `[in] double` initial sum. - **X**: `[in] double*` input array. -- **strideX**: `[in] CBLAS_INT` index increment for `X`. +- **strideX**: `[in] CBLAS_INT` stride length for `X`. - **Y**: `[out] double*` output array. -- **strideY**: `[in] CBLAS_INT` index increment for `Y`. +- **strideY**: `[in] CBLAS_INT` stride length for `Y`. ```c void stdlib_strided_dcusumkbn2( const CBLAS_INT N, const double sum, const double *X, const CBLAS_INT strideX, double *Y, const CBLAS_INT strideY ); @@ -244,10 +238,10 @@ The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. - **sum**: `[in] double` initial sum. - **X**: `[in] double*` input array. -- **strideX**: `[in] CBLAS_INT` index increment for `X`. +- **strideX**: `[in] CBLAS_INT` stride length for `X`. - **offsetX**: `[in] CBLAS_INT` starting index for `X`. - **Y**: `[out] double*` output array. -- **strideY**: `[in] CBLAS_INT` index increment for `Y`. +- **strideY**: `[in] CBLAS_INT` stride length for `Y`. - **offsetY**: `[in] CBLAS_INT` starting index for `Y`. ```c diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/repl.txt index 11b3c74bc0c0..1b915db954c4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/repl.txt @@ -3,8 +3,8 @@ Computes the cumulative sum of double-precision floating-point strided array elements using a second-order iterative Kahan–Babuška algorithm. - The `N` and stride parameters determine which elements in the strided - arrays are accessed at runtime. + The `N` and stride parameters determine which elements in the strided arrays + are accessed at runtime. Indexing is relative to the first index. To introduce an offset, use a typed array view. @@ -23,13 +23,13 @@ Input array. strideX: integer - Index increment for `x`. + Stride length for `x`. y: Float64Array Output array. strideY: integer - Index increment for `y`. + Stride length for `y`. Returns ------- @@ -67,8 +67,8 @@ alternative indexing semantics. While typed array views mandate a view offset based on the underlying - buffer, the offset parameters support indexing semantics based on a - starting index. + buffer, the offset parameters support indexing semantics based on starting + indices. Parameters ---------- @@ -82,7 +82,7 @@ Input array. strideX: integer - Index increment for `x`. + Stride length for `x`. offsetX: integer Starting index for `x`. @@ -91,7 +91,7 @@ Output array. strideY: integer - Index increment for `y`. + Stride length for `y`. offsetY: integer Starting index for `y`. diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/types/index.d.ts index a6b7e8e1012f..9cc6919e7edb 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/docs/types/index.d.ts @@ -28,9 +28,9 @@ interface Routine { * @param N - number of indexed elements * @param sum - initial sum * @param x - input array - * @param strideX - `x` stride length + * @param strideX - stride length for `x` * @param y - output array - * @param strideY - `y` stride length + * @param strideY - stride length for `y` * @returns output array * * @example @@ -50,10 +50,10 @@ interface Routine { * @param N - number of indexed elements * @param sum - initial sum * @param x - input array - * @param strideX - `x` stride length + * @param strideX - stride length for `x` * @param offsetX - starting index for `x` * @param y - output array - * @param strideY - `y` stride length + * @param strideY - stride length for `y` * @param offsetY - starting index for `y` * @returns output array * @@ -75,9 +75,9 @@ interface Routine { * @param N - number of indexed elements * @param sum - initial sum * @param x - input array -* @param strideX - `x` stride length +* @param strideX - stride length for `x` * @param y - output array -* @param strideY - `y` stride length +* @param strideY - stride length for `y` * @returns output array * * @example diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.js b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.js index 080169500ba4..d66f550c0fd7 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.js @@ -40,9 +40,9 @@ var ndarray = require( './ndarray.js' ); * @param {PositiveInteger} N - number of indexed elements * @param {number} sum - initial sum * @param {Float64Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {Float64Array} y - output array -* @param {integer} strideY - `y` stride length +* @param {integer} strideY - stride length for `y` * @returns {Float64Array} output array * * @example diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.native.js b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.native.js index bab8e4fa5dc8..26a8b3761d87 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/dcusumkbn2.native.js @@ -31,9 +31,9 @@ var addon = require( './../src/addon.node' ); * @param {PositiveInteger} N - number of indexed elements * @param {number} sum - initial sum * @param {Float64Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {Float64Array} y - output array -* @param {integer} strideY - `y` stride length +* @param {integer} strideY - stride length for `y` * @returns {Float64Array} output array * * @example @@ -41,9 +41,8 @@ var addon = require( './../src/addon.node' ); * * var x = new Float64Array( [ 1.0, -2.0, 2.0 ] ); * var y = new Float64Array( x.length ); -* var N = x.length; * -* var v = dcusumkbn2( N, 0.0, x, 1, y, 1 ); +* var v = dcusumkbn2( x.length, 0.0, x, 1, y, 1 ); * // returns [ 1.0, -1.0, 1.0 ] */ function dcusumkbn2( N, sum, x, strideX, y, strideY ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/index.js b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/index.js index 9c5b5c1d8f96..d36d745d83d9 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/index.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/index.js @@ -29,9 +29,8 @@ * * var x = new Float64Array( [ 1.0, -2.0, 2.0 ] ); * var y = new Float64Array( x.length ); -* var N = x.length; * -* dcusumkbn2( N, 0.0, x, 1, y, 1 ); +* dcusumkbn2( x.length, 0.0, x, 1, y, 1 ); * // y => [ 1.0, -1.0, 1.0 ] * * @example @@ -40,9 +39,8 @@ * * var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] ); * var y = new Float64Array( x.length ); -* var N = 4; * -* dcusumkbn2.ndarray( N, 0.0, x, 2, 1, y, 1, 0 ); +* dcusumkbn2.ndarray( 4, 0.0, x, 2, 1, y, 1, 0 ); * // y => [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ] */ diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.js index b7f663f165c9..0266ad8fa62d 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.js @@ -39,10 +39,10 @@ var abs = require( '@stdlib/math/base/special/abs' ); * @param {PositiveInteger} N - number of indexed elements * @param {number} sum - initial sum * @param {Float64Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {NonNegativeInteger} offsetX - starting index for `x` * @param {Float64Array} y - output array -* @param {integer} strideY - `y` stride length +* @param {integer} strideY - stride length for `y` * @param {NonNegativeInteger} offsetY - starting index for `y` * @returns {Float64Array} output array * @@ -51,9 +51,8 @@ var abs = require( '@stdlib/math/base/special/abs' ); * * var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] ); * var y = new Float64Array( x.length ); -* var N = 4; * -* var v = dcusumkbn2( N, 0.0, x, 2, 1, y, 1, 0 ); +* var v = dcusumkbn2( 4, 0.0, x, 2, 1, y, 1, 0 ); * // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ] */ function dcusumkbn2( N, sum, x, strideX, offsetX, y, strideY, offsetY ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.native.js index 9d96b18181c0..7f11671567ac 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/lib/ndarray.native.js @@ -31,10 +31,10 @@ var addon = require( './../src/addon.node' ); * @param {PositiveInteger} N - number of indexed elements * @param {number} sum - initial sum * @param {Float64Array} x - input array -* @param {integer} strideX - `x` stride length +* @param {integer} strideX - stride length for `x` * @param {NonNegativeInteger} offsetX - starting index for `x` * @param {Float64Array} y - output array -* @param {integer} strideY - `y` stride length +* @param {integer} strideY - stride length for `y` * @param {NonNegativeInteger} offsetY - starting index for `y` * @returns {Float64Array} output array * @@ -42,9 +42,8 @@ var addon = require( './../src/addon.node' ); * var Float64Array = require( '@stdlib/array/float64' ); * var x = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] ); * var y = new Float64Array( x.length ); -* var N = 4; * -* var v = dcusumkbn2( N, 0.0, x, 2, 1, y, 1, 0 ); +* var v = dcusumkbn2( 4, 0.0, x, 2, 1, y, 1, 0 ); * // returns [ 1.0, -1.0, 1.0, 5.0, 0.0, 0.0, 0.0, 0.0 ] */ function dcusumkbn2( N, sum, x, strideX, offsetX, y, strideY, offsetY ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/src/main.c index b22bf237e8e8..04bf30949ff8 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dcusumkbn2/src/main.c @@ -35,9 +35,9 @@ * @param N number of indexed elements * @param sum initial sum * @param X input array -* @param strideX X stride length +* @param strideX stride length for X * @param Y output array -* @param strideY Y stride length +* @param strideY stride length for Y */ void API_SUFFIX(stdlib_strided_dcusumkbn2)( const CBLAS_INT N, const double sum, const double *X, const CBLAS_INT strideX, double *Y, const CBLAS_INT strideY ) { const CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); @@ -59,11 +59,11 @@ void API_SUFFIX(stdlib_strided_dcusumkbn2)( const CBLAS_INT N, const double sum, * @param N number of indexed elements * @param sum initial sum * @param X input array -* @param strideX X index increment -* @param offsetX X starting index +* @param strideX stride length for X +* @param offsetX starting index for X * @param Y output array -* @param strideY Y index increment -* @param offsetY Y starting index +* @param strideY stride length for Y +* @param offsetY stating index for Y */ void API_SUFFIX(stdlib_strided_dcusumkbn2_ndarray)( const CBLAS_INT N, const double sum, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, double *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) { double ccs;