Skip to content

Commit cb425f9

Browse files
authored
refactor: remove explicit cast and update function parameter description in blas/ext/base/drev
PR-URL: #3127 Reviewed-by: Athan Reines <[email protected]>
1 parent 05b1c95 commit cb425f9

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ stdlib_strided_drev( 4, x, 1 );
181181
The function accepts the following arguments:
182182
183183
- **N**: `[in] CBLAS_INT` number of indexed elements.
184-
- **X**: `[in] double*` input array.
184+
- **X**: `[inout] double*` input array.
185185
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
186186
187187
```c
@@ -201,7 +201,7 @@ stdlib_strided_drev_ndarray( 4, x, 1, 0 );
201201
The function accepts the following arguments:
202202
203203
- **N**: `[in] CBLAS_INT` number of indexed elements.
204-
- **X**: `[in] double*` input array.
204+
- **X**: `[inout] double*` input array.
205205
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
206206
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
207207

lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var ndarray = require( './ndarray.js' );
4343
* // x => <Float64Array>[ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]
4444
*/
4545
function drev( N, x, strideX ) {
46-
return ndarray( N, x, strideX, stride2offset( N, strideX) );
46+
return ndarray( N, x, strideX, stride2offset( N, strideX ) );
4747
}
4848

4949

lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
3636
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
3737
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
3838
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
39-
API_SUFFIX(stdlib_strided_drev)( N, (double *)X, strideX );
39+
API_SUFFIX(stdlib_strided_drev)( N, X, strideX );
4040
return NULL;
4141
}
4242

@@ -53,7 +53,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
5353
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
5454
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
5555
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
56-
API_SUFFIX(stdlib_strided_drev_ndarray)( N, (double *)X, strideX, offsetX );
56+
API_SUFFIX(stdlib_strided_drev_ndarray)( N, X, strideX, offsetX );
5757
return NULL;
5858
}
5959

lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ void API_SUFFIX(stdlib_strided_drev)( const CBLAS_INT N, double *X, const CBLAS_
4141
* @param offsetX starting index
4242
*/
4343
void API_SUFFIX(stdlib_strided_drev_ndarray)( const CBLAS_INT N, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
44-
double tmp;
4544
CBLAS_INT ix;
4645
CBLAS_INT iy;
4746
CBLAS_INT m;
4847
CBLAS_INT n;
4948
CBLAS_INT i;
49+
double tmp;
5050

5151
if ( N <= 0 ) {
5252
return;

0 commit comments

Comments
 (0)