diff --git a/lib/node_modules/@stdlib/blas/base/srot/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/base/srot/benchmark/c/benchmark.length.c index dd2f0ca8b3ba..c15fd7dd6c0a 100644 --- a/lib/node_modules/@stdlib/blas/base/srot/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/base/srot/benchmark/c/benchmark.length.c @@ -96,11 +96,13 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; - float y[ len ]; + float *x; + float *y; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); + y = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*200.0f ) - 100.0f; y[ i ] = ( rand_float()*200.0f ) - 100.0f; @@ -117,6 +119,8 @@ static double benchmark1( int iterations, int len ) { if ( y[ 0 ] != y[ 0 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -129,11 +133,13 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; - float y[ len ]; + float *x; + float *y; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); + y = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*200.0f ) - 100.0f; y[ i ] = ( rand_float()*200.0f ) - 100.0f; @@ -150,6 +156,8 @@ static double benchmark2( int iterations, int len ) { if ( y[ 0 ] != y[ 0 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; }