Skip to content

Commit 986f148

Browse files
committed
fix: offset increment calc
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - 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: na - 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 ---
1 parent 5695176 commit 986f148

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/node_modules/@stdlib/ndarray/base/unary-reduce-subarray/lib/3d_blocked.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ function blockedunary3d( fcn, arrays, views, strides, opts ) {
185185
s1 = bsize;
186186
j1 -= bsize;
187187
}
188-
// Compute index offsets and loop offset increments for the first ndarray elements in the current block...
189188
for ( k = 0; k < N; k++ ) {
190189
ov1[ k ] = ov2[k] + ( j1*sv[k][1] );
191-
dv1[ k ] = sv[k][1] - ( s1*sv[k][0] );
190+
dv2[ k ] = sv[k][2] - ( s1*sv[k][1] );
192191
}
193192
for ( j0 = sh[0]; j0 > 0; ) {
194193
if ( j0 < bsize ) {
@@ -201,7 +200,7 @@ function blockedunary3d( fcn, arrays, views, strides, opts ) {
201200
// Compute index offsets and loop offset increments for the first ndarray elements in the current block...
202201
for ( k = 0; k < N; k++ ) {
203202
iv[ k ] = ov1[k] + ( j0*sv[k][0] );
204-
dv2[ k ] = sv[k][2] - ( s0*sv[k][0] );
203+
dv1[ k ] = sv[k][1] - ( s0*sv[k][0] );
205204
}
206205
// Iterate over the non-reduced ndarray dimensions...
207206
for ( i2 = 0; i2 < s2; i2++ ) {

lib/node_modules/@stdlib/ndarray/base/unary-reduce-subarray/lib/3d_blocked_accessors.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,9 @@ function blockedunary3d( fcn, arrays, views, strides, opts ) {
193193
s1 = bsize;
194194
j1 -= bsize;
195195
}
196-
// Compute index offsets and loop offset increments for the first ndarray elements in the current block...
197196
for ( k = 0; k < N; k++ ) {
198197
ov1[ k ] = ov2[k] + ( j1*sv[k][1] );
199-
dv1[ k ] = sv[k][1] - ( s1*sv[k][0] );
198+
dv2[ k ] = sv[k][2] - ( s1*sv[k][1] );
200199
}
201200
for ( j0 = sh[0]; j0 > 0; ) {
202201
if ( j0 < bsize ) {
@@ -209,7 +208,7 @@ function blockedunary3d( fcn, arrays, views, strides, opts ) {
209208
// Compute index offsets and loop offset increments for the first ndarray elements in the current block...
210209
for ( k = 0; k < N; k++ ) {
211210
iv[ k ] = ov1[k] + ( j0*sv[k][0] );
212-
dv2[ k ] = sv[k][2] - ( s0*sv[k][0] );
211+
dv1[ k ] = sv[k][1] - ( s0*sv[k][0] );
213212
}
214213
// Iterate over the non-reduced ndarray dimensions...
215214
for ( i2 = 0; i2 < s2; i2++ ) {

0 commit comments

Comments
 (0)