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 f0a97cb8c937..c6a3afbd39f4 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/README.md @@ -48,7 +48,7 @@ The function has the following parameters: - **N**: number of indexed elements. - **alpha**: scalar constant. - **x**: input [`Float64Array`][@stdlib/array/float64]. -- **strideX**: stride length for `x`. +- **strideX**: stride length. 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: @@ -168,14 +168,14 @@ console.log( x ); #include "stdlib/blas/ext/base/dapx.h" ``` -#### c_dapx( N, alpha, \*X, strideX ) +#### stdlib_strided_dapx( N, alpha, \*X, strideX ) 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 }; -c_dapx( 4, 5.0, x, 1 ); +stdlib_strided_dapx( 4, 5.0, x, 1 ); ``` @@ -187,17 +187,17 @@ The function accepts the following arguments: - **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 ); +void stdlib_strided_dapx( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ); ``` -#### c_dapx_ndarray( N, alpha, \*X, strideX, offsetX ) +#### stdlib_strided_dapx_ndarray( N, alpha, \*X, strideX, offsetX ) 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 }; -c_dapx_ndarray( 4, 5.0, x, 1, 0 ); +stdlib_strided_dapx_ndarray( 4, 5.0, x, 1, 0 ); ``` The function accepts the following arguments: @@ -205,11 +205,11 @@ 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` stride length for `X`. -- **offsetX**: `[in] CBLAS_INT` starting index for `X`. +- **strideX**: `[in] CBLAS_INT` stride length. +- **offsetX**: `[in] CBLAS_INT` starting index. ```c -void c_dapx_ndarray( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ); +void stdlib_strided_dapx_ndarray( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ); ``` @@ -245,7 +245,7 @@ int main( void ) { const int strideX = 1; // Fill the array: - c_dapx( N, 5.0, x, strideX ); + stdlib_strided_dapx( N, 5.0, x, strideX ); // Print the result: for ( int i = 0; i < 8; i++ ) { 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 a4e9dbd372b0..678f2c5df6c1 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 @@ -106,7 +106,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 ); + stdlib_strided_dapx( len, 5.0, x, 1 ); if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); break; @@ -131,7 +131,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 ); + stdlib_strided_dapx_ndarray( len, 5.0, x, 1, 0 ); if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); break; diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/examples/c/example.c b/lib/node_modules/@stdlib/blas/ext/base/dapx/examples/c/example.c index ec1ac38026ef..e77cbe0d09ba 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/examples/c/example.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/examples/c/example.c @@ -30,7 +30,7 @@ int main( void ) { const int strideX = 1; // Add a constant to each element: - c_dapx( N, 5.0, x, strideX ); + stdlib_strided_dapx( N, 5.0, x, strideX ); // Print the result: for ( int i = 0; i < 8; i++ ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/include/stdlib/blas/ext/base/dapx.h b/lib/node_modules/@stdlib/blas/ext/base/dapx/include/stdlib/blas/ext/base/dapx.h index d292078b1ca3..7298dbee5a8f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/include/stdlib/blas/ext/base/dapx.h +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/include/stdlib/blas/ext/base/dapx.h @@ -31,12 +31,12 @@ extern "C" { /** * Adds a scalar constant to each element in a double-precision floating-point strided array. */ -void API_SUFFIX(c_dapx)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ); +void API_SUFFIX(stdlib_strided_dapx)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ); /** * Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics. */ -void API_SUFFIX(c_dapx_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ); +void API_SUFFIX(stdlib_strided_dapx_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ); #ifdef __cplusplus } 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 efe6621ddb44..d13e30fd1128 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 @@ -39,9 +39,8 @@ var M = 5; * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); -* var alpha = 5.0; * -* dapx( 3, alpha, x, 1, x.length-3 ); +* dapx( 3, 5.0, x, 1, x.length-3 ); * // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ] */ function dapx( N, alpha, x, strideX, offsetX ) { 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 f743b6fac10a..c9291a1a3c20 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 @@ -39,9 +39,8 @@ var addon = require( './../src/addon.node' ); * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] ); -* var alpha = 5.0; * -* dapx( 3, alpha, x, 1, x.length-3 ); +* dapx( 3, 5.0, x, 1, x.length-3 ); * // x => [ 1.0, -2.0, 3.0, 1.0, 10.0, -1.0 ] */ function dapx( N, alpha, x, strideX, offsetX ) { diff --git a/lib/node_modules/@stdlib/blas/ext/base/dapx/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/dapx/src/addon.c index 455f74e295db..88e2c6bb251c 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dapx/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dapx/src/addon.c @@ -38,7 +38,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_DOUBLE( env, alpha, argv, 1 ); STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 ); - API_SUFFIX(c_dapx)( N, alpha, X, strideX ); + API_SUFFIX(stdlib_strided_dapx)( N, alpha, X, strideX ); return NULL; } @@ -56,7 +56,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) { STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 3 ); STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 4 ); STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 2 ); - API_SUFFIX(c_dapx_ndarray)( N, alpha, X, strideX, offsetX ); + API_SUFFIX(stdlib_strided_dapx_ndarray)( N, alpha, X, strideX, offsetX ); return NULL; } 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 193e2fec7590..dd9e1084271b 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 @@ -28,9 +28,9 @@ * @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 ) { +void API_SUFFIX(stdlib_strided_dapx)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ) { CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX ); - API_SUFFIX(c_dapx_ndarray)( N, alpha, X, strideX, ox ); + API_SUFFIX(stdlib_strided_dapx_ndarray)( N, alpha, X, strideX, ox ); } /** @@ -42,7 +42,7 @@ void API_SUFFIX(c_dapx)( const CBLAS_INT N, const double alpha, double *X, const * @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 ) { +void API_SUFFIX(stdlib_strided_dapx_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) { CBLAS_INT ix; CBLAS_INT m; CBLAS_INT i;