From 8901329c8900905f883f96051223613304b3694f Mon Sep 17 00:00:00 2001 From: saurabhraghuvanshii Date: Thu, 6 Feb 2025 22:32:40 +0530 Subject: [PATCH 1/2] chore: update readme.md main.c manifest.json --- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 --- --- lib/node_modules/@stdlib/blas/ext/base/dsorthp/README.md | 9 ++++----- .../@stdlib/blas/ext/base/dsorthp/manifest.json | 3 --- .../@stdlib/blas/ext/base/dsorthp/src/main.c | 7 +++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/README.md b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/README.md index 1b84c98f7d19..1cbff2ae6cd0 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/README.md @@ -94,7 +94,7 @@ The function has the following additional parameters: - **offsetX**: starting index. -While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on starting a index. For example, to access only the last three elements: +While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access only the last three elements: ```javascript var Float64Array = require( '@stdlib/array/float64' ); @@ -184,7 +184,7 @@ stdlib_strided_dsorthp( 2, -1.0, x, 1 ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **order**: `[in] double` sort order. If `order < 0.0`, the input strided array `x` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `x` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged. +- **order**: `[in] double` sort order. If `order < 0.0`, the input strided array is sorted in **decreasing** order. If `order > 0.0`, the input strided array is sorted in **increasing** order. If `order == 0.0`, the input strided array is left unchanged. - **X**: `[inout] double*` input array. - **strideX**: `[in] CBLAS_INT` stride length. @@ -209,8 +209,8 @@ stdlib_strided_dsorthp_ndarray( 4, 1.0, x, 1, 0 ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **order**: `[in] double` sort order. -- **X**: `[inout] double*` input array. If `order < 0.0`, the input strided array `x` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `x` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged. +- **order**: `[in] double` sort order. If `order < 0.0`, the input strided array is sorted in **decreasing** order. If `order > 0.0`, the input strided array is sorted in **increasing** order. If `order == 0.0`, the input strided array is left unchanged. +- **X**: `[inout] double*` input array. - **strideX**: `[in] CBLAS_INT` stride length. - **offsetX**: `[in] CBLAS_INT` starting index. @@ -258,7 +258,6 @@ int main( void ) { printf( "x[ %i ] = %lf\n", i, x[ i ] ); } } - ``` diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/manifest.json b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/manifest.json index 2dd9efaba5ed..cb0be6897a23 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/manifest.json +++ b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/manifest.json @@ -42,7 +42,6 @@ "@stdlib/napi/argv-double", "@stdlib/napi/argv-strided-float64array", "@stdlib/math/base/assert/is-nan", - "@stdlib/math/base/special/floor", "@stdlib/math/base/assert/is-positive-zero", "@stdlib/strided/base/stride2offset", "@stdlib/blas/base/shared" @@ -60,7 +59,6 @@ "libpath": [], "dependencies": [ "@stdlib/math/base/assert/is-nan", - "@stdlib/math/base/special/floor", "@stdlib/math/base/assert/is-positive-zero", "@stdlib/strided/base/stride2offset", "@stdlib/blas/base/shared" @@ -78,7 +76,6 @@ "libpath": [], "dependencies": [ "@stdlib/math/base/assert/is-nan", - "@stdlib/math/base/special/floor", "@stdlib/math/base/assert/is-positive-zero", "@stdlib/strided/base/stride2offset", "@stdlib/blas/base/shared" diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c index 4d1bca561f72..d80008b76515 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c @@ -21,7 +21,6 @@ #include "stdlib/math/base/assert/is_nan.h" #include "stdlib/blas/base/shared.h" #include "stdlib/strided/base/stride2offset.h" -#include "stdlib/math/base/special/floor.h" /** * Sorts a double-precision floating-point strided array using heapsort. @@ -81,9 +80,9 @@ void API_SUFFIX(stdlib_strided_dsorthp_ndarray)( const CBLAS_INT N, const double } // For a positive stride, sorting in decreasing order is equivalent to providing a negative stride and sorting in increasing order, and, for a negative stride, sorting in decreasing order is equivalent to providing a positive stride and sorting in increasing order... if ( order < 0.0 ) { - sx = strideX * -1; + sx = -strideX; ox = offsetX - ( (N-1)*sx ); - }else{ + } else { sx = strideX; ox = offsetX; } @@ -91,7 +90,7 @@ void API_SUFFIX(stdlib_strided_dsorthp_ndarray)( const CBLAS_INT N, const double n = N; // Specify an initial "parent" index for building the heap: - parent = stdlib_base_floor( N / 2 ); + parent = ( N / 2 ); // Continue looping until the array is sorted... while ( true ) { From b2487923224983f0a2c0e886cf72ab6177e450da Mon Sep 17 00:00:00 2001 From: Athan Date: Sat, 8 Feb 2025 00:24:17 -0800 Subject: [PATCH 2/2] style: remove parentheses Signed-off-by: Athan --- lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c index d80008b76515..e739cdbdac7a 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dsorthp/src/main.c @@ -90,7 +90,7 @@ void API_SUFFIX(stdlib_strided_dsorthp_ndarray)( const CBLAS_INT N, const double n = N; // Specify an initial "parent" index for building the heap: - parent = ( N / 2 ); + parent = N / 2; // Continue looping until the array is sorted... while ( true ) {