diff --git a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md index a27caef39dde..78476fc5da7f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md +++ b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/README.md @@ -231,14 +231,14 @@ stdlib_strided_ssort2ins( 4, 1.0f, x, 1, y, 1 ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **order**: `[in] float` 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] float` 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. - **X**: `[inout] float*` first input array. - **strideX**: `[in] CBLAS_INT` stride length for `X`. - **Y**: `[inout] float*` second input array. - **strideY**: `[in] CBLAS_INT` stride length for `Y`. ```c -stdlib_strided_ssort2ins( const CBLAS_INT N, const float order, float *X, CBLAS_INT strideX, float *Y, CBLAS_INT strideY ); +stdlib_strided_ssort2ins( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY ); ``` @@ -259,7 +259,7 @@ stdlib_strided_ssort2ins_ndarray( 4, 1.0f, x, 1, 0, y, 1, 0 ); The function accepts the following arguments: - **N**: `[in] CBLAS_INT` number of indexed elements. -- **order**: `[in] float` 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] float` 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. - **X**: `[inout] float*` first input array. - **strideX**: `[in] CBLAS_INT` stride length for `X`. - **offsetX**: `[in] CBLAS_INT` starting index for `X`. @@ -268,7 +268,7 @@ The function accepts the following arguments: - **offsetY**: `[in] CBLAS_INT` starting index for `Y`. ```c -stdlib_strided_ssort2ins_ndarray( const CBLAS_INT N, const float order, float *X, CBLAS_INT strideX, CBLAS_INT offsetX, float *Y, CBLAS_INT strideY, CBLAS_INT offsetY ); +stdlib_strided_ssort2ins_ndarray( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ); ``` diff --git a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/benchmark/c/benchmark.unsorted_random.length.c b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/benchmark/c/benchmark.unsorted_random.length.c index 4babb3d30dc3..505fd0aaed15 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/benchmark/c/benchmark.unsorted_random.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/benchmark/c/benchmark.unsorted_random.length.c @@ -82,7 +82,7 @@ static double tic( void ) { * * @return random number */ -static double rand_float( void ) { +static float rand_float( void ) { int r = rand(); return (float)r / ( (float)RAND_MAX + 1.0f ); } diff --git a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/src/main.c b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/src/main.c index 0516027f1480..4bbb9576877f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/src/main.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ssort2ins/src/main.c @@ -41,7 +41,7 @@ void API_SUFFIX(stdlib_strided_ssort2ins)( const CBLAS_INT N, const float order, /** -* Simultaneously sorts two signle-precision floating-point strided arrays based on the sort order of the first array using insertion sort and alternative indexing semantics. +* Simultaneously sorts two single-precision floating-point strided arrays based on the sort order of the first array using insertion sort and alternative indexing semantics. * * @param N number of indexed elements * @param order sort order @@ -52,7 +52,7 @@ void API_SUFFIX(stdlib_strided_ssort2ins)( const CBLAS_INT N, const float order, * @param strideY stride length for `Y` * @param offsetY starting index for `Y` */ -void API_SUFFIX(stdlib_strided_ssort2ins_ndarray)( const CBLAS_INT N, const float order, float *X, CBLAS_INT strideX, CBLAS_INT offsetX, float *Y, CBLAS_INT strideY, CBLAS_INT offsetY ) { +void API_SUFFIX(stdlib_strided_ssort2ins_ndarray)( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, float *Y, const CBLAS_INT strideY, const CBLAS_INT offsetY ) { CBLAS_INT sx; CBLAS_INT sy; CBLAS_INT ox; @@ -76,8 +76,8 @@ void API_SUFFIX(stdlib_strided_ssort2ins_ndarray)( const CBLAS_INT N, const floa } // 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.0f ) { - sx = strideX * -1; - sy = strideY * -1; + sx = -strideX; + sy = -strideY; ox = offsetX - ( (N-1) * sx ); oy = offsetY - ( (N-1) * sy ); } else {