Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions lib/node_modules/@stdlib/blas/ext/base/cfill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ The function has the following parameters:
- **N**: number of indexed elements.
- **alpha**: scalar constant.
- **x**: input [`Complex64Array`][@stdlib/array/complex64].
- **strideX**: index increment.
- **strideX**: stride length.

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

```javascript
var Float32Array = require( '@stdlib/array/float32' );
Expand Down Expand Up @@ -175,7 +175,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 two 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 two elements of the strided array:

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

```c
#include "stdlib/complex/float32/ctor.h"

float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );

Expand All @@ -301,7 +303,7 @@ The function accepts the following arguments:
- **N**: `[in] CBLAS_INT` number of indexed elements.
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
- **X**: `[out] stdlib_complex64_t*` input array.
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
- **strideX**: `[in] CBLAS_INT` stride length for `X`.

```c
void stdlib_strided_cfill( const CBLAS_INT N, const stdlib_complex64_t alpha, stdlib_complex64_t *X, const CBLAS_INT strideX );
Expand All @@ -312,6 +314,8 @@ void stdlib_strided_cfill( const CBLAS_INT N, const stdlib_complex64_t alpha, st
Fills a single-precision complex floating-point strided array `X` with a specified scalar constant `alpha` using alternative indexing semantics.

```c
#include "stdlib/complex/float32/ctor.h"

float x[] = { 1.0f, 2.0f, 3.0f, 4.0f };
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );

Expand All @@ -323,7 +327,7 @@ The function accepts the following arguments:
- **N**: `[in] CBLAS_INT` number of indexed elements.
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
- **X**: `[out] stdlib_complex64_t*` 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static double benchmark1( int iterations, int len ) {
}
t = tic();
for ( i = 0; i < iterations; i++ ) {
// cppcheck-suppress uninitvar
stdlib_strided_cfill( len, alpha, (stdlib_complex64_t *)x, 1 );
if ( x[ 0 ] != x[ 0 ] ) {
printf( "should not return NaN\n" );
Expand Down Expand Up @@ -143,6 +144,7 @@ static double benchmark2( int iterations, int len ) {
}
t = tic();
for ( i = 0; i < iterations; i++ ) {
// cppcheck-suppress uninitvar
stdlib_strided_cfill_ndarray( len, alpha, (stdlib_complex64_t *)x, 1, 0 );
if ( x[ 0 ] != x[ 0 ] ) {
printf( "should not return NaN\n" );
Expand Down
8 changes: 4 additions & 4 deletions lib/node_modules/@stdlib/blas/ext/base/cfill/docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
Number of indexed elements.

alpha: Complex64
Constant.
Scalar Constant.

x: Complex64Array
Input array.

strideX: integer
Index increment.
Stride length.

Returns
-------
Expand Down Expand Up @@ -88,13 +88,13 @@
Number of indexed elements.

alpha: Complex64
Constant.
Scalar Constant.

x: Complex64Array
Input array.

strideX: integer
Index increment.
Stride length.

offsetX: integer
Starting index.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ interface Routine {
* @param N - number of indexed elements
* @param alpha - scalar constant
* @param x - input array
* @param strideX - index increment
* @param strideX - stride length
* @returns input array
*
* @example
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/ext/base/cfill/lib/cfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var ndarray = require( './ndarray.js' );
* @param {PositiveInteger} N - number of indexed elements
* @param {ComplexLike} alpha - scalar constant
* @param {Complex64Array} x - input array
* @param {integer} strideX - index increment
* @param {integer} strideX - stride length
* @returns {Complex64Array} input array
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
* @param {PositiveInteger} N - number of indexed elements
* @param {ComplexLike} alpha - scalar constant
* @param {Complex64Array} x - input array
* @param {integer} strideX - index increment
* @param {integer} strideX - stride length
* @returns {Complex64Array} input array
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var M = 8;
* @param {PositiveInteger} N - number of indexed elements
* @param {ComplexLike} alpha - scalar constant
* @param {Complex64Array} x - input array
* @param {integer} strideX - index increment
* @param {integer} strideX - stride length
* @param {NonNegativeInteger} offsetX - starting index
* @returns {Complex64Array} input array
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var addon = require( './../src/addon.node' );
* @param {PositiveInteger} N - number of indexed elements
* @param {ComplexLike} alpha - scalar constant
* @param {Complex64Array} x - input array
* @param {integer} strideX - index increment
* @param {integer} strideX - stride length
* @param {NonNegativeInteger} offsetX - starting index
* @returns {Complex64Array} input array
*
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/cfill/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @param N number of indexed elements
* @param alpha scalar constant
* @param X input array
* @param strideX index increment
* @param strideX stride length
*/

void API_SUFFIX(stdlib_strided_cfill)( const CBLAS_INT N, const stdlib_complex64_t alpha, stdlib_complex64_t *X, const CBLAS_INT strideX ) {
Expand All @@ -41,7 +41,7 @@ void API_SUFFIX(stdlib_strided_cfill)( const CBLAS_INT N, const stdlib_complex64
* @param N number of indexed elements
* @param alpha scalar
* @param X input array
* @param strideX index increment
* @param strideX stride length
* @param offsetX starting index
*/

Expand Down