Skip to content

Commit d6bdd26

Browse files
docs: improve clarity in README and documentation for ssort2sh function
--- 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: passed - 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: passed - task: lint_c_benchmarks status: passed - 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 ---
1 parent fb5713c commit d6bdd26

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The function has the following parameters:
5858
- **y**: second input [`Float32Array`][@stdlib/array/float32].
5959
- **strideY**: stride length for `y`.
6060

61-
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to sort every other element
61+
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to sort every other element:
6262

6363
```javascript
6464
var Float32Array = require( '@stdlib/array/float32' );
@@ -228,9 +228,9 @@ The function accepts the following arguments:
228228
229229
- **N**: `[in] CBLAS_INT` number of indexed elements.
230230
- **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.
231-
- **X**: `[inout] float*` input array.
231+
- **X**: `[inout] float*` first input array.
232232
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
233-
- **Y**: `[inout] float*` input array.
233+
- **Y**: `[inout] float*` second input array.
234234
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
235235
236236
```c
@@ -256,10 +256,10 @@ The function accepts the following arguments:
256256
257257
- **N**: `[in] CBLAS_INT` number of indexed elements.
258258
- **order**: `[in] float` sort order.
259-
- **X**: `[inout] float*` input array.
259+
- **X**: `[inout] float*` first input array.
260260
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
261261
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
262-
- **Y**: `[inout] float*` input array.
262+
- **Y**: `[inout] float*` second input array.
263263
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
264264
- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.
265265
@@ -307,7 +307,7 @@ int main( void ) {
307307
// Print the result:
308308
for ( int i = 0; i < 8; i++ ) {
309309
printf( "x[ %i ] = %f\n", i, x[ i ] );
310-
printf( "y[ %i ] = %lf\n", i, y[ i ] );
310+
printf( "y[ %i ] = %f\n", i, y[ i ] );
311311
}
312312
}
313313
```

lib/node_modules/@stdlib/blas/ext/base/ssort2sh/benchmark/c/benchmark.unsorted_random.length.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ static double benchmark2( int iterations, int len ) {
138138
float *y;
139139
int i;
140140

141-
x = (float *)malloc( len * sizeof(float) );
142-
y = (float *)malloc( len * sizeof(float) );
141+
x = ( float * )malloc( len * sizeof(float) );
142+
y = ( float * )malloc( len * sizeof(float) );
143143
for ( i = 0; i < len; i++ ) {
144144
x[ i ] = ( rand_float()*20.0f ) - 10.0f;
145145
y[ i ] = ( rand_float()*20.0f ) - 10.0f;

lib/node_modules/@stdlib/blas/ext/base/ssort2sh/docs/repl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
Stride length for `x`.
114114

115115
offsetX: integer
116-
Starting index of `x`.
116+
Starting index for `x`.
117117

118118
y: Float32Array
119119
Second input array.
@@ -122,7 +122,7 @@
122122
Stride length for `y`.
123123

124124
offsetY: integer
125-
Starting index of `y`.
125+
Starting index for `y`.
126126

127127
Returns
128128
-------

lib/node_modules/@stdlib/blas/ext/base/ssort2sh/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ int main( void ) {
3737
// Print the result:
3838
for ( int i = 0; i < 8; i++ ) {
3939
printf( "x[ %i ] = %f\n", i, x[ i ] );
40-
printf( "y[ %i ] = %lf\n", i, y[ i ] );
40+
printf( "y[ %i ] = %f\n", i, y[ i ] );
4141
}
4242
}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
* @param N number of indexed elements
4040
* @param order sort order
4141
* @param X first input array
42-
* @param strideX stride length for `x`
42+
* @param strideX stride length for `X`
4343
* @param Y second input array
44-
* @param strideY stride length for `y`
44+
* @param strideY stride length for `Y`
4545
*/
4646
void API_SUFFIX(stdlib_strided_ssort2sh)( const CBLAS_INT N, const float order, float *X, const CBLAS_INT strideX, float *Y, const CBLAS_INT strideY ) {
4747
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
@@ -56,11 +56,11 @@ void API_SUFFIX(stdlib_strided_ssort2sh)( const CBLAS_INT N, const float order,
5656
* @param N number of indexed elements
5757
* @param order sort order
5858
* @param X first input array
59-
* @param strideX stride length for `x`
60-
* @param offsetX starting index for `x`
59+
* @param strideX stride length for `X`
60+
* @param offsetX starting index for `X`
6161
* @param Y second input array
62-
* @param strideY stride length for `y`
63-
* @param offsetY starting index for `y`
62+
* @param strideY stride length for `Y`
63+
* @param offsetY starting index for `Y`
6464
*/
6565
void API_SUFFIX(stdlib_strided_ssort2sh_ndarray)( const CBLAS_INT N, const float order, float *X, CBLAS_INT strideX, CBLAS_INT offsetX, float *Y, CBLAS_INT strideY, CBLAS_INT offsetY ) {
6666
CBLAS_INT gap;

0 commit comments

Comments
 (0)