Skip to content

Commit 76228dd

Browse files
committed
fix: apply suggestions from code review
--- 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: passed - 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: missing_dependencies - 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: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 118cf33 commit 76228dd

8 files changed

Lines changed: 41 additions & 38 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ dcartesianSquare.ndarray( 2, x, 1, 2, out, 2, 1, 0 );
124124

125125
## Notes
126126

127-
- For an input array `x` of length `N`, the output array `out` must contain at least `N^2` pairs.
127+
- For an input array `x` of length `N`, the output array `out` must contain at least `N^2 * 2` elements.
128128
- If `N <= 0`, both functions return `out` unchanged.
129129

130130
</section>

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/docs/repl.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
Input array.
1818

1919
strideX: integer
20-
Stride length.
20+
Stride length for `x`.
2121

2222
out: Float64Array
2323
Output array.
2424

2525
LDO: integer
26-
Stride of the leading dimension of `out`.
26+
Stride length for the leading dimension of `out`.
2727

2828
Returns
2929
-------
@@ -69,22 +69,22 @@
6969
Input array.
7070

7171
strideX: integer
72-
Stride length.
72+
Stride length for `x`.
7373

7474
offsetX: integer
75-
Starting index.
75+
Starting index for `x`.
7676

7777
out: Float64Array
7878
Output array.
7979

8080
strideOut1: integer
81-
Stride length of the first dimension of `out`.
81+
Stride length for the first dimension of `out`.
8282

8383
strideOut2: integer
84-
Stride length of the second dimension of `out`.
84+
Stride length for the second dimension of `out`.
8585

8686
offsetOut: integer
87-
Starting index.
87+
Starting index for `out`.
8888

8989
Returns
9090
-------

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/docs/types/index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ interface Routine {
2727
*
2828
* @param N - number of indexed elements
2929
* @param x - input array
30-
* @param strideX - stride length
30+
* @param strideX - stride length for `x`
3131
* @param out - output array
32-
* @param LDO - stride of the leading dimension of `out`
32+
* @param LDO - stride length for the leading dimension of `out`
3333
* @returns output array
3434
*
3535
* @example
@@ -48,12 +48,12 @@ interface Routine {
4848
*
4949
* @param N - number of indexed elements
5050
* @param x - input array
51-
* @param strideX - stride length
52-
* @param offsetX - starting index
51+
* @param strideX - stride length for `x`
52+
* @param offsetX - starting index for `x`
5353
* @param out - output array
54-
* @param strideOut1 - stride length of the first dimension of `out`
55-
* @param strideOut2 - stride length of the second dimension of `out`
56-
* @param offsetOut - starting index
54+
* @param strideOut1 - stride length for the first dimension of `out`
55+
* @param strideOut2 - stride length for the second dimension of `out`
56+
* @param offsetOut - starting index for `out`
5757
* @returns output array
5858
*
5959
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/lib/dcartesiansquare.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ var ndarray = require( './ndarray.js' );
3131
*
3232
* @param {NonNegativeInteger} N - number of indexed elements
3333
* @param {Float64Array} x - input array
34-
* @param {integer} strideX - stride length
34+
* @param {integer} strideX - stride length for `x`
3535
* @param {Float64Array} out - output array
36-
* @param {integer} LDO - stride of the leading dimension of `out`
36+
* @param {integer} LDO - stride length for the leading dimension of `out`
3737
* @returns {Float64Array} output array
3838
*
3939
* @example
@@ -46,8 +46,11 @@ var ndarray = require( './ndarray.js' );
4646
* // out => <Float64Array>[ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ]
4747
*/
4848
function dcartesianSquare( N, x, strideX, out, LDO ) {
49-
var ox = stride2offset( N, strideX );
50-
var oo = stride2offset( N * N, LDO );
49+
var ox;
50+
var oo;
51+
52+
ox = stride2offset( N, strideX );
53+
oo = stride2offset( N * N, LDO );
5154
return ndarray( N, x, strideX, ox, out, LDO, 1, oo );
5255
}
5356

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/lib/dcartesiansquare.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ var addon = require( './../src/addon.node' );
3030
*
3131
* @param {NonNegativeInteger} N - number of indexed elements
3232
* @param {Float64Array} x - input array
33-
* @param {integer} strideX - stride length
33+
* @param {integer} strideX - stride length for `x`
3434
* @param {Float64Array} out - output array
35-
* @param {integer} LDO - stride of the leading dimension of `out`
35+
* @param {integer} LDO - stride length for the leading dimension of `out`
3636
* @returns {Float64Array} output array
3737
*
3838
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/lib/ndarray.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ var isRowMajor = require( '@stdlib/ndarray/base/assert/is-row-major' );
3030
*
3131
* @param {NonNegativeInteger} N - number of indexed elements
3232
* @param {Float64Array} x - input array
33-
* @param {integer} strideX - stride length
34-
* @param {NonNegativeInteger} offsetX - starting index
33+
* @param {integer} strideX - stride length for `x`
34+
* @param {NonNegativeInteger} offsetX - starting index for `x`
3535
* @param {Float64Array} out - output array
36-
* @param {integer} strideOut1 - stride length of the first dimension of `out`
37-
* @param {integer} strideOut2 - stride length of the second dimension of `out`
38-
* @param {NonNegativeInteger} offsetOut - starting index
36+
* @param {integer} strideOut1 - stride length for the first dimension of `out`
37+
* @param {integer} strideOut2 - stride length for the second dimension of `out`
38+
* @param {NonNegativeInteger} offsetOut - starting index for `out`
3939
* @returns {Float64Array} output array
4040
*
4141
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/lib/ndarray.native.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ var addon = require( './../src/addon.node' );
3030
*
3131
* @param {NonNegativeInteger} N - number of indexed elements
3232
* @param {Float64Array} x - input array
33-
* @param {integer} strideX - stride length
34-
* @param {NonNegativeInteger} offsetX - starting index
33+
* @param {integer} strideX - stride length for `x`
34+
* @param {NonNegativeInteger} offsetX - starting index for `x`
3535
* @param {Float64Array} out - output array
36-
* @param {integer} strideOut1 - stride length of the first dimension of `out`
37-
* @param {integer} strideOut2 - stride length of the second dimension of `out`
38-
* @param {NonNegativeInteger} offsetOut - starting index
36+
* @param {integer} strideOut1 - stride length for the first dimension of `out`
37+
* @param {integer} strideOut2 - stride length for the second dimension of `out`
38+
* @param {NonNegativeInteger} offsetOut - starting index for `out`
3939
* @returns {Float64Array} output array
4040
*
4141
* @example

lib/node_modules/@stdlib/blas/ext/base/dcartesian-square/src/main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
*
2727
* @param N number of indexed elements
2828
* @param X input array
29-
* @param strideX stride length
29+
* @param strideX stride length for X
3030
* @param Out output array
31-
* @param LDO stride of the leading dimension of Out
31+
* @param LDO stride length for the leading dimension of Out
3232
*/
3333
void API_SUFFIX(stdlib_strided_dcartesian_square)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, double *Out, const CBLAS_INT LDO ) {
3434
CBLAS_INT ox = stdlib_strided_stride2offset( N, strideX );
@@ -41,12 +41,12 @@ void API_SUFFIX(stdlib_strided_dcartesian_square)( const CBLAS_INT N, const doub
4141
*
4242
* @param N number of indexed elements
4343
* @param X input array
44-
* @param strideX stride length
45-
* @param offsetX starting index
44+
* @param strideX stride length for X
45+
* @param offsetX starting index for X
4646
* @param Out output array
47-
* @param strideOut1 stride length of the first dimension of Out
48-
* @param strideOut2 stride length of the second dimension of Out
49-
* @param offsetOut starting index
47+
* @param strideOut1 stride length for the first dimension of Out
48+
* @param strideOut2 stride length for the second dimension of Out
49+
* @param offsetOut starting index for Out
5050
*/
5151
void API_SUFFIX(stdlib_strided_dcartesian_square_ndarray)( const CBLAS_INT N, const double *X, const CBLAS_INT strideX, const CBLAS_INT offsetX, double *Out, const CBLAS_INT strideOut1, const CBLAS_INT strideOut2, const CBLAS_INT offsetOut ) {
5252
int64_t sa[ 2 ];

0 commit comments

Comments
 (0)