Skip to content

Commit 6218e59

Browse files
committed
chore: clean-up
--- 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: na - 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: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 69f26df commit 6218e59

22 files changed

+206
-198
lines changed

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

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The function has the following parameters:
5555
- **y**: second input [`Complex128Array`][@stdlib/array/complex128].
5656
- **strideY**: stride length for `y`.
5757

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`,
58+
The `N` and stride parameters determine how elements from `x` are scaled by `alpha` and added to `y`. For example, to scale every other element in `x` by `alpha` and add the result to every other element of `y`,
5959

6060
```javascript
6161
var Complex128Array = require( '@stdlib/array/complex128' );
@@ -88,7 +88,7 @@ var alpha = new Complex128( 2.0, 2.0 );
8888
var x1 = new Complex128Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
8989
var y1 = new Complex128Array( y0.buffer, y0.BYTES_PER_ELEMENT*2 ); // start at 3rd element
9090

91-
// Scales values of `x0` by `alpha` starting from second index and add the result to `y0` starting from third index...
91+
// Perform operation:
9292
zaxpy( 2, alpha, x1, 1, y1, 1 );
9393
// y0 => <Complex128Array>[ 1.0, 1.0, 1.0, 1.0, -1.0, 15.0, -1.0, 23.0 ]
9494
```
@@ -114,7 +114,7 @@ The function has the following additional parameters:
114114
- **offsetX**: starting index for `x`.
115115
- **offsetY**: starting index for `y`.
116116

117-
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,
117+
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 elements 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 Complex128Array = require( '@stdlib/array/complex128' );
@@ -136,8 +136,7 @@ zaxpy.ndarray( 3, alpha, x, 1, 1, y, 1, 1 );
136136

137137
## Notes
138138

139-
- If `N <= 0`, both functions return `y` unchanged.
140-
- If `alpha === 0`, both functions return `y` unchanged.
139+
- If `N <= 0` or `alpha == 0`, both functions return `y` unchanged.
141140
- `zaxpy()` corresponds to the [BLAS][blas] level 1 function [`zaxpy`][zaxpy].
142141

143142
</section>
@@ -169,19 +168,19 @@ var yc1 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
169168

170169
var alpha = new Complex128( 2.0, 2.0 );
171170

172-
// Scale values from `x` by `alpha` and add the result to `y`:
173-
zaxpy( x.length, alpha, x, 1, y, 1 );
171+
// Perform operation:
172+
zaxpy( x.length, alpha, x, 1, yc1, 1 );
174173

175174
// Print the results:
176-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc1, y );
175+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, y, yc1 );
177176

178-
var yc2 = zcopy( yc1.length, yc1, 1, zeros( yc1.length, 'complex128' ), 1 );
177+
var yc2 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
179178

180-
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
181-
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc1, 1, 0 );
179+
// Perform operation using alternative indexing semantics:
180+
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc2, 1, 0 );
182181

183182
// Print the results:
184-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 );
183+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, y, yc2 );
185184
```
186185

187186
</section>
@@ -219,10 +218,10 @@ logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 );
219218
Scales values from `X` by `alpha` and adds the result to `Y`.
220219

221220
```c
222-
#include "stdlib/complex/float32/ctor.h"
221+
#include "stdlib/complex/float64/ctor.h"
223222

224-
const float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
225-
float y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 };
223+
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
224+
double y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 };
226225
const stdlib_complex128_t alpha = stdlib_complex128( 2.0, 2.0 );
227226

228227
c_zaxpy( 4, alpha, (void *)x, 1, (void *)y, 1 );
@@ -238,18 +237,18 @@ The function accepts the following arguments:
238237
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
239238
240239
```c
241-
void c_zaxpy( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *x, const CBLAS_INT strideX, void *y, const CBLAS_INT strideY );
240+
void c_zaxpy( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
242241
```
243242

244243
#### c_zaxpy_ndarray( N, alpha, \*X, strideX, offsetX, \*Y, strideY, offsetY )
245244

246245
Scales values from `X` by `alpha` and adds the result to `Y` using alternative indexing semantics.
247246

248247
```c
249-
#include "stdlib/complex/float32/ctor.h"
248+
#include "stdlib/complex/float64/ctor.h"
250249

251-
const float x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
252-
float y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 };
250+
const double x[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
251+
double y[] = { -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, -8.0 };
253252
const stdlib_complex128_t alpha = stdlib_complex128( 2.0, 2.0 );
254253

255254
c_zaxpy_ndarray( 4, alpha, (void *)x, 1, 0, (void *)y, 1, 0 );
@@ -267,7 +266,7 @@ The function accepts the following arguments:
267266
- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.
268267
269268
```c
270-
void c_zaxpy_ndarray( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *x, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *y, const CBLAS_INT strideY, const CBLAS_INT offsetY );
269+
void c_zaxpy_ndarray( const CBLAS_INT N, const stdlib_complex128_t alpha, const void *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, void *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY );
271270
```
272271

273272
</section>
@@ -290,7 +289,7 @@ void c_zaxpy_ndarray( const CBLAS_INT N, const stdlib_complex128_t alpha, const
290289

291290
```c
292291
#include "stdlib/blas/base/zaxpy.h"
293-
#include "stdlib/complex/float32/ctor.h"
292+
#include "stdlib/complex/float64/ctor.h"
294293
#include <stdio.h>
295294

296295
int main( void ) {
@@ -308,20 +307,20 @@ int main( void ) {
308307
const int strideX = 1;
309308
const int strideY = 1;
310309

311-
// Scale values from `x` by `alpha` and add the result to `y`:
310+
// Perform operation:
312311
c_zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY );
313312

314313
// Print the result:
315314
for ( int i = 0; i < N; i++ ) {
316-
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] );
315+
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
317316
}
318317

319-
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
318+
// Perform operation using alternative indexing semantics:
320319
c_zaxpy_ndarray( N, alpha, (void *)x, strideX, 0, (void *)y, strideY, 0 );
321320

322321
// Print the result:
323322
for ( int i = 0; i < N; i++ ) {
324-
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] );
323+
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
325324
}
326325
}
327326
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function main() {
108108
for ( i = min; i <= max; i++ ) {
109109
N = pow( 10, i );
110110
f = createBenchmark( N );
111-
bench( pkg+':size='+N, f );
111+
bench( pkg+':len='+N, f );
112112
}
113113
}
114114

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function main() {
113113
for ( i = min; i <= max; i++ ) {
114114
N = pow( 10, i );
115115
f = createBenchmark( N );
116-
bench( pkg+'::native:size='+N, opts, f );
116+
bench( pkg+'::native:len='+N, opts, f );
117117
}
118118
}
119119

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.native.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function main() {
113113
for ( i = min; i <= max; i++ ) {
114114
N = pow( 10, i );
115115
f = createBenchmark( N );
116-
bench( pkg+'::native:ndarray:size='+N, opts, f );
116+
bench( pkg+'::native:ndarray:len='+N, opts, f );
117117
}
118118
}
119119

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/benchmark.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function main() {
108108
for ( i = min; i <= max; i++ ) {
109109
N = pow( 10, i );
110110
f = createBenchmark( N );
111-
bench( pkg+':ndarray:size='+N, f );
111+
bench( pkg+':ndarray:len='+N, f );
112112
}
113113
}
114114

lib/node_modules/@stdlib/blas/base/zaxpy/benchmark/c/benchmark.length.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ int main( void ) {
183183
iter = ITERATIONS / pow( 10, i-1 );
184184
for ( j = 0; j < REPEATS; j++ ) {
185185
count += 1;
186-
printf( "# c::%s:size=%d\n", NAME, N*N );
186+
printf( "# c::%s:len=%d\n", NAME, N*N );
187187
elapsed = benchmark1( iter, N );
188188
print_results( iter, elapsed );
189189
printf( "ok %d benchmark finished\n", count );
@@ -194,7 +194,7 @@ int main( void ) {
194194
iter = ITERATIONS / pow( 10, i-1 );
195195
for ( j = 0; j < REPEATS; j++ ) {
196196
count += 1;
197-
printf( "# c::%s:ndarray:size=%d\n", NAME, N*N );
197+
printf( "# c::%s:ndarray:len=%d\n", NAME, N*N );
198198
elapsed = benchmark2( iter, N );
199199
print_results( iter, elapsed );
200200
printf( "ok %d benchmark finished\n", count );

lib/node_modules/@stdlib/blas/base/zaxpy/examples/c/example.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ int main( void ) {
3636
const int strideX = 1;
3737
const int strideY = 1;
3838

39-
// Scale values from `x` by `alpha` and add the result to `y`:
39+
// Perform operation:
4040
c_zaxpy( N, alpha, (void *)x, strideX, (void *)y, strideY );
4141

4242
// Print the result:
4343
for ( int i = 0; i < N; i++ ) {
44-
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] );
44+
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
4545
}
4646

47-
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
47+
// Perform operation using alternative indexing semantics:
4848
c_zaxpy_ndarray( N, alpha, (void *)x, strideX, 0, (void *)y, strideY, 0 );
4949

5050
// Print the result:
5151
for ( int i = 0; i < N; i++ ) {
52-
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i * 2 ], y[ ( i * 2 ) + 1 ] );
52+
printf( "zaxpy[ %i ] = %lf + %lfj\n", i, y[ i*2 ], y[ (i*2)+1 ] );
5353
}
5454
}

lib/node_modules/@stdlib/blas/base/zaxpy/examples/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ var yc1 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
3636

3737
var alpha = new Complex128( 2.0, 2.0 );
3838

39-
// Scale values from `x` by `alpha` and add the result to `y`:
40-
zaxpy( x.length, alpha, x, 1, y, 1 );
39+
// Perform operation:
40+
zaxpy( x.length, alpha, x, 1, yc1, 1 );
4141

4242
// Print the results:
43-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc1, y );
43+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, y, yc1 );
4444

45-
var yc2 = zcopy( yc1.length, yc1, 1, zeros( yc1.length, 'complex128' ), 1 );
45+
var yc2 = zcopy( y.length, y, 1, zeros( y.length, 'complex128' ), 1 );
4646

47-
// Scale values from `x` by `alpha` and add the result to `y` using alternative indexing semantics:
48-
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc1, 1, 0 );
47+
// Perform operation using alternative indexing semantics:
48+
zaxpy.ndarray( x.length, alpha, x, 1, 0, yc2, 1, 0 );
4949

5050
// Print the results:
51-
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, yc2, yc1 );
51+
logEach( '(%s)*(%s) + (%s) = %s', alpha, x, y, yc2 );

lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
/**
2020
* Header file containing function declarations for the C interface to the BLAS Level 1 routine `zaxpy`.
2121
*/
22-
#ifndef ZAXPY_H
23-
#define ZAXPY_H
22+
#ifndef STDLIB_BLAS_BASE_ZAXPY_H
23+
#define STDLIB_BLAS_BASE_ZAXPY_H
2424

2525
#include "stdlib/blas/base/shared.h"
2626
#include "stdlib/complex/float64/ctor.h"
@@ -46,4 +46,4 @@ void API_SUFFIX(c_zaxpy_ndarray)( const CBLAS_INT N, const stdlib_complex128_t a
4646
}
4747
#endif
4848

49-
#endif // !ZAXPY_H
49+
#endif // !STDLIB_BLAS_BASE_ZAXPY_H

lib/node_modules/@stdlib/blas/base/zaxpy/include/stdlib/blas/base/zaxpy_cblas.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
/**
2020
* Header file containing function declarations for the C interface to the CBLAS Level 1 routine `cblas_zaxpy`.
2121
*/
22-
#ifndef ZAXPY_CBLAS_H
23-
#define ZAXPY_CBLAS_H
22+
#ifndef STDLIB_BLAS_BASE_ZAXPY_CBLAS_H
23+
#define STDLIB_BLAS_BASE_ZAXPY_CBLAS_H
2424

2525
#include "stdlib/blas/base/shared.h"
2626
#include "stdlib/complex/float64/ctor.h"
@@ -33,12 +33,12 @@ extern "C" {
3333
#endif
3434

3535
/**
36-
* 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.
36+
* Scales a double-precision complex floating-point vector by a double-precision complex floating-point constant and adds the result to a double-precision complex floating-point vector.
3737
*/
3838
void API_SUFFIX(cblas_zaxpy)( const CBLAS_INT N, const stdlib_complex128_t alpha, void *X, const CBLAS_INT strideX, void *Y, const CBLAS_INT strideY );
3939

4040
#ifdef __cplusplus
4141
}
4242
#endif
4343

44-
#endif // !ZAXPY_CBLAS_H
44+
#endif // !STDLIB_BLAS_BASE_ZAXPY_CBLAS_H

0 commit comments

Comments
 (0)