diff --git a/lib/node_modules/@stdlib/blas/ext/base/cfill/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/cfill/benchmark/c/benchmark.length.c index 12943c8d38a9..bd563aaae635 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/cfill/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/cfill/benchmark/c/benchmark.length.c @@ -97,11 +97,13 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { stdlib_complex64_t alpha; - float x[ len*2 ]; + float *x; double elapsed; double t; int i; + x = (float *) malloc( len * 2 * sizeof(float) ); + alpha = stdlib_complex64( 1.0f, 0.0f ); for ( i = 0; i < len*2; i += 2 ) { x[ i ] = ( rand_float()*2.0f ) - 1.0f; @@ -120,6 +122,8 @@ static double benchmark1( int iterations, int len ) { if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } + + free( x ); return elapsed; } @@ -132,11 +136,11 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { stdlib_complex64_t alpha; - float x[ len*2 ]; + float *x; double elapsed; double t; int i; - + x = (float *) malloc( len * 2 * sizeof(float) ); alpha = stdlib_complex64( 1.0f, 0.0f ); for ( i = 0; i < len*2; i += 2 ) { x[ i ] = ( rand_float()*2.0f ) - 1.0f; @@ -155,6 +159,8 @@ static double benchmark2( int iterations, int len ) { if ( x[ 0 ] != x[ 0 ] ) { printf( "should not return NaN\n" ); } + + free( x ); return elapsed; }