From 2da6136b136bda8aa790a60e0fabf624984eab75 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Thu, 15 Aug 2024 14:59:41 -0700 Subject: [PATCH] bench: rename variable --- .../@stdlib/blas/base/sspr/benchmark/benchmark.js | 10 +++++----- .../blas/base/sspr/benchmark/benchmark.ndarray.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.js b/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.js index de0580c319b..1a26422d87e 100644 --- a/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.js @@ -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; /** @@ -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' ); } diff --git a/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.ndarray.js b/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.ndarray.js index 529a54c2c46..2d7a06710eb 100644 --- a/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.ndarray.js +++ b/lib/node_modules/@stdlib/blas/base/sspr/benchmark/benchmark.ndarray.js @@ -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; /** @@ -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' ); }