Skip to content

Commit f61525e

Browse files
committed
bench: update benchmark failing condition
--- 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 0a8a2b2 commit f61525e

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

lib/node_modules/@stdlib/lapack/base/dgttrf/benchmark/benchmark.js

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

2323
var bench = require( '@stdlib/bench' );
2424
var uniform = require( '@stdlib/random/array/uniform' );
25-
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2625
var pow = require( '@stdlib/math/base/special/pow' );
2726
var Int32Array = require( '@stdlib/array/int32' );
2827
var Float64Array = require( '@stdlib/array/float64' );
@@ -61,13 +60,13 @@ function createBenchmark( len ) {
6160
b.tic();
6261
for ( i = 0; i < b.iterations; i++ ) {
6362
d = dgttrf( len, DL, D, DU, DU2, IPIV );
64-
if ( isnan( d ) ) {
65-
b.fail( 'should not return NaN' );
63+
if ( d < 0 ) {
64+
b.fail( 'should return a success status code' );
6665
}
6766
}
6867
b.toc();
69-
if ( isnan( d ) ) {
70-
b.fail( 'should not return NaN' );
68+
if ( d < 0 ) {
69+
b.fail( 'should return a success status code' );
7170
}
7271
b.pass( 'benchmark finished' );
7372
b.end();

lib/node_modules/@stdlib/lapack/base/dgttrf/benchmark/benchmark.ndarray.js

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

2323
var bench = require( '@stdlib/bench' );
2424
var uniform = require( '@stdlib/random/array/uniform' );
25-
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2625
var pow = require( '@stdlib/math/base/special/pow' );
2726
var Int32Array = require( '@stdlib/array/int32' );
2827
var Float64Array = require( '@stdlib/array/float64' );
@@ -61,13 +60,13 @@ function createBenchmark( len ) {
6160
b.tic();
6261
for ( i = 0; i < b.iterations; i++ ) {
6362
d = dgttrf( len, DL, 1, 0, D, 1, 0, DU, 1, 0, DU2, 1, 0, IPIV, 1, 0 ); // eslint-disable-line max-len
64-
if ( isnan( d ) ) {
65-
b.fail( 'should not return NaN' );
63+
if ( d < 0 ) {
64+
b.fail( 'should return a success status code' );
6665
}
6766
}
6867
b.toc();
69-
if ( isnan( d ) ) {
70-
b.fail( 'should not return NaN' );
68+
if ( d < 0 ) {
69+
b.fail( 'should return a success status code' );
7170
}
7271
b.pass( 'benchmark finished' );
7372
b.end();

0 commit comments

Comments
 (0)