diff --git a/lib/node_modules/@stdlib/blas/base/ddot/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/ddot/benchmark/c/benchmark.length.c index 49675328c1da..d18ec346a9fb 100644 --- a/lib/node_modules/@stdlib/blas/base/ddot/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/base/ddot/benchmark/c/benchmark.length.c @@ -96,12 +96,14 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; - double y[ len ]; + double *x; + double *y; double z; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); + y = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double()*20000.0 ) - 10000.0; y[ i ] = ( rand_double()*20000.0 ) - 10000.0; @@ -119,6 +121,8 @@ static double benchmark1( int iterations, int len ) { if ( z != z ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -131,12 +135,14 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; - double y[ len ]; + double *x; + double *y; double z; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); + y = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double()*20000.0 ) - 10000.0; y[ i ] = ( rand_double()*20000.0 ) - 10000.0; @@ -154,6 +160,8 @@ static double benchmark2( int iterations, int len ) { if ( z != z ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; }