Skip to content

Commit 847dd6f

Browse files
authored
refactor: rename variable in blas/base/sdsdot
PR-URL: #7208 Reviewed-by: Athan Reines <[email protected]>
1 parent c3a2ca6 commit 847dd6f

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

lib/node_modules/@stdlib/blas/base/sdsdot/lib/ndarray.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
23+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2424

2525

2626
// VARIABLES //
@@ -61,7 +61,7 @@ function sdsdot( N, scalar, x, strideX, offsetX, y, strideY, offsetY ) {
6161

6262
dot = scalar;
6363
if ( N <= 0 ) {
64-
return float64ToFloat32( dot );
64+
return f32( dot );
6565
}
6666
ix = offsetX;
6767
iy = offsetY;
@@ -79,21 +79,21 @@ function sdsdot( N, scalar, x, strideX, offsetX, y, strideY, offsetY ) {
7979
}
8080
}
8181
if ( N < M ) {
82-
return float64ToFloat32( dot );
82+
return f32( dot );
8383
}
8484
for ( i = m; i < N; i += M ) {
8585
dot += ( x[ix]*y[iy] ) + ( x[ix+1]*y[iy+1] ) + ( x[ix+2]*y[iy+2] ) + ( x[ix+3]*y[iy+3] ) + ( x[ix+4]*y[iy+4] ); // eslint-disable-line max-len
8686
ix += M;
8787
iy += M;
8888
}
89-
return float64ToFloat32( dot );
89+
return f32( dot );
9090
}
9191
for ( i = 0; i < N; i++ ) {
9292
dot += x[ ix ] * y[ iy ];
9393
ix += strideX;
9494
iy += strideY;
9595
}
96-
return float64ToFloat32( dot );
96+
return f32( dot );
9797
}
9898

9999

lib/node_modules/@stdlib/blas/base/sdsdot/lib/sdsdot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// MODULES //
2222

23-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
23+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2424
var stride2offset = require( '@stdlib/strided/base/stride2offset' );
2525
var ndarray = require( './ndarray.js' );
2626

@@ -51,7 +51,7 @@ function sdsdot( N, scalar, x, strideX, y, strideY ) {
5151
var ix;
5252
var iy;
5353
if ( N <= 0 ) {
54-
return float64ToFloat32( scalar );
54+
return f32( scalar );
5555
}
5656
ix = stride2offset( N, strideX );
5757
iy = stride2offset( N, strideY );

lib/node_modules/@stdlib/blas/base/sdsdot/test/test.ndarray.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
24+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2525
var Float32Array = require( '@stdlib/array/float32' );
2626
var sdsdot = require( './../lib/ndarray.js' );
2727

@@ -73,11 +73,11 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
7373
dot = sdsdot( -4, 0.0, x, 1, 0, y, 1, 0 );
7474
t.strictEqual( dot, 0.0, 'returns expected value' );
7575

76-
dot = sdsdot( 0, float64ToFloat32( 3.14 ), x, 1, 0, y, 1, 0 );
77-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
76+
dot = sdsdot( 0, f32( 3.14 ), x, 1, 0, y, 1, 0 );
77+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
7878

79-
dot = sdsdot( -4, float64ToFloat32( 3.14 ), x, 1, 0, y, 1, 0 );
80-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
79+
dot = sdsdot( -4, f32( 3.14 ), x, 1, 0, y, 1, 0 );
80+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
8181
t.end();
8282
});
8383

lib/node_modules/@stdlib/blas/base/sdsdot/test/test.ndarray.native.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
25+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2626
var Float32Array = require( '@stdlib/array/float32' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
2828

@@ -82,11 +82,11 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
8282
dot = sdsdot( -4, 0.0, x, 1, 0, y, 1, 0 );
8383
t.strictEqual( dot, 0.0, 'returns expected value' );
8484

85-
dot = sdsdot( 0, float64ToFloat32( 3.14 ), x, 1, 0, y, 1, 0 );
86-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
85+
dot = sdsdot( 0, f32( 3.14 ), x, 1, 0, y, 1, 0 );
86+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
8787

88-
dot = sdsdot( -4, float64ToFloat32( 3.14 ), x, 1, 0, y, 1, 0 );
89-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
88+
dot = sdsdot( -4, f32( 3.14 ), x, 1, 0, y, 1, 0 );
89+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
9090
t.end();
9191
});
9292

lib/node_modules/@stdlib/blas/base/sdsdot/test/test.sdsdot.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var tape = require( 'tape' );
24-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
24+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2525
var Float32Array = require( '@stdlib/array/float32' );
2626
var sdsdot = require( './../lib/sdsdot.js' );
2727

@@ -73,11 +73,11 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
7373
dot = sdsdot( -4, 0.0, x, 1, y, 1 );
7474
t.strictEqual( dot, 0.0, 'returns expected value' );
7575

76-
dot = sdsdot( 0, float64ToFloat32( 3.14 ), x, 1, y, 1 );
77-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
76+
dot = sdsdot( 0, f32( 3.14 ), x, 1, y, 1 );
77+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
7878

79-
dot = sdsdot( -4, float64ToFloat32( 3.14 ), x, 1, y, 1 );
80-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
79+
dot = sdsdot( -4, f32( 3.14 ), x, 1, y, 1 );
80+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
8181
t.end();
8282
});
8383

lib/node_modules/@stdlib/blas/base/sdsdot/test/test.sdsdot.native.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
25+
var f32 = require( '@stdlib/number/float64/base/to-float32' );
2626
var Float32Array = require( '@stdlib/array/float32' );
2727
var tryRequire = require( '@stdlib/utils/try-require' );
2828

@@ -82,11 +82,11 @@ tape( 'if provided an `N` parameter less than or equal to `0`, the function retu
8282
dot = sdsdot( -4, 0.0, x, 1, y, 1 );
8383
t.strictEqual( dot, 0.0, 'returns expected value' );
8484

85-
dot = sdsdot( 0, float64ToFloat32( 3.14 ), x, 1, y, 1 );
86-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
85+
dot = sdsdot( 0, f32( 3.14 ), x, 1, y, 1 );
86+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
8787

88-
dot = sdsdot( -4, float64ToFloat32( 3.14 ), x, 1, y, 1 );
89-
t.strictEqual( dot, float64ToFloat32( 3.14 ), 'returns expected value' );
88+
dot = sdsdot( -4, f32( 3.14 ), x, 1, y, 1 );
89+
t.strictEqual( dot, f32( 3.14 ), 'returns expected value' );
9090
t.end();
9191
});
9292

0 commit comments

Comments
 (0)