diff --git a/lib/node_modules/@stdlib/blas/base/dsyr2/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/blas/base/dsyr2/benchmark/c/benchmark.c index 7605a9f065f7..9460d16af8db 100644 --- a/lib/node_modules/@stdlib/blas/base/dsyr2/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/blas/base/dsyr2/benchmark/c/benchmark.c @@ -88,12 +88,15 @@ static double tic( void ) { */ static double benchmark1( int iterations, int N ) { double elapsed; - double A[ N*N ]; - double x[ N ]; - double y[ N ]; + double *A; + double *x; + double *y; double t; int i; + x = (double *)malloc( N * sizeof( double ) ); + y = (double *)malloc( N * sizeof( double ) ); + A = (double *)malloc( N * N * sizeof( double ) ); stdlib_strided_dfill( N, 1.0, x, 1 ); stdlib_strided_dfill( N, 1.0, y, 1 ); stdlib_strided_dfill( N*N, 1.0, A, 1 ); @@ -109,6 +112,9 @@ 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( y ); + free( A ); return elapsed; } @@ -121,12 +127,15 @@ static double benchmark1( int iterations, int N ) { */ static double benchmark2( int iterations, int N ) { double elapsed; - double A[ N*N ]; - double x[ N ]; - double y[ N ]; + double *A; + double *x; + double *y; double t; int i; + x = (double *)malloc( N * sizeof( double ) ); + y = (double *)malloc( N * sizeof( double ) ); + A = (double *)malloc( N * N * sizeof( double ) ); stdlib_strided_dfill( N, 1.0, x, 1 ); stdlib_strided_dfill( N, 1.0, y, 1 ); stdlib_strided_dfill( N*N, 1.0, A, 1 ); @@ -142,6 +151,9 @@ 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( y ); + free( A ); return elapsed; }