diff --git a/lib/node_modules/@stdlib/stats/strided/drange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/drange/benchmark/c/benchmark.length.c index 12d0a364f02b..d371129fc7ec 100644 --- a/lib/node_modules/@stdlib/stats/strided/drange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/drange/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsemch/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsemch/benchmark/c/benchmark.length.c index 290ad863b161..0e853ae17b21 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsemch/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsemch/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsemtk/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsemtk/benchmark/c/benchmark.length.c index ac61d90c5ef5..1a480facb81e 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsemtk/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsemtk/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsemwd/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsemwd/benchmark/c/benchmark.length.c index 1e47a0852af9..89f84cd6095b 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsemwd/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsemwd/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsemyc/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsemyc/benchmark/c/benchmark.length.c index 345d9864363d..4c84cc300671 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsemyc/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsemyc/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsmean/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsmean/benchmark/c/benchmark.length.c index 09c2dd3c286b..0511f16305c6 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsmean/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsmean/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -156,6 +159,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsmeanors/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsmeanors/benchmark/c/benchmark.length.c index 7ec449607e2e..97b7359d156f 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsmeanors/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsmeanors/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsmeanpn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsmeanpn/benchmark/c/benchmark.length.c index c6ba736f1626..979705b68d03 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsmeanpn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsmeanpn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsmeanpw/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsmeanpw/benchmark/c/benchmark.length.c index 2e26df5b2b24..17a07e3430a0 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsmeanpw/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsmeanpw/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } /** diff --git a/lib/node_modules/@stdlib/stats/strided/dsmeanwd/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsmeanwd/benchmark/c/benchmark.length.c index e2108c3b439e..8dd9c49e7591 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsmeanwd/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsmeanwd/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float()*20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsnanmean/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsnanmean/benchmark/c/benchmark.length.c index 8efb47c4d58e..af0317749c98 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsnanmean/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsnanmean/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsnanmeanors/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsnanmeanors/benchmark/c/benchmark.length.c index a0ce7ef36abc..62be5a3bad1c 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsnanmeanors/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsnanmeanors/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } /** diff --git a/lib/node_modules/@stdlib/stats/strided/dsnanmeanpn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsnanmeanpn/benchmark/c/benchmark.length.c index 4070a3d205e1..889d48d0ac36 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsnanmeanpn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsnanmeanpn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsnanmeanwd/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsnanmeanwd/benchmark/c/benchmark.length.c index 4ec4d2ec31c7..d3dc9cea3b03 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsnanmeanwd/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsnanmeanwd/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -122,6 +123,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -134,11 +136,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -160,6 +163,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dstdevch/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dstdevch/benchmark/c/benchmark.length.c index 23f21c16663f..5e3e72d7f5aa 100644 --- a/lib/node_modules/@stdlib/stats/strided/dstdevch/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dstdevch/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dstdevpn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dstdevpn/benchmark/c/benchmark.length.c index 51ada24640be..da9f086505fa 100644 --- a/lib/node_modules/@stdlib/stats/strided/dstdevpn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dstdevpn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dstdevtk/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dstdevtk/benchmark/c/benchmark.length.c index 4ab79446669d..f8fbd7cba629 100644 --- a/lib/node_modules/@stdlib/stats/strided/dstdevtk/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dstdevtk/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dstdevwd/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dstdevwd/benchmark/c/benchmark.length.c index b2fb5b5a31bd..7cbd2242950d 100644 --- a/lib/node_modules/@stdlib/stats/strided/dstdevwd/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dstdevwd/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dstdevyc/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dstdevyc/benchmark/c/benchmark.length.c index faf8283ef2a4..c934cf91d8a1 100644 --- a/lib/node_modules/@stdlib/stats/strided/dstdevyc/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dstdevyc/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsvariance/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsvariance/benchmark/c/benchmark.length.c index bb67025a6528..ed6e4f6d008c 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsvariance/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsvariance/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dsvariancepn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dsvariancepn/benchmark/c/benchmark.length.c index 852e24625f66..b6313221ad49 100644 --- a/lib/node_modules/@stdlib/stats/strided/dsvariancepn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dsvariancepn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_float() * 20000.0f ) - 10000.0f; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvariance/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvariance/benchmark/c/benchmark.length.c index b86209f39a11..ef6b8b2ac4b8 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvariance/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvariance/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvariancech/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvariancech/benchmark/c/benchmark.length.c index b2344fbf476c..fafc6effec00 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvariancech/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvariancech/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvariancepn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvariancepn/benchmark/c/benchmark.length.c index 03f91bb942b0..6dc7b85fcfb7 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvariancepn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvariancepn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvariancetk/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvariancetk/benchmark/c/benchmark.length.c index dc38ed071fae..6ac8214d9a37 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvariancetk/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvariancetk/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvariancewd/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvariancewd/benchmark/c/benchmark.length.c index feed30351c92..715a10445177 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvariancewd/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvariancewd/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvarianceyc/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvarianceyc/benchmark/c/benchmark.length.c index 3e3f0d905e42..d99c45185a74 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvarianceyc/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvarianceyc/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvarm/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvarm/benchmark/c/benchmark.length.c index 5394d39b911e..ebadc20f7c03 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvarm/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvarm/benchmark/c/benchmark.length.c @@ -130,11 +130,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +153,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvarmpn/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvarmpn/benchmark/c/benchmark.length.c index 3274b3cf4283..11c317137a81 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvarmpn/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvarmpn/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dvarmtk/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dvarmtk/benchmark/c/benchmark.length.c index ff40cd12498c..7b43e37ecef7 100644 --- a/lib/node_modules/@stdlib/stats/strided/dvarmtk/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dvarmtk/benchmark/c/benchmark.length.c @@ -96,11 +96,12 @@ static double rand_double( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -118,6 +119,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -130,11 +132,12 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( rand_double() * 20000.0 ) - 10000.0; } @@ -152,6 +155,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dztest/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dztest/benchmark/c/benchmark.length.c index 30891e079abd..b56aa6ae2f38 100644 --- a/lib/node_modules/@stdlib/stats/strided/dztest/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dztest/benchmark/c/benchmark.length.c @@ -100,7 +100,7 @@ static double random_uniform( const double min, const double max ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double t; int i; @@ -115,6 +115,7 @@ static double benchmark1( int iterations, int len ) { .sd = 0.0 }; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0, 5.0 ); } @@ -131,6 +132,7 @@ static double benchmark1( int iterations, int len ) { if ( results.statistic != results.statistic ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -143,7 +145,7 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - double x[ len ]; + double *x; double t; int i; @@ -158,6 +160,7 @@ static double benchmark2( int iterations, int len ) { .sd = 0.0 }; + x = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0, 5.0 ); } @@ -174,6 +177,7 @@ static double benchmark2( int iterations, int len ) { if ( results.statistic != results.statistic ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c index 2aa390754091..700e2931b103 100644 --- a/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dztest2/benchmark/c/benchmark.length.c @@ -100,8 +100,8 @@ static double random_uniform( const double min, const double max ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - double x[ len ]; - double y[ len ]; + double *x; + double *y; double t; int i; @@ -117,6 +117,8 @@ static double benchmark1( int iterations, int len ) { .ymean = 0.0 }; + x = (double *) malloc( len * sizeof( double ) ); + y = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0, 5.0 ); y[ i ] = random_uniform( -5.0, 5.0 ); @@ -134,6 +136,8 @@ static double benchmark1( int iterations, int len ) { if ( results.statistic != results.statistic ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -146,8 +150,8 @@ 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 t; int i; @@ -163,6 +167,8 @@ static double benchmark2( int iterations, int len ) { .ymean = 0.0 }; + x = (double *) malloc( len * sizeof( double ) ); + y = (double *) malloc( len * sizeof( double ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0, 5.0 ); y[ i ] = random_uniform( -5.0, 5.0 ); @@ -180,6 +186,8 @@ static double benchmark2( int iterations, int len ) { if ( results.statistic != results.statistic ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; }