From 537f23778ca61da0b1715881360e6bfa9d8fa427 Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:52:36 +0000 Subject: [PATCH] fix: apply code review suggestions --- lib/node_modules/@stdlib/blas/ext/base/drev/README.md | 4 ++-- lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js | 2 +- lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c | 4 ++-- lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/README.md b/lib/node_modules/@stdlib/blas/ext/base/drev/README.md index 6f08750b7cd..3db61e54cde 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/README.md @@ -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 @@ -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`. diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js b/lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js index 55c1c035319..3d6184db37c 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/lib/drev.js @@ -43,7 +43,7 @@ var ndarray = require( './ndarray.js' ); * // x => [ -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 ) ); } diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c index eeb5b82de0f..193e55f7cd5 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/src/addon.c @@ -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; } @@ -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; } diff --git a/lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c index b1945d6356d..a29cb81f54b 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/drev/src/main.c @@ -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;