Skip to content

Commit 844115d

Browse files
Shabareesh ShettyShabareesh Shetty
authored andcommitted
bench: update variable naming
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - 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 d9de2f2 commit 844115d

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

lib/node_modules/@stdlib/blas/base/zher2/benchmark/benchmark.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ var options = {
4343
* Creates a benchmark function.
4444
*
4545
* @private
46-
* @param {PositiveInteger} len - array length
46+
* @param {PositiveInteger} N - array dimension size
4747
* @returns {Function} benchmark function
4848
*/
49-
function createBenchmark( len ) {
49+
function createBenchmark( N ) {
5050
var alpha;
5151
var xbuf;
5252
var ybuf;
@@ -55,11 +55,11 @@ function createBenchmark( len ) {
5555
var y;
5656
var A;
5757

58-
xbuf = uniform( len*2, -100.0, 100.0, options );
58+
xbuf = uniform( N*2, -100.0, 100.0, options );
5959
x = new Complex128Array( xbuf.buffer );
60-
ybuf = uniform( len*2, -100.0, 100.0, options );
60+
ybuf = uniform( N*2, -100.0, 100.0, options );
6161
y = new Complex128Array( ybuf.buffer );
62-
Abuf = uniform( (len*len)*2, -100.0, 100.0, options );
62+
Abuf = uniform( (N*N)*2, -100.0, 100.0, options );
6363
A = new Complex128Array( Abuf.buffer );
6464

6565
alpha = new Complex128( 1.0, 0.0 );
@@ -77,13 +77,13 @@ function createBenchmark( len ) {
7777

7878
b.tic();
7979
for ( i = 0; i < b.iterations; i++ ) {
80-
zher2( 'row-major', 'lower', len, alpha, x, 1, y, 1, A, len );
81-
if ( isnan( Abuf[ i%(len*2) ] ) ) {
80+
zher2( 'row-major', 'lower', N, alpha, x, 1, y, 1, A, N );
81+
if ( isnan( Abuf[ i%(N*2) ] ) ) {
8282
b.fail( 'should not return NaN' );
8383
}
8484
}
8585
b.toc();
86-
if ( isnan( Abuf[ i%(len*2) ] ) ) {
86+
if ( isnan( Abuf[ i%(N*2) ] ) ) {
8787
b.fail( 'should not return NaN' );
8888
}
8989
b.pass( 'benchmark finished' );
@@ -100,19 +100,19 @@ function createBenchmark( len ) {
100100
* @private
101101
*/
102102
function main() {
103-
var len;
104103
var min;
105104
var max;
105+
var N;
106106
var f;
107107
var i;
108108

109109
min = 1; // 10^min
110110
max = 4; // 10^max
111111

112112
for ( i = min; i <= max; i++ ) {
113-
len = pow( 10, i );
114-
f = createBenchmark( len );
115-
bench( pkg+':len='+len, f );
113+
N = pow( 10, i );
114+
f = createBenchmark( N );
115+
bench( pkg+':size='+N, f );
116116
}
117117
}
118118

lib/node_modules/@stdlib/blas/base/zher2/benchmark/benchmark.ndarray.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ var options = {
4343
* Creates a benchmark function.
4444
*
4545
* @private
46-
* @param {PositiveInteger} len - array length
46+
* @param {PositiveInteger} N - array dimension size
4747
* @returns {Function} benchmark function
4848
*/
49-
function createBenchmark( len ) {
49+
function createBenchmark( N ) {
5050
var alpha;
5151
var xbuf;
5252
var ybuf;
@@ -55,11 +55,11 @@ function createBenchmark( len ) {
5555
var y;
5656
var A;
5757

58-
xbuf = uniform( len*2, -100.0, 100.0, options );
58+
xbuf = uniform( N*2, -100.0, 100.0, options );
5959
x = new Complex128Array( xbuf.buffer );
60-
ybuf = uniform( len*2, -100.0, 100.0, options );
60+
ybuf = uniform( N*2, -100.0, 100.0, options );
6161
y = new Complex128Array( ybuf.buffer );
62-
Abuf = uniform( (len*len)*2, -100.0, 100.0, options );
62+
Abuf = uniform( (N*N)*2, -100.0, 100.0, options );
6363
A = new Complex128Array( Abuf.buffer );
6464

6565
alpha = new Complex128( 1.0, 0.0 );
@@ -77,13 +77,13 @@ function createBenchmark( len ) {
7777

7878
b.tic();
7979
for ( i = 0; i < b.iterations; i++ ) {
80-
zher2( 'lower', len, alpha, x, 1, 0, y, 1, 0, A, len, 1, 0 );
81-
if ( isnan( Abuf[ i%(len*2) ] ) ) {
80+
zher2( 'lower', N, alpha, x, 1, 0, y, 1, 0, A, N, 1, 0 );
81+
if ( isnan( Abuf[ i%(N*2) ] ) ) {
8282
b.fail( 'should not return NaN' );
8383
}
8484
}
8585
b.toc();
86-
if ( isnan( Abuf[ i%(len*2) ] ) ) {
86+
if ( isnan( Abuf[ i%(N*2) ] ) ) {
8787
b.fail( 'should not return NaN' );
8888
}
8989
b.pass( 'benchmark finished' );
@@ -100,19 +100,19 @@ function createBenchmark( len ) {
100100
* @private
101101
*/
102102
function main() {
103-
var len;
104103
var min;
105104
var max;
105+
var N;
106106
var f;
107107
var i;
108108

109109
min = 1; // 10^min
110110
max = 4; // 10^max
111111

112112
for ( i = min; i <= max; i++ ) {
113-
len = pow( 10, i );
114-
f = createBenchmark( len );
115-
bench( pkg+':ndarray:len='+len, f );
113+
N = pow( 10, i );
114+
f = createBenchmark( N );
115+
bench( pkg+':ndarray:size='+N, f );
116116
}
117117
}
118118

0 commit comments

Comments
 (0)