Skip to content

Commit 148041c

Browse files
committed
chore: update variable names
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 5400b42 commit 148041c

File tree

15 files changed

+453
-453
lines changed

15 files changed

+453
-453
lines changed

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

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

33-
#### zscal.main( N, za, zx, strideX )
33+
#### zscal.main( N, alpha, x, strideX )
3434

35-
Scales values from `zx` by `za`.
35+
Scales values from `x` by `alpha`.
3636

3737
```javascript
3838
var Complex128Array = require( '@stdlib/array/complex128' );
3939
var Complex128 = require( '@stdlib/complex/float64/ctor' );
4040

4141
// Define a strided array:
42-
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
42+
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
4343

4444
// Define a scalar constant:
45-
var za = new Complex128( 2.0, 2.0 );
45+
var alpha = new Complex128( 2.0, 2.0 );
4646

4747
// Perform operation:
48-
zscal.main( zx.length, za, zx, 1 );
49-
// zx => <Complex128Array>[ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ]
48+
zscal.main( x.length, alpha, x, 1 );
49+
// x => <Complex128Array>[ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ]
5050
```
5151

5252
The function has the following parameters:
5353

5454
- **N**: number of indexed elements.
55-
- **za**: scalar [`Complex128`][@stdlib/complex/float64/ctor] constant.
56-
- **zx**: input [`Complex128Array`][@stdlib/array/complex128].
57-
- **strideX**: index increment for `zx`.
55+
- **alpha**: scalar [`Complex128`][@stdlib/complex/float64/ctor] constant.
56+
- **x**: input [`Complex128Array`][@stdlib/array/complex128].
57+
- **strideX**: index increment for `x`.
5858

59-
The `N` and stride parameters determine which elements in the input strided array are accessed at runtime. For example, to scale every other value in `zx` by `za`,
59+
The `N` and stride parameters determine which elements in the input strided array are accessed at runtime. For example, to scale every other value in `x` by `alpha`,
6060

6161
```javascript
6262
var Complex128Array = require( '@stdlib/array/complex128' );
6363
var Complex128 = require( '@stdlib/complex/float64/ctor' );
6464

6565
// Define a strided array:
66-
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
66+
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
6767

6868
// Define a scalar constant:
69-
var za = new Complex128( 2.0, 2.0 );
69+
var alpha = new Complex128( 2.0, 2.0 );
7070

7171
// Perform operation:
72-
zscal.main( 2, za, zx, 2 );
73-
// zx => <Complex128Array>[ -2.0, 6.0, 3.0, 4.0, -2.0, 22.0 ]
72+
zscal.main( 2, alpha, x, 2 );
73+
// x => <Complex128Array>[ -2.0, 6.0, 3.0, 4.0, -2.0, 22.0 ]
7474
```
7575

7676
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -82,53 +82,53 @@ var Complex128Array = require( '@stdlib/array/complex128' );
8282
var Complex128 = require( '@stdlib/complex/float64/ctor' );
8383

8484
// Initial array:
85-
var zx0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
85+
var x0 = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
8686

8787
// Define a scalar constant:
88-
var za = new Complex128( 2.0, 2.0 );
88+
var alpha = new Complex128( 2.0, 2.0 );
8989

9090
// Create an offset view:
91-
var zx1 = new Complex128Array( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
91+
var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
9292

93-
// Scales every other value from `zx1` by `za`...
94-
zscal.main( 3, za, zx1, 1 );
95-
// zx0 => <Complex128Array>[ 1.0, 2.0, -2.0, 14.0, -2.0, 22.0, -2.0, 30.0 ]
93+
// Scales every other value from `x1` by `alpha`...
94+
zscal.main( 3, alpha, x1, 1 );
95+
// x0 => <Complex128Array>[ 1.0, 2.0, -2.0, 14.0, -2.0, 22.0, -2.0, 30.0 ]
9696
```
9797

98-
#### zscal.ndarray( N, za, zx, strideX, offsetX )
98+
#### zscal.ndarray( N, alpha, x, strideX, offsetX )
9999

100-
Scales values from `zx` by `za` using alternative indexing semantics.
100+
Scales values from `x` by `alpha` using alternative indexing semantics.
101101

102102
```javascript
103103
var Complex128Array = require( '@stdlib/array/complex128' );
104104
var Complex128 = require( '@stdlib/complex/float64/ctor' );
105105

106106
// Define a strided array:
107-
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
107+
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
108108

109109
// Define a scalar constant:
110-
var za = new Complex128( 2.0, 2.0 );
110+
var alpha = new Complex128( 2.0, 2.0 );
111111

112112
// Perform operation:
113-
zscal.ndarray( zx.length, za, zx, 1, 0 );
114-
// zx => <Complex128Array>[ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ]
113+
zscal.ndarray( x.length, alpha, x, 1, 0 );
114+
// x => <Complex128Array>[ -2.0, 6.0, -2.0, 14.0, -2.0, 22.0 ]
115115
```
116116

117117
The function has the following additional parameters:
118118

119-
- **offsetX**: starting index for `zx`.
119+
- **offsetX**: starting index for `x`.
120120

121121
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 scale every other value in the input strided array starting from the second element,
122122

123123
```javascript
124124
var Complex128Array = require( '@stdlib/array/complex128' );
125125
var Complex128 = require( '@stdlib/complex/float64/ctor' );
126126

127-
var zx = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
128-
var za = new Complex128( 2.0, 2.0 );
127+
var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
128+
var alpha = new Complex128( 2.0, 2.0 );
129129

130-
zscal.ndarray( 2, za, zx, 2, 1 );
131-
// zx => <Complex128Array>[ 1.0, 2.0, -2.0, 14.0, 5.0, 6.0, -2.0, 30.0 ]
130+
zscal.ndarray( 2, alpha, x, 2, 1 );
131+
// x => <Complex128Array>[ 1.0, 2.0, -2.0, 14.0, 5.0, 6.0, -2.0, 30.0 ]
132132
```
133133

134134
* * *
@@ -160,7 +160,7 @@ mod.initializeSync();
160160

161161
#### zscal.Module.prototype.main( N, zap, zxp, sx )
162162

163-
Scales values from `zx` by `za` .
163+
Scales values from `x` by `alpha` .
164164

165165
<!-- eslint-disable node/no-sync -->
166166

@@ -224,11 +224,11 @@ The function has the following parameters:
224224
- **N**: number of indexed elements.
225225
- **zap**: pointer (i.e., byte offset) to a scalar [`Complex128`][@stdlib/complex/float64/ctor] constant.
226226
- **zxp**: input [`Complex128Array`][@stdlib/array/complex128] pointer (i.e., byte offset).
227-
- **sx**: index increment for `zx`.
227+
- **sx**: index increment for `x`.
228228

229229
#### zscal.Module.prototype.ndarray( N, zap, zxp, sx, ox )
230230

231-
Scales values from `zx` by `za` using alternative indexing semantics.
231+
Scales values from `x` by `alpha` using alternative indexing semantics.
232232

233233
<!-- eslint-disable node/no-sync -->
234234

@@ -301,7 +301,7 @@ The function has the following additional parameters:
301301

302302
## Notes
303303

304-
- If `N <= 0`, `zx` is left unchanged.
304+
- If `N <= 0`, `x` is left unchanged.
305305
- This package implements routines using WebAssembly. When provided arrays which are not allocated on a `zscal` module memory instance, data must be explicitly copied to module memory prior to computation. Data movement may entail a performance cost, and, thus, if you are using arrays external to module memory, you should prefer using [`@stdlib/blas/base/zscal`][@stdlib/blas/base/zscal]. However, if working with arrays which are allocated and explicitly managed on module memory, you can achieve better performance when compared to the pure JavaScript implementations found in [`@stdlib/blas/base/zscal`][@stdlib/blas/base/zscal]. Beware that such performance gains may come at the cost of additional complexity when having to perform manual memory management. Choosing between implementations depends heavily on the particular needs and constraints of your application, with no one choice universally better than the other.
306306
- `zscal()` corresponds to the [BLAS][blas] level 1 function [`zscal`][zscal].
307307

@@ -333,10 +333,10 @@ var xbuf = oneTo( N*2, 'float64' );
333333
var x = new Complex128Array( xbuf.buffer );
334334

335335
// Create a complex number:
336-
var z = new Complex128( 2.0, 2.0 );
336+
var alpha = new Complex128( 2.0, 2.0 );
337337

338338
// Perform computation:
339-
zscal.ndarray( N, z, x, 1, 0 );
339+
zscal.ndarray( N, alpha, x, 1, 0 );
340340

341341
// Print the results:
342342
console.log( reinterpretComplex64( x, 0 ) );

lib/node_modules/@stdlib/blas/base/wasm/zscal/benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ var options = {
5151
* @returns {Function} benchmark function
5252
*/
5353
function createBenchmark( len ) {
54+
var alpha;
5455
var xbuf;
5556
var x;
56-
var z;
5757

5858
xbuf = uniform( len*2, -100.0, 100.0, options );
5959
x = new Complex128Array( xbuf.buffer );
6060

61-
z = new Complex128( 1.0, 0.0 );
61+
alpha = new Complex128( 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-
zscal.main( x.length, z, x, 1 );
76+
zscal.main( x.length, alpha, x, 1 );
7777
if ( isnan( xbuf[ i%(len*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}

lib/node_modules/@stdlib/blas/base/wasm/zscal/benchmark/benchmark.ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ var options = {
5151
* @returns {Function} benchmark function
5252
*/
5353
function createBenchmark( len ) {
54+
var alpha;
5455
var xbuf;
5556
var x;
56-
var z;
5757

5858
xbuf = uniform( len*2, -100.0, 100.0, options );
5959
x = new Complex128Array( xbuf.buffer );
6060

61-
z = new Complex128( 1.0, 0.0 );
61+
alpha = new Complex128( 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-
zscal.ndarray( x.length, z, x, 1, 0 );
76+
zscal.ndarray( x.length, alpha, x, 1, 0 );
7777
if ( isnan( xbuf[ i%(len*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}

lib/node_modules/@stdlib/blas/base/wasm/zscal/docs/repl.txt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
{{alias}}.main( N, za, zx, strideX )
2+
{{alias}}.main( N, alpha, x, strideX )
33
Scales a double-precision complex floating-point vector by a double-
44
precision complex floating-point constant.
55

@@ -9,52 +9,52 @@
99
Indexing is relative to the first index. To introduce an offset, use typed
1010
array views.
1111

12-
If `N <= 0`, the function returns `zx` unchanged.
12+
If `N <= 0`, the function returns `x` unchanged.
1313

1414
Parameters
1515
----------
1616
N: integer
1717
Number of indexed elements.
1818

19-
za: Complex128
19+
alpha: Complex128
2020
Complex constant.
2121

22-
zx: Complex128Array
22+
x: Complex128Array
2323
Input array.
2424

2525
strideX: integer
26-
Index increment for `zx`.
26+
Index increment for `x`.
2727

2828
Returns
2929
-------
30-
zx: Complex128Array
30+
x: Complex128Array
3131
Input array.
3232

3333
Examples
3434
--------
3535
// Standard usage:
36-
> var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
37-
> var za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
38-
> {{alias}}.main( 2, za, zx, 1 )
36+
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
37+
> var alpha = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
38+
> {{alias}}.main( 2, alpha, x, 1 )
3939
<Complex128Array>[ -3.0, 4.0, -5.0, 10.0 ]
4040

4141
// Advanced indexing:
42-
> zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
43-
> za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 1.0 );
44-
> {{alias}}.main( 2, za, zx, 2 )
42+
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
43+
> alpha = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 1.0 );
44+
> {{alias}}.main( 2, alpha, x, 2 )
4545
<Complex128Array>[ -1.0, 3.0, 3.0, 4.0, -1.0, 11.0 ]
4646

4747
// Using typed array views:
48-
> var zx0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
49-
> var zx1 = new {{alias:@stdlib/array/complex128}}( zx0.buffer, zx0.BYTES_PER_ELEMENT*1 );
50-
> var za = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
51-
> {{alias}}.main( 2, za, zx1, 1 )
48+
> var x0 = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 ] );
49+
> var x1 = new {{alias:@stdlib/array/complex128}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
50+
> var alpha = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
51+
> {{alias}}.main( 2, alpha, x1, 1 )
5252
<Complex128Array>[ -2.0, 14.0, -2.0, 22.0 ]
53-
> zx0
53+
> x0
5454
<Complex128Array>[ 1.0, 2.0, -2.0, 14.0, -2.0, 22.0 ]
5555

5656

57-
{{alias}}.ndarray( N, za, zx, strideX, offsetX )
57+
{{alias}}.ndarray( N, alpha, x, strideX, offsetX )
5858
Scales a double-precision complex floating-point vector by a double-
5959
precision complex floating-point constant using alternative indexing
6060
semantics.
@@ -68,35 +68,35 @@
6868
N: integer
6969
Number of indexed elements.
7070

71-
za: Complex128
71+
alpha: Complex128
7272
Complex constant.
7373

74-
zx: Complex128Array
74+
x: Complex128Array
7575
Input array.
7676

7777
strideX: integer
78-
Index increment for `zx`.
78+
Index increment for `x`.
7979

8080
offsetX: integer
81-
Starting index for `zx`.
81+
Starting index for `x`.
8282

8383
Returns
8484
-------
85-
zx: Complex128Array
85+
x: Complex128Array
8686
Input array.
8787

8888
Examples
8989
--------
9090
// Standard usage:
91-
> var zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
92-
> var za = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
93-
> {{alias}}.ndarray( 2, za, zx, 1, 0 )
91+
> var x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
92+
> var alpha = new {{alias:@stdlib/complex/float64/ctor}}( 2.0, 2.0 );
93+
> {{alias}}.ndarray( 2, alpha, x, 1, 0 )
9494
<Complex128Array>[ -2.0, 6.0, -2.0, 14.0 ]
9595

9696
// Advanced indexing:
97-
> zx = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
98-
> za = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
99-
> {{alias}}.ndarray( 2, za, zx, 1, 2 )
97+
> x = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );
98+
> alpha = new {{alias:@stdlib/complex/float64/ctor}}( 1.0, 2.0 );
99+
> {{alias}}.ndarray( 2, alpha, x, 1, 2 )
100100
<Complex128Array>[ 1.0, 2.0, 3.0, 4.0, -7.0, 16.0, -9.0, 22.0 ]
101101

102102

@@ -447,7 +447,7 @@
447447
Input array pointer (i.e., byte offset).
448448

449449
dx: integer
450-
Index increment for `zx`.
450+
Index increment for `x`.
451451

452452
Returns
453453
-------
@@ -503,10 +503,10 @@
503503
Input array pointer (i.e., byte offset).
504504

505505
dx: integer
506-
Index increment for `zx`.
506+
Index increment for `x`.
507507

508508
ox: integer
509-
Starting index for `zx`.
509+
Starting index for `x`.
510510

511511
Returns
512512
-------

0 commit comments

Comments
 (0)