Skip to content

Commit ea41ad9

Browse files
committed
refactor: make base implementation cleaner
--- 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 3a90873 commit ea41ad9

File tree

1 file changed

+4
-1
lines changed
  • lib/node_modules/@stdlib/lapack/base/dgebak/lib

1 file changed

+4
-1
lines changed

lib/node_modules/@stdlib/lapack/base/dgebak/lib/base.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ var swaps = require( './swaps.js' );
6565
*/
6666
function dgebak( job, side, N, M, ilo, ihi, scale, strideScale, offsetScale, V, strideV1, strideV2, offsetV ) { // eslint-disable-line max-len, max-params
6767
var is;
68+
var iv;
6869
var i;
6970
var s;
7071

@@ -81,14 +82,16 @@ function dgebak( job, side, N, M, ilo, ihi, scale, strideScale, offsetScale, V,
8182

8283
if ( job === 'scale' || job === 'both' ) {
8384
is = offsetScale + ( ilo * strideScale );
85+
iv = offsetV + ( ilo * strideV1 );
8486
for ( i = ilo; i <= ihi; i++ ) {
8587
if ( side === 'right' ) {
8688
s = scale[ is ];
8789
} else {
8890
s = 1 / scale[ is ];
8991
}
90-
dscal( M, s, V, strideV2, offsetV + ( i * strideV1 ) );
92+
dscal( M, s, V, strideV2, iv );
9193
is += strideScale;
94+
iv += strideV1;
9295
}
9396
}
9497

0 commit comments

Comments
 (0)