Skip to content

Commit

Permalink
refactor: remove explicit cast and update function parameter descript…
Browse files Browse the repository at this point in the history
…ion in `blas/ext/base/drev`

PR-URL: #3127
Reviewed-by: Athan Reines <kgryte@gmail.com>
  • Loading branch information
headlessNode authored Nov 17, 2024
1 parent 05b1c95 commit cb425f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/drev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ stdlib_strided_drev( 4, x, 1 );
The function accepts the following arguments:
- **N**: `[in] CBLAS_INT` number of indexed elements.
- **X**: `[in] double*` input array.
- **X**: `[inout] double*` input array.
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
```c
Expand All @@ -201,7 +201,7 @@ stdlib_strided_drev_ndarray( 4, x, 1, 0 );
The function accepts the following arguments:
- **N**: `[in] CBLAS_INT` number of indexed elements.
- **X**: `[in] double*` input array.
- **X**: `[inout] double*` input array.
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var ndarray = require( './ndarray.js' );
* // x => <Float64Array>[ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]
*/
function drev( N, x, strideX ) {
return ndarray( N, x, strideX, stride2offset( N, strideX) );
return ndarray( N, x, strideX, stride2offset( N, strideX ) );
}


Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static napi_value addon( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, N, argv, 0 );
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
API_SUFFIX(stdlib_strided_drev)( N, (double *)X, strideX );
API_SUFFIX(stdlib_strided_drev)( N, X, strideX );
return NULL;
}

Expand All @@ -53,7 +53,7 @@ static napi_value addon_method( napi_env env, napi_callback_info info ) {
STDLIB_NAPI_ARGV_INT64( env, strideX, argv, 2 );
STDLIB_NAPI_ARGV_INT64( env, offsetX, argv, 3 );
STDLIB_NAPI_ARGV_STRIDED_FLOAT64ARRAY( env, X, N, strideX, argv, 1 );
API_SUFFIX(stdlib_strided_drev_ndarray)( N, (double *)X, strideX, offsetX );
API_SUFFIX(stdlib_strided_drev_ndarray)( N, X, strideX, offsetX );
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ void API_SUFFIX(stdlib_strided_drev)( const CBLAS_INT N, double *X, const CBLAS_
* @param offsetX starting index
*/
void API_SUFFIX(stdlib_strided_drev_ndarray)( const CBLAS_INT N, double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX ) {
double tmp;
CBLAS_INT ix;
CBLAS_INT iy;
CBLAS_INT m;
CBLAS_INT n;
CBLAS_INT i;
double tmp;

if ( N <= 0 ) {
return;
Expand Down

1 comment on commit cb425f9

@stdlib-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/drev $\color{green}409/409$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}409/409$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this push.

Please sign in to comment.