diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md b/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md index 70e7012cabc4..5ded85e045b3 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md @@ -20,7 +20,7 @@ limitations under the License. # dapx -> Add a constant to each element in a double-precision floating-point strided array. +> Add a scalar constant to each element in a double-precision floating-point strided array.
@@ -32,7 +32,7 @@ var dapx = require( '@stdlib/blas/ext/base/dapx' ); #### dapx( N, alpha, x, strideX ) -Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array. +Adds a scalar constant to each element in a double-precision floating-point strided array. ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -48,9 +48,9 @@ The function has the following parameters: - **N**: number of indexed elements. - **alpha**: scalar constant. - **x**: input [`Float64Array`][@stdlib/array/float64]. -- **strideX**: index increment. +- **strideX**: stride length for `x`. -The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to add a constant to every other element +The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to add a constant to every other element: ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -79,7 +79,7 @@ dapx( 3, 5.0, x1, 2 ); #### dapx.ndarray( N, alpha, x, strideX, offsetX ) -Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array using alternative indexing semantics. +Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics. ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -94,7 +94,7 @@ The function has the following additional parameters: - **offsetX**: starting index. -While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access only the last three elements of the strided array +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access only the last three elements: ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -170,7 +170,7 @@ console.log( x ); #### c_dapx( N, alpha, \*X, strideX ) -Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array. +Adds a scalar constant to each element in a double-precision floating-point strided array. ```c double x[] = { 1.0, 2.0, 3.0, 4.0 }; @@ -184,7 +184,7 @@ The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. - **alpha**: `[in] double` scalar constant. - **X**: `[inout] double*` input array. -- **strideX**: `[in] CBLAS_INT` index increment for `X`. +- **strideX**: `[in] CBLAS_INT` stride length for `X`. ```c void c_dapx( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ); @@ -192,7 +192,7 @@ void c_dapx( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT s #### c_dapx_ndarray( N, alpha, \*X, strideX, offsetX ) -Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array `X` using alternative indexing semantics. +Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics. ```c double x[] = { 1.0, 2.0, 3.0, 4.0 }; @@ -205,7 +205,7 @@ The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. - **alpha**: `[in] double` scalar constant. - **X**: `[inout] 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`. ```c @@ -260,7 +260,7 @@ int main( void ) {
- +W diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/dapx/benchmark/c/benchmark.length.c index dd8eed453142..8cc7126d086a 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/benchmark/c/benchmark.length.c @@ -105,6 +105,7 @@ static double benchmark1( int iterations, int len ) { } t = tic(); for ( i = 0; i < iterations; i++ ) { + // cppcheck-suppress uninitvar c_dapx( len, 5.0, x, 1 ); if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); @@ -129,6 +130,7 @@ static double benchmark2( int iterations, int len ) { } t = tic(); for ( i = 0; i < iterations; i++ ) { + // cppcheck-suppress uninitvar c_dapx_ndarray( len, 5.0, x, 1, 0 ); if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/repl.txt b/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/repl.txt index c948221663c6..8f4fa9254c51 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/repl.txt +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/repl.txt @@ -17,13 +17,13 @@ Number of indexed elements. alpha: number - Constant. + Scalar constant. x: Float64Array Input array. strideX: integer - Index increment. + Stride length. Returns ------- @@ -65,13 +65,13 @@ Number of indexed elements. alpha: number - Constant. + Scalar constant. x: Float64Array Input array. strideX: integer - Index increment. + Stride length. offsetX: integer Starting index. diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/types/index.d.ts index b0f4cf18005c..2cea919d0142 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/docs/types/index.d.ts @@ -26,7 +26,7 @@ interface Routine { * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param N - number of indexed elements - * @param alpha - constant + * @param alpha - scalar constant * @param x - input array * @param strideX - stride length * @returns input array @@ -45,7 +45,7 @@ interface Routine { * Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics. * * @param N - number of indexed elements - * @param alpha - constant + * @param alpha - scalar constant * @param x - input array * @param strideX - stride length * @param offsetX - starting index @@ -66,7 +66,7 @@ interface Routine { * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param N - number of indexed elements -* @param alpha - constant +* @param alpha - scalar constant * @param x - input array * @param strideX - stride length * @returns input array diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.js b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.js index 2031033ba8c5..812a50f24a6b 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.js @@ -30,9 +30,9 @@ var ndarray = require( './ndarray.js' ); * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} alpha - scalar +* @param {number} alpha - scalar constant * @param {Float64Array} x - input array -* @param {integer} strideX - index increment +* @param {integer} strideX - stride length * @returns {Float64Array} input array * * @example diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.native.js b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.native.js index 7ff6386fcdc0..aa766d1abfdd 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.native.js @@ -29,9 +29,9 @@ var addon = require( './../src/addon.node' ); * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} alpha - scalar +* @param {number} alpha - scalar constant * @param {Float64Array} x - input array -* @param {integer} strideX - index increment +* @param {integer} strideX - stride length * @returns {Float64Array} input array * * @example diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.js b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.js index 7129ebb491b9..efe6621ddb44 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.js @@ -29,9 +29,9 @@ var M = 5; * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} alpha - scalar +* @param {number} alpha - scalar constant * @param {Float64Array} x - input array -* @param {integer} strideX - index increment +* @param {integer} strideX - stride length * @param {NonNegativeInteger} offsetX - starting index * @returns {Float64Array} input array * diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.native.js b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.native.js index f0f0bccc0b95..f743b6fac10a 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.native.js +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.native.js @@ -29,9 +29,9 @@ var addon = require( './../src/addon.node' ); * Adds a scalar constant to each element in a double-precision floating-point strided array. * * @param {PositiveInteger} N - number of indexed elements -* @param {number} alpha - scalar +* @param {number} alpha - scalar constant * @param {Float64Array} x - input array -* @param {integer} strideX - index increment +* @param {integer} strideX - stride length * @param {NonNegativeInteger} offsetX - starting index * @returns {Float64Array} input array * diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/dapx/src/main.c index 6952b077c702..193e2fec7590 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/src/main.c @@ -23,10 +23,10 @@ /** * Adds a scalar constant to each element in a double-precision floating-point strided array. * -* @param N number of indexed elements -* @param alpha scalar -* @param X input array -* @param strideX index increment +* @param N number of indexed elements +* @param alpha scalar constant +* @param X input array +* @param strideX stride length */ void API_SUFFIX(c_dapx)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ) { CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); @@ -36,10 +36,10 @@ void API_SUFFIX(c_dapx)( const CBLAS_INT N, const double alpha, double *X, const /** * Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics. * -* @param N number of indexed elements -* @param alpha scalar -* @param X input array -* @param strideX index increment +* @param N number of indexed elements +* @param alpha scalar constant +* @param X input array +* @param strideX stride length * @param offsetX starting index */ void API_SUFFIX(c_dapx_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {