Skip to content

Commit 71ef98d

Browse files
committed
chore: refactor and resolve lint error
1 parent 76678df commit 71ef98d

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sscal( 3, 5.0, x1, 2 );
7777
// x0 => <Float32Array>[ 1.0, -10.0, 3.0, -20.0, 5.0, -30.0 ]
7878
```
7979

80-
If either `N` is less than or equal to `0`, the function returns `x` unchanged.
80+
If either `N` or `stride` is less than or equal to `0`, the function returns `x` unchanged.
8181

8282
#### sscal.ndarray( N, alpha, x, stride, offset )
8383

lib/node_modules/@stdlib/blas/base/sscal/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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 `x` unchanged.
12+
If `N <= 0`, the function returns `x` unchanged.
1313

1414
Parameters
1515
----------

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface Routine {
2828
* @param N - number of indexed elements
2929
* @param alpha - constant
3030
* @param x - input array
31-
* @param stride - stride length
31+
* @param stride - index increment
3232
* @returns input array
3333
*
3434
* @example
@@ -47,7 +47,7 @@ interface Routine {
4747
* @param N - number of indexed elements
4848
* @param alpha - constant
4949
* @param x - input array
50-
* @param stride - stride length
50+
* @param stride - index increment
5151
* @param offset - starting index
5252
* @returns input array
5353
*
@@ -68,7 +68,7 @@ interface Routine {
6868
* @param N - number of indexed elements
6969
* @param alpha - constant
7070
* @param x - input array
71-
* @param stride - stride length
71+
* @param stride - index increment
7272
* @returns input array
7373
*
7474
* @example

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2019 The Stdlib Authors.
4+
* Copyright (c) 2020 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

lib/node_modules/@stdlib/blas/base/sscal/include/stdlib/blas/base/sscal_cblas.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2019 The Stdlib Authors.
4+
* Copyright (c) 2024 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
1919
/**
2020
* Header file containing function declarations for the C interface to the CBLAS Level 1 routine `cblas_sscal`.
2121
*/
22-
#ifndef SSCAL_CLBAS_H
22+
#ifndef SSCAL_CBLAS_H
2323
#define SSCAL_CBLAS_H
2424

2525
#include "stdlib/blas/base/shared.h"
@@ -32,7 +32,7 @@ extern "C" {
3232
#endif
3333

3434
/**
35-
* Multiplies each element of a single-precision floating-point vector by a constant.
35+
* Applies a modified Givens plane rotation.
3636
*/
3737
void API_SUFFIX(cblas_sscal)( const CBLAS_INT N, const float alpha, float *X, const CBLAS_INT stride );
3838

lib/node_modules/@stdlib/blas/base/sscal/include/stdlib/blas/base/sscal_fortran.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2019 The Stdlib Authors.
4+
* Copyright (c) 2020 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -22,6 +22,8 @@
2222
#ifndef SSCAL_FORTRAN_H
2323
#define SSCAL_FORTRAN_H
2424

25+
#include "stdlib/blas/base/shared.h"
26+
2527
/*
2628
* If C++, prevent name mangling so that the compiler emits a binary file having undecorated names, thus mirroring the behavior of a C/Fortran compiler (a Fortran compiler must be configured to not attach underscores).
2729
*/
@@ -32,7 +34,7 @@ extern "C" {
3234
/**
3335
* Multiplies each element of a single-precision floating-point vector by a constant.
3436
*/
35-
void sscal( const int *, const float *, float *, const int * );
37+
void sscal( const CBLAS_INT *, const float *, float *, const CBLAS_INT * );
3638

3739
#ifdef __cplusplus
3840
}

lib/node_modules/@stdlib/blas/base/sscal/lib/ndarray.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2019 The Stdlib Authors.
4+
* Copyright (c) 2020 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -45,8 +45,8 @@ var M = 5;
4545
*/
4646
function sscal( N, alpha, x, stride, offset ) {
4747
var ix;
48-
var i;
4948
var m;
49+
var i;
5050

5151
if ( N <= 0 || alpha === 1.0 ) {
5252
return x;
@@ -68,11 +68,11 @@ function sscal( N, alpha, x, stride, offset ) {
6868
return x;
6969
}
7070
for ( i = m; i < N; i += M ) {
71-
x[ i ] *= alpha;
72-
x[ i+1 ] *= alpha;
73-
x[ i+2 ] *= alpha;
74-
x[ i+3 ] *= alpha;
75-
x[ i+4 ] *= alpha;
71+
x[ ix ] *= alpha;
72+
x[ ix+1 ] *= alpha;
73+
x[ ix+2 ] *= alpha;
74+
x[ ix+3 ] *= alpha;
75+
x[ ix+4 ] *= alpha;
7676
ix += M;
7777
}
7878
return x;

lib/node_modules/@stdlib/blas/base/sscal/lib/ndarray.native.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ var addon = require( './../src/addon.node' );
3939
* var Float32Array = require( '@stdlib/array/float32' );
4040
*
4141
* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
42-
* var alpha = 5.0;
4342
*
44-
* sscal( 3, alpha, x, 1, x.length-3 );
43+
* sscal( 3, 5.0, x, 1, x.length-3 );
4544
* // x => <Float32Array>[ 1.0, -2.0, 3.0, -20.0, 25.0, -30.0 ]
4645
*/
4746
function sscal( N, alpha, x, stride, offset ) {

lib/node_modules/@stdlib/blas/base/sscal/lib/sscal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @license Apache-2.0
33
*
4-
* Copyright (c) 2019 The Stdlib Authors.
4+
* Copyright (c) 2020 The Stdlib Authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.

lib/node_modules/@stdlib/blas/base/sscal/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"blas",
6161
"level 1",
6262
"sscal",
63-
"dscal",
6463
"linear",
6564
"algebra",
6665
"scal",
@@ -72,7 +71,6 @@
7271
"ndarray",
7372
"float32",
7473
"float",
75-
"single",
7674
"float32array"
7775
],
7876
"__stdlib__": {

0 commit comments

Comments
 (0)