Skip to content

Commit 52b14da

Browse files
committed
refactor: use alias to reduce visual noise
--- 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 950141e commit 52b14da

File tree

1 file changed

+12
-10
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/lib

1 file changed

+12
-10
lines changed

lib/node_modules/@stdlib/blas/ext/base/dnannsumkbn/lib/ndarray.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,28 @@ function dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
5959
var sum;
6060
var flg;
6161
var ix;
62+
var io;
6263
var v;
6364
var t;
6465
var c;
6566
var n;
6667
var i;
6768

69+
io = offsetOut;
6870
if ( N <= 0 ) {
69-
out[ offsetOut ] = 0.0;
70-
out[ offsetOut+strideOut ] = 0;
71+
out[ io ] = 0.0;
72+
out[ io+strideOut ] = 0;
7173
return out;
7274
}
7375
ix = offsetX;
7476
if ( strideX === 0 ) {
7577
if ( isnan( x[ ix ] ) ) {
76-
out[ offsetOut ] = 0.0;
77-
out[ offsetOut+strideOut ] = 0;
78+
out[ io ] = 0.0;
79+
out[ io+strideOut ] = 0;
7880
return out;
7981
}
80-
out[ offsetOut ] = x[ ix ] * N;
81-
out[ offsetOut+strideOut ] = N;
82+
out[ io ] = x[ ix ] * N;
83+
out[ io+strideOut ] = N;
8284
return out;
8385
}
8486
// Find the first non-NaN element...
@@ -90,8 +92,8 @@ function dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
9092
ix += strideX;
9193
}
9294
if ( i === N ) {
93-
out[ offsetOut ] = 0.0;
94-
out[ offsetOut+strideOut ] = 0;
95+
out[ io ] = 0.0;
96+
out[ io+strideOut ] = 0;
9597
return out;
9698
}
9799
n = 1;
@@ -131,8 +133,8 @@ function dnannsumkbn( N, x, strideX, offsetX, out, strideOut, offsetOut ) {
131133
}
132134
ix += strideX;
133135
}
134-
out[ offsetOut ] = ( flg ) ? sum+c : sum;
135-
out[ offsetOut+strideOut ] = n;
136+
out[ io ] = ( flg ) ? sum+c : sum;
137+
out[ io+strideOut ] = n;
136138
return out;
137139
}
138140

0 commit comments

Comments
 (0)