Skip to content

Commit c199176

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into stats-array-max-by
2 parents 6fda0bd + 72d1412 commit c199176

File tree

222 files changed

+10143
-4606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+10143
-4606
lines changed

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Joris Labie <joris.labie1@gmail.com>
8080
Justin Dennison <justin1dennison@gmail.com>
8181
Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
8282
Karan Anand <anandkarancompsci@gmail.com>
83+
Karan Vasudevamurthy <karanlvm123@gmail.com>
8384
Karan Yadav <77043443+karanBRAVO@users.noreply.github.com>
8485
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8586
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ var o = blas;
4545

4646
<div class="namespace-toc">
4747

48-
- <span class="signature">[`caxpy( N, ca, cx, strideX, cy, strideY )`][@stdlib/blas/base/caxpy]</span><span class="delimiter">: </span><span class="description">scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.</span>
48+
- <span class="signature">[`caxpy( N, alpha, x, strideX, y, strideY )`][@stdlib/blas/base/caxpy]</span><span class="delimiter">: </span><span class="description">scale a single-precision complex floating-point vector by a single-precision complex floating-point constant and add the result to a single-precision complex floating-point vector.</span>
4949
- <span class="signature">[`ccopy( N, x, strideX, y, strideY )`][@stdlib/blas/base/ccopy]</span><span class="delimiter">: </span><span class="description">copy values from one complex single-precision floating-point vector to another complex single-precision floating-point vector.</span>
50-
- <span class="signature">[`cscal( N, ca, cx, strideX )`][@stdlib/blas/base/cscal]</span><span class="delimiter">: </span><span class="description">scales a single-precision complex floating-point vector by a single-precision complex floating-point constant.</span>
50+
- <span class="signature">[`cscal( N, alpha, x, strideX )`][@stdlib/blas/base/cscal]</span><span class="delimiter">: </span><span class="description">scales a single-precision complex floating-point vector by a single-precision complex floating-point constant.</span>
5151
- <span class="signature">[`csrot( N, cx, strideX, cy, strideY, c, s )`][@stdlib/blas/base/csrot]</span><span class="delimiter">: </span><span class="description">applies a plane rotation.</span>
5252
- <span class="signature">[`cswap( N, x, strideX, y, strideY )`][@stdlib/blas/base/cswap]</span><span class="delimiter">: </span><span class="description">interchange two complex single-precision floating-point vectors.</span>
5353
- <span class="signature">[`dasum( N, x, stride )`][@stdlib/blas/base/dasum]</span><span class="delimiter">: </span><span class="description">compute the sum of absolute values (_L1_ norm).</span>
@@ -84,7 +84,7 @@ var o = blas;
8484
- <span class="signature">[`srotm( N, x, strideX, y, strideY, param )`][@stdlib/blas/base/srotm]</span><span class="delimiter">: </span><span class="description">apply a modified Givens plane rotation.</span>
8585
- <span class="signature">[`sscal( N, alpha, x, stride )`][@stdlib/blas/base/sscal]</span><span class="delimiter">: </span><span class="description">multiply a single-precision floating-point vector `x` by a constant `alpha`.</span>
8686
- <span class="signature">[`sswap( N, x, strideX, y, strideY )`][@stdlib/blas/base/sswap]</span><span class="delimiter">: </span><span class="description">interchange two single-precision floating-point vectors.</span>
87-
- <span class="signature">[`zaxpy( N, za, zx, strideX, zy, strideY )`][@stdlib/blas/base/zaxpy]</span><span class="delimiter">: </span><span class="description">scale a double-precision complex floating-point vector by a double-precision complex floating-point constant and add the result to a double-precision complex floating-point vector.</span>
87+
- <span class="signature">[`zaxpy( N, alpha, x, strideX, y, strideY )`][@stdlib/blas/base/zaxpy]</span><span class="delimiter">: </span><span class="description">scale a double-precision complex floating-point vector by a double-precision complex floating-point constant and add the result to a double-precision complex floating-point vector.</span>
8888
- <span class="signature">[`zcopy( N, x, strideX, y, strideY )`][@stdlib/blas/base/zcopy]</span><span class="delimiter">: </span><span class="description">copy values from one complex double-precision floating-point vector to another complex double-precision floating-point vector.</span>
8989
- <span class="signature">[`zdrot( N, zx, strideX, zy, strideY, c, s )`][@stdlib/blas/base/zdrot]</span><span class="delimiter">: </span><span class="description">applies a plane rotation.</span>
9090
- <span class="signature">[`zdscal( N, da, zx, strideZX )`][@stdlib/blas/base/zdscal]</span><span class="delimiter">: </span><span class="description">scale a double-precision complex floating-point vector by a double-precision floating-point constant.</span>

lib/node_modules/@stdlib/blas/base/caxpy/README.md

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -30,43 +30,43 @@ limitations under the License.
3030
var caxpy = require( '@stdlib/blas/base/caxpy' );
3131
```
3232

33-
#### caxpy( N, ca, cx, strideX, cy, strideY )
33+
#### caxpy( N, alpha, x, strideX, y, strideY )
3434

35-
Scales values from `cx` by `ca` and adds the result to `cy`.
35+
Scales values from `x` by `alpha` and adds the result to `y`.
3636

3737
```javascript
3838
var Complex64Array = require( '@stdlib/array/complex64' );
3939
var Complex64 = require( '@stdlib/complex/float32/ctor' );
4040

41-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
42-
var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
43-
var ca = new Complex64( 2.0, 2.0 );
41+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
42+
var y = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
43+
var alpha = new Complex64( 2.0, 2.0 );
4444

45-
caxpy( 3, ca, cx, 1, cy, 1 );
46-
// cy => <Complex64Array>[ -1.0, 7.0, -1.0, 15.0, -1.0, 23.0 ]
45+
caxpy( 3, alpha, x, 1, y, 1 );
46+
// y => <Complex64Array>[ -1.0, 7.0, -1.0, 15.0, -1.0, 23.0 ]
4747
```
4848

4949
The function has the following parameters:
5050

5151
- **N**: number of indexed elements.
52-
- **ca**: scalar [`Complex64`][@stdlib/complex/float32/ctor] constant.
53-
- **cx**: first input [`Complex64Array`][@stdlib/array/complex64].
54-
- **strideX**: index increment for `cx`.
55-
- **cy**: second input [`Complex64Array`][@stdlib/array/complex64].
56-
- **strideY**: index increment for `cy`.
52+
- **alpha**: scalar [`Complex64`][@stdlib/complex/float32/ctor] constant.
53+
- **x**: first input [`Complex64Array`][@stdlib/array/complex64].
54+
- **strideX**: index increment for `x`.
55+
- **y**: second input [`Complex64Array`][@stdlib/array/complex64].
56+
- **strideY**: index increment for `y`.
5757

58-
The `N` and stride parameters determine how values from `cx` are scaled by `ca` and added to `cy`. For example, to scale every other value in `cx` by `ca` and add the result to every other value of `cy`,
58+
The `N` and stride parameters determine how values from `x` are scaled by `alpha` and added to `y`. For example, to scale every other value in `x` by `alpha` and add the result to every other value of `y`,
5959

6060
```javascript
6161
var Complex64Array = require( '@stdlib/array/complex64' );
6262
var Complex64 = require( '@stdlib/complex/float32/ctor' );
6363

64-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
65-
var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
66-
var ca = new Complex64( 2.0, 2.0 );
64+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
65+
var y = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
66+
var alpha = new Complex64( 2.0, 2.0 );
6767

68-
caxpy( 2, ca, cx, 2, cy, 2 );
69-
// cy => <Complex64Array>[ -1.0, 7.0, 1.0, 1.0, -1.0, 23.0, 1.0, 1.0 ]
68+
caxpy( 2, alpha, x, 2, y, 2 );
69+
// y => <Complex64Array>[ -1.0, 7.0, 1.0, 1.0, -1.0, 23.0, 1.0, 1.0 ]
7070
```
7171

7272
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -78,54 +78,54 @@ var Complex64Array = require( '@stdlib/array/complex64' );
7878
var Complex64 = require( '@stdlib/complex/float32/ctor' );
7979

8080
// Initial arrays...
81-
var cx0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
82-
var cy0 = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
81+
var x0 = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
82+
var y0 = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
8383

8484
// Define a scalar constant:
85-
var ca = new Complex64( 2.0, 2.0 );
85+
var alpha = new Complex64( 2.0, 2.0 );
8686

8787
// Create offset views...
88-
var cx1 = new Complex64Array( cx0.buffer, cx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
89-
var cy1 = new Complex64Array( cy0.buffer, cy0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
88+
var x1 = new Complex64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
89+
var y1 = new Complex64Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
9090

91-
// Scales values of `cx0` by `ca` starting from second index and add the result to `cy0` starting from third index...
92-
caxpy( 2, ca, cx1, 1, cy1, 1 );
93-
// cy0 => <Complex64Array>[ 1.0, 1.0, 1.0, 1.0, -1.0, 15.0, -1.0, 23.0 ]
91+
// Scales values of `x0` by `alpha` starting from second index and add the result to `y0` starting from third index...
92+
caxpy( 2, alpha, x1, 1, y1, 1 );
93+
// y0 => <Complex64Array>[ 1.0, 1.0, 1.0, 1.0, -1.0, 15.0, -1.0, 23.0 ]
9494
```
9595

96-
#### caxpy.ndarray( N, ca, cx, strideX, offsetX, cy, strideY, offsetY )
96+
#### caxpy.ndarray( N, alpha, x, strideX, offsetX, y, strideY, offsetY )
9797

98-
Scales values from `cx` by `ca` and adds the result to `cy` using alternative indexing semantics.
98+
Scales values from `x` by `alpha` and adds the result to `y` using alternative indexing semantics.
9999

100100
```javascript
101101
var Complex64Array = require( '@stdlib/array/complex64' );
102102
var Complex64 = require( '@stdlib/complex/float32/ctor' );
103103

104-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
105-
var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
106-
var ca = new Complex64( 2.0, 2.0 );
104+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
105+
var y = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
106+
var alpha = new Complex64( 2.0, 2.0 );
107107

108-
caxpy.ndarray( 3, ca, cx, 1, 0, cy, 1, 0 );
109-
// cy => <Complex64Array>[ -1.0, 7.0, -1.0, 15.0, -1.0, 23.0 ]
108+
caxpy.ndarray( 3, alpha, x, 1, 0, y, 1, 0 );
109+
// y => <Complex64Array>[ -1.0, 7.0, -1.0, 15.0, -1.0, 23.0 ]
110110
```
111111

112112
The function has the following additional parameters:
113113

114-
- **offsetX**: starting index for `cx`.
115-
- **offsetY**: starting index for `cy`.
114+
- **offsetX**: starting index for `x`.
115+
- **offsetY**: starting index for `y`.
116116

117117
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to scale values in the first input strided array starting from the second element and add the result to the second input array starting from the second element,
118118

119119
```javascript
120120
var Complex64Array = require( '@stdlib/array/complex64' );
121121
var Complex64 = require( '@stdlib/complex/float32/ctor' );
122122

123-
var cx = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
124-
var cy = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
125-
var ca = new Complex64( 2.0, 2.0 );
123+
var x = new Complex64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
124+
var y = new Complex64Array( [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] );
125+
var alpha = new Complex64( 2.0, 2.0 );
126126

127-
caxpy.ndarray( 3, ca, cx, 1, 1, cy, 1, 1 );
128-
// cy => <Complex64Array>[ 1.0, 1.0, -1.0, 15.0, -1.0, 23.0, -1.0, 31.0 ]
127+
caxpy.ndarray( 3, alpha, x, 1, 1, y, 1, 1 );
128+
// y => <Complex64Array>[ 1.0, 1.0, -1.0, 15.0, -1.0, 23.0, -1.0, 31.0 ]
129129
```
130130

131131
</section>
@@ -136,7 +136,7 @@ caxpy.ndarray( 3, ca, cx, 1, 1, cy, 1, 1 );
136136

137137
## Notes
138138

139-
- If `N <= 0`, both functions return `cy` unchanged.
139+
- If `N <= 0`, both functions return `y` unchanged.
140140
- `caxpy()` corresponds to the [BLAS][blas] level 1 function [`caxpy`][caxpy].
141141

142142
</section>
@@ -162,17 +162,17 @@ function rand() {
162162
return new Complex64( discreteUniform( 0, 10 ), discreteUniform( -5, 5 ) );
163163
}
164164

165-
var cx = filledarrayBy( 10, 'complex64', rand );
166-
var cy = filledarrayBy( 10, 'complex64', rand );
167-
var cyc = ccopy( cy.length, cy, 1, zeros( cy.length, 'complex64' ), 1 );
165+
var x = filledarrayBy( 10, 'complex64', rand );
166+
var y = filledarrayBy( 10, 'complex64', rand );
167+
var yc = ccopy( y.length, y, 1, zeros( y.length, 'complex64' ), 1 );
168168

169-
var ca = new Complex64( 2.0, 2.0 );
169+
var alpha = new Complex64( 2.0, 2.0 );
170170

171-
// Scale values from `cx` by `ca` and add the result to `cy`:
172-
caxpy( cx.length, ca, cx, 1, cy, 1 );
171+
// Scale values from `x` by `alpha` and add the result to `y`:
172+
caxpy( x.length, alpha, x, 1, y, 1 );
173173

174174
// Print the results:
175-
logEach( '(%s)*(%s) + (%s) = %s', ca, cx, cyc, cy );
175+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc, y );
176176
```
177177

178178
</section>
@@ -205,60 +205,60 @@ logEach( '(%s)*(%s) + (%s) = %s', ca, cx, cyc, cy );
205205
#include "stdlib/blas/base/caxpy.h"
206206
```
207207

208-
#### c_caxpy( N, ca, \*CX, strideX, \*CY, strideY )
208+
#### c_caxpy( N, alpha, \*X, strideX, \*Y, strideY )
209209

210-
Scales values from `cx` by `ca` and adds the result to `cy`.
210+
Scales values from `X` by `alpha` and adds the result to `Y`.
211211

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

215-
float cx[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
216-
float cy[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f };
217-
const stdlib_complex64_t ca = stdlib_complex64( 2.0f, 2.0f );
215+
float X[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
216+
float Y[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f };
217+
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );
218218

219-
c_caxpy( 4, ca, (void *)cx, 1, (void *)cy, 1 );
219+
c_caxpy( 4, alpha, (void *)X, 1, (void *)Y, 1 );
220220
```
221221
222222
The function accepts the following arguments:
223223
224224
- **N**: `[in] CBLAS_INT` number of indexed elements.
225-
- **ca**: `[in] stdlib_complex64_t` scalar constant.
226-
- **CX**: `[in] void*` input array.
227-
- **strideX**: `[in] CBLAS_INT` index increment for `CX`.
228-
- **CY**: `[inout] void*` output array.
229-
- **strideY**: `[in] CBLAS_INT` index increment for `CY`.
225+
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
226+
- **X**: `[in] void*` input array.
227+
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
228+
- **Y**: `[inout] void*` output array.
229+
- **strideY**: `[in] CBLAS_INT` index increment for `Y`.
230230
231231
```c
232-
void c_caxpy( const CBLAS_INT N, const stdlib_complex64_t ca, const void *CX, const CBLAS_INT strideX, void *CY, const CBLAS_INT strideY );
232+
void c_caxpy( const CBLAS_INT N, const stdlib_complex64_t alpha, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
233233
```
234234

235-
#### c_caxpy_ndarray( N, ca, \*CX, strideX, offsetX, \*CY, strideY, offsetY )
235+
#### c_caxpy_ndarray( N, alpha, \*X, strideX, offsetX, \*Y, strideY, offsetY )
236236

237-
Scales values from `cx` by `ca` and adds the result to `cy` using alternative indexing semantics.
237+
Scales values from `X` by `alpha` and adds the result to `Y` using alternative indexing semantics.
238238

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

242-
float cx[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
243-
float cy[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f }
244-
const stdlib_complex64_t ca = stdlib_complex64( 2.0f, 2.0f );
242+
float X[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
243+
float Y[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f }
244+
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );
245245

246-
c_caxpy_ndarray( 4, ca, (void *)cx, 1, 0, (void *)cy, 1, 0 );
246+
c_caxpy_ndarray( 4, alpha, (void *)X, 1, 0, (void *)Y, 1, 0 );
247247
```
248248
249249
The function accepts the following arguments:
250250
251251
- **N**: `[in] CBLAS_INT` number of indexed elements.
252-
- **ca**: `[in] stdlib_complex64_t` scalar constant.
253-
- **CX**: `[in] void*` input array.
254-
- **strideX**: `[in] CBLAS_INT` index increment for `CX`.
255-
- **offsetX**: `[in] CBLAS_INT` starting index for `CX`.
256-
- **CY**: `[inout] void*` output array.
257-
- **strideY**: `[in] CBLAS_INT` index increment for `CY`.
258-
- **offsetY**: `[in] CBLAS_INT` starting index for `CY`.
252+
- **alpha**: `[in] stdlib_complex64_t` scalar constant.
253+
- **X**: `[in] void*` input array.
254+
- **strideX**: `[in] CBLAS_INT` index increment for `X`.
255+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
256+
- **Y**: `[inout] void*` output array.
257+
- **strideY**: `[in] CBLAS_INT` index increment for `Y`.
258+
- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.
259259
260260
```c
261-
void c_caxpy_ndarray( const CBLAS_INT N, const stdlib_complex64_t ca, const void *CX, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *CY, const CBLAS_INT strideY, const CBLAS_INT offsetY );
261+
void c_caxpy_ndarray( const CBLAS_INT N, const stdlib_complex64_t alpha, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY );
262262
```
263263

264264
</section>
@@ -286,11 +286,11 @@ void c_caxpy_ndarray( const CBLAS_INT N, const stdlib_complex64_t ca, const void
286286

287287
int main( void ) {
288288
// Create strided arrays of interleaved real and imaginary components...
289-
float cx[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
290-
float cy[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f };
289+
float X[] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f };
290+
float Y[] = { -1.0f, -2.0f, -3.0f, -4.0f, -5.0f, -6.0f, -7.0f, -8.0f };
291291

292292
// Create a complex scalar:
293-
const stdlib_complex64_t ca = stdlib_complex64( 2.0f, 2.0f );
293+
const stdlib_complex64_t alpha = stdlib_complex64( 2.0f, 2.0f );
294294

295295
// Specify the number of elements:
296296
const int N = 4;
@@ -299,20 +299,20 @@ int main( void ) {
299299
const int strideX = 1;
300300
const int strideY = 1;
301301

302-
// Scale values from `cx` by `ca` and adds the result to `cy`:
303-
c_caxpy( N, ca, (void *)cx, strideX, (void *)cy, strideY );
302+
// Scale values from `X` by `alpha` and adds the result to `Y`:
303+
c_caxpy( N, alpha, (void *)X, strideX, (void *)Y, strideY );
304304

305305
// Print the result:
306306
for ( int i = 0; i < N; i++ ) {
307-
printf( "cy[ %i ] = %f + %fj\n", i, cy[ i*2 ], cy[ (i*2)+1 ] );
307+
printf( "Y[ %i ] = %f + %fj\n", i, Y[ i*2 ], Y[ (i*2)+1 ] );
308308
}
309309

310-
// Scales values from `cx` by `ca` and adds the result to `cy` using alternative indexing semantics:
311-
c_caxpy_ndarray( N, ca, (void *)cx, -strideX, 3, (void *)cy, -strideY, 3 );
310+
// Scales values from `X` by `alpha` and adds the result to `Y` using alternative indexing semantics:
311+
c_caxpy_ndarray( N, alpha, (void *)X, -strideX, 3, (void *)Y, -strideY, 3 );
312312

313313
// Print the result:
314314
for ( int i = 0; i < N; i++ ) {
315-
printf( "cy[ %i ] = %f + %fj\n", i, cy[ i*2 ], cy[ (i*2)+1 ] );
315+
printf( "Y[ %i ] = %f + %fj\n", i, Y[ i*2 ], Y[ (i*2)+1 ] );
316316
}
317317
}
318318
```

lib/node_modules/@stdlib/blas/base/caxpy/benchmark/benchmark.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ var options = {
4949
*/
5050
function createBenchmark( len ) {
5151
var viewY;
52-
var ca;
53-
var cx;
54-
var cy;
52+
var alpha;
53+
var x;
54+
var y;
5555

56-
cx = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
57-
cy = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
56+
x = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
57+
y = new Complex64Array( uniform( len*2, -100.0, 100.0, options ) );
5858

59-
viewY = reinterpret( cy, 0 );
59+
viewY = reinterpret( y, 0 );
6060

61-
ca = new Complex64( 1.0, 0.0 );
61+
alpha = new Complex64( 1.0, 0.0 );
6262

6363
return benchmark;
6464

@@ -73,7 +73,7 @@ function createBenchmark( len ) {
7373

7474
b.tic();
7575
for ( i = 0; i < b.iterations; i++ ) {
76-
caxpy( cx.length, ca, cx, 1, cy, 1 );
76+
caxpy( x.length, alpha, x, 1, y, 1 );
7777
if ( isnanf( viewY[ i%(len*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}

0 commit comments

Comments
 (0)