Skip to content

Commit da3e562

Browse files
committed
fix: bug fix
--- 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent b21300a commit da3e562

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

lib/node_modules/@stdlib/blas/ext/base/gcusumkbn/lib/accessors.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ var abs = require( '@stdlib/math/base/special/abs' );
6363
function gcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {
6464
var xbuf;
6565
var ybuf;
66-
var get;
67-
var set;
66+
var xget;
67+
var yset;
6868
var ix;
6969
var iy;
7070
var s;
@@ -78,23 +78,23 @@ function gcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {
7878
ybuf = y.data;
7979

8080
// Cache reference to the element accessors:
81-
get = x.accessors[ 0 ];
82-
set = x.accessors[ 1 ];
81+
xget = x.accessors[ 0 ];
82+
yset = y.accessors[ 1 ];
8383

8484
ix = offsetX;
8585
iy = offsetY;
8686
s = sum;
8787
c = 0.0;
8888
for ( i = 0; i < N; i++ ) {
89-
v = get( xbuf, ix );
89+
v = xget( xbuf, ix );
9090
t = s + v;
9191
if ( abs( s ) >= abs( v ) ) {
9292
c += (s-t) + v;
9393
} else {
9494
c += (v-t) + s;
9595
}
9696
s = t;
97-
set( ybuf, iy, s + c );
97+
yset( ybuf, iy, s + c );
9898
ix += strideX;
9999
iy += strideY;
100100
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,21 @@ var accessors = require( './accessors.js' );
5858
function gcusumkbn( N, sum, x, strideX, offsetX, y, strideY, offsetY ) {
5959
var ix;
6060
var iy;
61+
var ox;
62+
var oy;
6163
var s;
6264
var v;
6365
var t;
6466
var c;
65-
var o;
6667
var i;
6768

6869
if ( N <= 0 ) {
6970
return y;
7071
}
71-
o = arraylike2object( x );
72-
if ( o.accessorProtocol ) {
73-
return accessors( N, sum, x, strideX, offsetX, y, strideY, offsetY );
72+
ox = arraylike2object( x );
73+
oy = arraylike2object( y );
74+
if ( ox.accessorProtocol && oy.accessorProtocol ) {
75+
return accessors( N, sum, ox, strideX, offsetX, oy, strideY, offsetY );
7476
}
7577
ix = offsetX;
7678
iy = offsetY;

0 commit comments

Comments
 (0)