Skip to content

Commit b57a608

Browse files
committed
fix: fixing c benchmark
1 parent 22fbadb commit b57a608

File tree

1 file changed

+2
-4
lines changed
  • lib/node_modules/@stdlib/math/base/special/minmaxn/benchmark/c/native

1 file changed

+2
-4
lines changed

lib/node_modules/@stdlib/math/base/special/minmaxn/benchmark/c/native/benchmark.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ static double benchmark( void ) {
9393
double elapsed;
9494
double x1[ 100 ];
9595
double x2[ 100 ];
96-
double args[ 2 ];
9796
double out[ 2 ];
9897
double t;
9998
int i;
@@ -105,9 +104,8 @@ static double benchmark( void ) {
105104

106105
t = tic();
107106
for ( i = 0; i < ITERATIONS; i++ ) {
108-
args[ 0 ] = x1[ i % 100 ];
109-
args[ 1 ] = x2[ i % 100 ];
110-
stdlib_base_minmaxn( args, out, 2 );
107+
const double args[ 2 ] = { x1[ i % 100 ], x2[ i % 100 ]};
108+
stdlib_base_minmaxn( out, args, 2 );
111109
if ( out[ 0 ] != out[ 0 ] || out[ 1 ] != out[ 1 ] ) {
112110
printf( "should not return NaN\n" );
113111
break;

0 commit comments

Comments
 (0)