diff --git a/lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.c index 08a08b53a12f..f4e4ec1cd62f 100644 --- a/lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/blas/base/ssyr/benchmark/c/benchmark.c @@ -88,11 +88,13 @@ static double tic( void ) { */ static double benchmark1( int iterations, int N ) { double elapsed; - float A[ N*N ]; - float x[ N ]; + float *A; + float *x; double t; int i; + x = (float *)malloc( N * sizeof( float ) ); + A = (float *)malloc( N * N * sizeof( float ) ); stdlib_strided_sfill( N, 1.0f, x, 1 ); stdlib_strided_sfill( N*N, 1.0f, A, 1 ); t = tic(); @@ -107,6 +109,8 @@ static double benchmark1( int iterations, int N ) { if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( A ); return elapsed; } @@ -119,11 +123,13 @@ static double benchmark1( int iterations, int N ) { */ static double benchmark2( int iterations, int N ) { double elapsed; - float A[ N*N ]; - float x[ N ]; + float *A; + float *x; double t; int i; + x = (float *)malloc( N * sizeof( float ) ); + A = (float *)malloc( N * N * sizeof( float ) ); stdlib_strided_sfill( N, 1.0f, x, 1 ); stdlib_strided_sfill( N*N, 1.0f, A, 1 ); t = tic(); @@ -138,6 +144,8 @@ static double benchmark2( int iterations, int N ) { if ( A[ i%(N*2) ] != A[ i%(N*2) ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( A ); return elapsed; }