Skip to content

Commit d6940dc

Browse files
headlessNodeNeerajpathak07
authored andcommitted
docs: update parameter descriptions and add missing header in C example
PR-URL: stdlib-js#3187 Reviewed-by: Athan Reines <[email protected]>
1 parent 59349fd commit d6940dc

File tree

9 files changed

+22
-16
lines changed

9 files changed

+22
-16
lines changed

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ The function has the following parameters:
6363
- **N**: number of indexed elements.
6464
- **alpha**: scalar constant.
6565
- **x**: input [`Complex64Array`][@stdlib/array/complex64].
66-
- **strideX**: index increment.
66+
- **strideX**: stride length.
6767

68-
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to fill every other element
68+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to fill every other element:
6969

7070
```javascript
7171
var Float32Array = require( '@stdlib/array/float32' );
@@ -175,7 +175,7 @@ The function has the following additional parameters:
175175

176176
- **offsetX**: starting index.
177177

178-
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 two elements of the strided array
178+
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 two elements of the strided array:
179179

180180
```javascript
181181
var Float32Array = require( '@stdlib/array/float32' );
@@ -290,6 +290,8 @@ console.log( x.get( 0 ).toString() );
290290
Fills a single-precision complex floating-point strided array `X` with a specified scalar constant `alpha`.
291291

292292
```c
293+
#include "stdlib/complex/float32/ctor.h"
294+
293295
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
294296
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );
295297

@@ -301,7 +303,7 @@ The function accepts the following arguments:
301303
- **N**: `[in] CBLAS_INT` number of indexed elements.
302304
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
303305
- **X**: `[out] stdlib_complex64_t*` input array.
304-
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
306+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
305307
306308
```c
307309
void stdlib_strided_cfill( const CBLAS_INT N, const stdlib_complex64_t alpha, stdlib_complex64_t *X, const CBLAS_INT strideX );
@@ -312,6 +314,8 @@ void stdlib_strided_cfill( const CBLAS_INT N, const stdlib_complex64_t alpha, st
312314
Fills a single-precision complex floating-point strided array `X` with a specified scalar constant `alpha` using alternative indexing semantics.
313315

314316
```c
317+
#include "stdlib/complex/float32/ctor.h"
318+
315319
float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
316320
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );
317321

@@ -323,7 +327,7 @@ The function accepts the following arguments:
323327
- **N**: `[in] CBLAS_INT` number of indexed elements.
324328
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
325329
- **X**: `[out] stdlib_complex64_t*` input array.
326-
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
330+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
327331
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
328332
329333
```c

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ static double benchmark1( int iterations, int len ) {
109109
}
110110
t = tic();
111111
for ( i = 0; i < iterations; i++ ) {
112+
// cppcheck-suppress uninitvar
112113
stdlib_strided_cfill( len, alpha, (stdlib_complex64_t *)x, 1 );
113114
if ( x[ 0 ] != x[ 0 ] ) {
114115
printf( "should not return NaN\n" );
@@ -143,6 +144,7 @@ static double benchmark2( int iterations, int len ) {
143144
}
144145
t = tic();
145146
for ( i = 0; i < iterations; i++ ) {
147+
// cppcheck-suppress uninitvar
146148
stdlib_strided_cfill_ndarray( len, alpha, (stdlib_complex64_t *)x, 1, 0 );
147149
if ( x[ 0 ] != x[ 0 ] ) {
148150
printf( "should not return NaN\n" );

lib/node_modules/@stdlib/blas/ext/base/cfill/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: Complex64
20-
Constant.
20+
Scalar Constant.
2121

2222
x: Complex64Array
2323
Input array.
2424

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

2828
Returns
2929
-------
@@ -88,13 +88,13 @@
8888
Number of indexed elements.
8989

9090
alpha: Complex64
91-
Constant.
91+
Scalar Constant.
9292

9393
x: Complex64Array
9494
Input array.
9595

9696
strideX: integer
97-
Index increment.
97+
Stride length.
9898

9999
offsetX: integer
100100
Starting index.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ interface Routine {
103103
* @param N - number of indexed elements
104104
* @param alpha - scalar constant
105105
* @param x - input array
106-
* @param strideX - index increment
106+
* @param strideX - stride length
107107
* @returns input array
108108
*
109109
* @example

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var ndarray = require( './ndarray.js' );
3232
* @param {PositiveInteger} N - number of indexed elements
3333
* @param {ComplexLike} alpha - scalar constant
3434
* @param {Complex64Array} x - input array
35-
* @param {integer} strideX - index increment
35+
* @param {integer} strideX - stride length
3636
* @returns {Complex64Array} input array
3737
*
3838
* @example

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
3232
* @param {PositiveInteger} N - number of indexed elements
3333
* @param {ComplexLike} alpha - scalar constant
3434
* @param {Complex64Array} x - input array
35-
* @param {integer} strideX - index increment
35+
* @param {integer} strideX - stride length
3636
* @returns {Complex64Array} input array
3737
*
3838
* @example

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var M = 8;
3838
* @param {PositiveInteger} N - number of indexed elements
3939
* @param {ComplexLike} alpha - scalar constant
4040
* @param {Complex64Array} x - input array
41-
* @param {integer} strideX - index increment
41+
* @param {integer} strideX - stride length
4242
* @param {NonNegativeInteger} offsetX - starting index
4343
* @returns {Complex64Array} input array
4444
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
3232
* @param {PositiveInteger} N - number of indexed elements
3333
* @param {ComplexLike} alpha - scalar constant
3434
* @param {Complex64Array} x - input array
35-
* @param {integer} strideX - index increment
35+
* @param {integer} strideX - stride length
3636
* @param {NonNegativeInteger} offsetX - starting index
3737
* @returns {Complex64Array} input array
3838
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* @param N number of indexed elements
2828
* @param alpha scalar constant
2929
* @param X input array
30-
* @param strideX index increment
30+
* @param strideX stride length
3131
*/
3232

3333
void API_SUFFIX(stdlib_strided_cfill)( const CBLAS_INT N, const stdlib_complex64_t alpha, stdlib_complex64_t *X, const CBLAS_INT strideX ) {
@@ -41,7 +41,7 @@ void API_SUFFIX(stdlib_strided_cfill)( const CBLAS_INT N, const stdlib_complex64
4141
* @param N number of indexed elements
4242
* @param alpha scalar
4343
* @param X input array
44-
* @param strideX index increment
44+
* @param strideX stride length
4545
* @param offsetX starting index
4646
*/
4747

0 commit comments

Comments
 (0)