Skip to content

Commit

Permalink
bench: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Aug 15, 2024
1 parent 764ef16 commit 2da6136
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ var options = {
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @param {PositiveInteger} N - number of elements along each dimension
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var AP = uniform( len * ( len + 1 ) / 2, -10.0, 10.0, options );
var x = uniform( len, -10.0, 10.0, options );
function createBenchmark( N ) {
var AP = uniform( N * ( N + 1 ) / 2, -10.0, 10.0, options );
var x = uniform( N, -10.0, 10.0, options );
return benchmark;

/**
Expand All @@ -62,7 +62,7 @@ function createBenchmark( len ) {

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
z = sspr( 'row-major', 'upper', len, 1.0, x, 1, AP );
z = sspr( 'row-major', 'upper', N, 1.0, x, 1, AP );
if ( isnanf( z[ i%z.length ] ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ var options = {
* Creates a benchmark function.
*
* @private
* @param {PositiveInteger} len - array length
* @param {PositiveInteger} N - number of elements along each dimension
* @returns {Function} benchmark function
*/
function createBenchmark( len ) {
var AP = uniform( len * ( len + 1 ) / 2, -10.0, 10.0, options );
var x = uniform( len, -10.0, 10.0, options );
function createBenchmark( N ) {
var AP = uniform( N * ( N + 1 ) / 2, -10.0, 10.0, options );
var x = uniform( N, -10.0, 10.0, options );
return benchmark;

/**
Expand All @@ -62,7 +62,7 @@ function createBenchmark( len ) {

b.tic();
for ( i = 0; i < b.iterations; i++ ) {
z = sspr( 'row-major', 'upper', len, 1.0, x, 1, 0, AP, 1, 0 );
z = sspr( 'row-major', 'upper', N, 1.0, x, 1, 0, AP, 1, 0 );
if ( isnanf( z[ i%z.length ] ) ) {
b.fail( 'should not return NaN' );
}
Expand Down

0 comments on commit 2da6136

Please sign in to comment.