Skip to content

Commit 9c913e5

Browse files
authored
docs: update descriptions of the function and its parameters in blas/ext/base/dapx
PR-URL: stdlib-js#3226 Reviewed-by: Philipp Burckhardt <[email protected]>
1 parent 917119f commit 9c913e5

File tree

9 files changed

+36
-34
lines changed

9 files changed

+36
-34
lines changed

lib/node_modules/@stdlib/blas/ext/base/dapx/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# dapx
2222

23-
> Add a constant to each element in a double-precision floating-point strided array.
23+
> Add a scalar constant to each element in a double-precision floating-point strided array.
2424
2525
<section class="usage">
2626

@@ -32,7 +32,7 @@ var dapx = require( '@stdlib/blas/ext/base/dapx' );
3232

3333
#### dapx( N, alpha, x, strideX )
3434

35-
Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array.
35+
Adds a scalar constant to each element in a double-precision floating-point strided array.
3636

3737
```javascript
3838
var Float64Array = require( '@stdlib/array/float64' );
@@ -48,9 +48,9 @@ The function has the following parameters:
4848
- **N**: number of indexed elements.
4949
- **alpha**: scalar constant.
5050
- **x**: input [`Float64Array`][@stdlib/array/float64].
51-
- **strideX**: index increment.
51+
- **strideX**: stride length for `x`.
5252

53-
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
53+
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:
5454

5555
```javascript
5656
var Float64Array = require( '@stdlib/array/float64' );
@@ -79,7 +79,7 @@ dapx( 3, 5.0, x1, 2 );
7979

8080
#### dapx.ndarray( N, alpha, x, strideX, offsetX )
8181

82-
Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array using alternative indexing semantics.
82+
Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics.
8383

8484
```javascript
8585
var Float64Array = require( '@stdlib/array/float64' );
@@ -94,7 +94,7 @@ The function has the following additional parameters:
9494

9595
- **offsetX**: starting index.
9696

97-
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
97+
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:
9898

9999
```javascript
100100
var Float64Array = require( '@stdlib/array/float64' );
@@ -170,7 +170,7 @@ console.log( x );
170170

171171
#### c_dapx( N, alpha, \*X, strideX )
172172

173-
Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array.
173+
Adds a scalar constant to each element in a double-precision floating-point strided array.
174174

175175
```c
176176
double x[] = { 1.0, 2.0, 3.0, 4.0 };
@@ -184,15 +184,15 @@ The function accepts the following arguments:
184184
- **N**: `[in] CBLAS_INT` number of indexed elements.
185185
- **alpha**: `[in] double` scalar constant.
186186
- **X**: `[inout] double*` input array.
187-
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
187+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
188188
189189
```c
190190
void c_dapx( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX );
191191
```
192192

193193
#### c_dapx_ndarray( N, alpha, \*X, strideX, offsetX )
194194

195-
Adds a scalar constant `alpha` to each element in a double-precision floating-point strided array `X` using alternative indexing semantics.
195+
Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics.
196196

197197
```c
198198
double x[] = { 1.0, 2.0, 3.0, 4.0 };
@@ -205,7 +205,7 @@ The function accepts the following arguments:
205205
- **N**: `[in] CBLAS_INT` number of indexed elements.
206206
- **alpha**: `[in] double` scalar constant.
207207
- **X**: `[inout] double*` input array.
208-
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
208+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
209209
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
210210
211211
```c
@@ -260,7 +260,7 @@ int main( void ) {
260260
261261
</section>
262262
263-
<!-- /.c -->
263+
W<!-- /.c -->
264264
265265
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
266266

lib/node_modules/@stdlib/blas/ext/base/dapx/benchmark/c/benchmark.length.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static double benchmark1( int iterations, int len ) {
105105
}
106106
t = tic();
107107
for ( i = 0; i < iterations; i++ ) {
108+
// cppcheck-suppress uninitvar
108109
c_dapx( len, 5.0, x, 1 );
109110
if ( x[ 0 ] != x[ 0 ] ) {
110111
printf( "should not return NaN\n" );
@@ -129,6 +130,7 @@ static double benchmark2( int iterations, int len ) {
129130
}
130131
t = tic();
131132
for ( i = 0; i < iterations; i++ ) {
133+
// cppcheck-suppress uninitvar
132134
c_dapx_ndarray( len, 5.0, x, 1, 0 );
133135
if ( x[ 0 ] != x[ 0 ] ) {
134136
printf( "should not return NaN\n" );

lib/node_modules/@stdlib/blas/ext/base/dapx/docs/repl.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
Number of indexed elements.
1818

1919
alpha: number
20-
Constant.
20+
Scalar constant.
2121

2222
x: Float64Array
2323
Input array.
2424

2525
strideX: integer
26-
Index increment.
26+
Stride length.
2727

2828
Returns
2929
-------
@@ -65,13 +65,13 @@
6565
Number of indexed elements.
6666

6767
alpha: number
68-
Constant.
68+
Scalar constant.
6969

7070
x: Float64Array
7171
Input array.
7272

7373
strideX: integer
74-
Index increment.
74+
Stride length.
7575

7676
offsetX: integer
7777
Starting index.

lib/node_modules/@stdlib/blas/ext/base/dapx/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface Routine {
2626
* Adds a scalar constant to each element in a double-precision floating-point strided array.
2727
*
2828
* @param N - number of indexed elements
29-
* @param alpha - constant
29+
* @param alpha - scalar constant
3030
* @param x - input array
3131
* @param strideX - stride length
3232
* @returns input array
@@ -45,7 +45,7 @@ interface Routine {
4545
* Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics.
4646
*
4747
* @param N - number of indexed elements
48-
* @param alpha - constant
48+
* @param alpha - scalar constant
4949
* @param x - input array
5050
* @param strideX - stride length
5151
* @param offsetX - starting index
@@ -66,7 +66,7 @@ interface Routine {
6666
* Adds a scalar constant to each element in a double-precision floating-point strided array.
6767
*
6868
* @param N - number of indexed elements
69-
* @param alpha - constant
69+
* @param alpha - scalar constant
7070
* @param x - input array
7171
* @param strideX - stride length
7272
* @returns input array

lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ var ndarray = require( './ndarray.js' );
3030
* Adds a scalar constant to each element in a double-precision floating-point strided array.
3131
*
3232
* @param {PositiveInteger} N - number of indexed elements
33-
* @param {number} alpha - scalar
33+
* @param {number} alpha - scalar constant
3434
* @param {Float64Array} x - input array
35-
* @param {integer} strideX - index increment
35+
* @param {integer} strideX - stride length
3636
* @returns {Float64Array} input array
3737
*
3838
* @example

lib/node_modules/@stdlib/blas/ext/base/dapx/lib/dapx.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ var addon = require( './../src/addon.node' );
2929
* Adds a scalar constant to each element in a double-precision floating-point strided array.
3030
*
3131
* @param {PositiveInteger} N - number of indexed elements
32-
* @param {number} alpha - scalar
32+
* @param {number} alpha - scalar constant
3333
* @param {Float64Array} x - input array
34-
* @param {integer} strideX - index increment
34+
* @param {integer} strideX - stride length
3535
* @returns {Float64Array} input array
3636
*
3737
* @example

lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ var M = 5;
2929
* Adds a scalar constant to each element in a double-precision floating-point strided array.
3030
*
3131
* @param {PositiveInteger} N - number of indexed elements
32-
* @param {number} alpha - scalar
32+
* @param {number} alpha - scalar constant
3333
* @param {Float64Array} x - input array
34-
* @param {integer} strideX - index increment
34+
* @param {integer} strideX - stride length
3535
* @param {NonNegativeInteger} offsetX - starting index
3636
* @returns {Float64Array} input array
3737
*

lib/node_modules/@stdlib/blas/ext/base/dapx/lib/ndarray.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ var addon = require( './../src/addon.node' );
2929
* Adds a scalar constant to each element in a double-precision floating-point strided array.
3030
*
3131
* @param {PositiveInteger} N - number of indexed elements
32-
* @param {number} alpha - scalar
32+
* @param {number} alpha - scalar constant
3333
* @param {Float64Array} x - input array
34-
* @param {integer} strideX - index increment
34+
* @param {integer} strideX - stride length
3535
* @param {NonNegativeInteger} offsetX - starting index
3636
* @returns {Float64Array} input array
3737
*

lib/node_modules/@stdlib/blas/ext/base/dapx/src/main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
/**
2424
* Adds a scalar constant to each element in a double-precision floating-point strided array.
2525
*
26-
* @param N number of indexed elements
27-
* @param alpha scalar
28-
* @param X input array
29-
* @param strideX index increment
26+
* @param N number of indexed elements
27+
* @param alpha scalar constant
28+
* @param X input array
29+
* @param strideX stride length
3030
*/
3131
void API_SUFFIX(c_dapx)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX ) {
3232
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
3636
/**
3737
* Adds a scalar constant to each element in a double-precision floating-point strided array using alternative indexing semantics.
3838
*
39-
* @param N number of indexed elements
40-
* @param alpha scalar
41-
* @param X input array
42-
* @param strideX index increment
39+
* @param N number of indexed elements
40+
* @param alpha scalar constant
41+
* @param X input array
42+
* @param strideX stride length
4343
* @param offsetX starting index
4444
*/
4545
void API_SUFFIX(c_dapx_ndarray)( const CBLAS_INT N, const double alpha, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {

0 commit comments

Comments
 (0)