Skip to content

Commit 85f32fa

Browse files
Shabareesh ShettyShabareesh Shetty
authored andcommitted
bench: change len to N
--- 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 774d814 commit 85f32fa

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ var options = {
4444
* Creates a benchmark function.
4545
*
4646
* @private
47-
* @param {PositiveInteger} len - array length
47+
* @param {PositiveInteger} N - array length
4848
* @returns {Function} benchmark function
4949
*/
50-
function createBenchmark( len ) {
50+
function createBenchmark( N ) {
5151
var viewY;
5252
var alpha;
5353
var x;
5454
var y;
5555

56-
x = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
y = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
56+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
57+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
5858

5959
viewY = reinterpret( y, 0 );
6060

@@ -74,12 +74,12 @@ function createBenchmark( len ) {
7474
b.tic();
7575
for ( i = 0; i < b.iterations; i++ ) {
7676
zaxpy( x.length, alpha, x, 1, y, 1 );
77-
if ( isnan( viewY[ i%(len*2) ] ) ) {
77+
if ( isnan( viewY[ i%(N*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}
8080
}
8181
b.toc();
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
b.pass( 'benchmark finished' );
@@ -96,19 +96,19 @@ function createBenchmark( len ) {
9696
* @private
9797
*/
9898
function main() {
99-
var len;
10099
var min;
101100
var max;
101+
var N;
102102
var f;
103103
var i;
104104

105105
min = 1; // 10^min
106106
max = 6; // 10^max
107107

108108
for ( i = min; i <= max; i++ ) {
109-
len = pow( 10, i );
110-
f = createBenchmark( len );
111-
bench( pkg+':len='+len, f );
109+
N = pow( 10, i );
110+
f = createBenchmark( N );
111+
bench( pkg+':size='+N, f );
112112
}
113113
}
114114

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ var options = {
4444
* Creates a benchmark function.
4545
*
4646
* @private
47-
* @param {PositiveInteger} len - array length
47+
* @param {PositiveInteger} N - array length
4848
* @returns {Function} benchmark function
4949
*/
50-
function createBenchmark( len ) {
50+
function createBenchmark( N ) {
5151
var viewY;
5252
var alpha;
5353
var x;
5454
var y;
5555

56-
x = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
57-
y = new Complex128Array( uniform( len*2, -100.0, 100.0, options ) );
56+
x = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
57+
y = new Complex128Array( uniform( N*2, -100.0, 100.0, options ) );
5858

5959
viewY = reinterpret( y, 0 );
6060

@@ -74,12 +74,12 @@ function createBenchmark( len ) {
7474
b.tic();
7575
for ( i = 0; i < b.iterations; i++ ) {
7676
zaxpy( x.length, alpha, x, 1, 0, y, 1, 0 );
77-
if ( isnan( viewY[ i%(len*2) ] ) ) {
77+
if ( isnan( viewY[ i%(N*2) ] ) ) {
7878
b.fail( 'should not return NaN' );
7979
}
8080
}
8181
b.toc();
82-
if ( isnan( viewY[ i%(len*2) ] ) ) {
82+
if ( isnan( viewY[ i%(N*2) ] ) ) {
8383
b.fail( 'should not return NaN' );
8484
}
8585
b.pass( 'benchmark finished' );
@@ -96,19 +96,19 @@ function createBenchmark( len ) {
9696
* @private
9797
*/
9898
function main() {
99-
var len;
10099
var min;
101100
var max;
101+
var N;
102102
var f;
103103
var i;
104104

105105
min = 1; // 10^min
106106
max = 6; // 10^max
107107

108108
for ( i = min; i <= max; i++ ) {
109-
len = pow( 10, i );
110-
f = createBenchmark( len );
111-
bench( pkg+':ndarray:len='+len, f );
109+
N = pow( 10, i );
110+
f = createBenchmark( N );
111+
bench( pkg+':ndarray:size='+N, f );
112112
}
113113
}
114114

0 commit comments

Comments
 (0)