diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dnansum/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dnansum/src/addon.c index d01905481d67..7b558d72490b 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dnansum/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dnansum/src/addon.c @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) { assert( status == napi_ok ); return NULL; } + // Create a const-qualified view of the argument pointer list: + const struct ndarray *arr[ 1 ] = { + arrays[ 0 ] + }; // Perform computation: - STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_blas_ext_dnansum( arrays ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_blas_ext_dnansum( arr ), v ); // Free allocated memory: stdlib_ndarray_free( arrays[ 0 ] ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dsum/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dsum/src/addon.c index 8ee9372b2722..270d8e4f418b 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/dsum/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/dsum/src/addon.c @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) { assert( status == napi_ok ); return NULL; } + // Create a const-qualified view of the argument pointer list: + const struct ndarray *arr[ 1 ] = { + arrays[ 0 ] + }; // Perform computation: - STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_blas_ext_dsum( arrays ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, stdlib_blas_ext_dsum( arr ), v ); // Free allocated memory: stdlib_ndarray_free( arrays[ 0 ] ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/snansum/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/ndarray/snansum/src/addon.c index 575e47dd18bf..cabcf29bf02f 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/snansum/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/snansum/src/addon.c @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) { assert( status == napi_ok ); return NULL; } + // Create a const-qualified view of the argument pointer list: + const struct ndarray *arr[ 1 ] = { + arrays[ 0 ] + }; // Perform computation: - STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_snansum( arrays ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_snansum( arr ), v ); // Free allocated memory: stdlib_ndarray_free( arrays[ 0 ] ); diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/ssum/src/addon.c b/lib/node_modules/@stdlib/blas/ext/base/ndarray/ssum/src/addon.c index 4f9f07896863..a6dade6a78d0 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/ssum/src/addon.c +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/ssum/src/addon.c @@ -45,8 +45,12 @@ static napi_value addon( napi_env env, napi_callback_info info ) { assert( status == napi_ok ); return NULL; } + // Create a const-qualified view of the argument pointer list: + const struct ndarray *arr[ 1 ] = { + arrays[ 0 ] + }; // Perform computation: - STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_ssum( arrays ), v ); + STDLIB_NAPI_CREATE_DOUBLE( env, (double)stdlib_blas_ext_ssum( arr ), v ); // Free allocated memory: stdlib_ndarray_free( arrays[ 0 ] ); diff --git a/lib/node_modules/@stdlib/stats/strided/dnanmskmin/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dnanmskmin/benchmark/c/benchmark.length.c index 0c88559e61c5..2049daaa61f5 100644 --- a/lib/node_modules/@stdlib/stats/strided/dnanmskmin/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dnanmskmin/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *)malloc( len * sizeof( double ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_double() < 0.2 ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *)malloc( len * sizeof( double ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_double() < 0.2 ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/dnanmskrange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/dnanmskrange/benchmark/c/benchmark.length.c index 4ae1e5cec199..f802b1b844ce 100644 --- a/lib/node_modules/@stdlib/stats/strided/dnanmskrange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/dnanmskrange/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static double rand_double( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *)malloc( len * sizeof( double ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_double() < 0.2 ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - double x[ len ]; + double *x; double v; double t; int i; + x = (double *)malloc( len * sizeof( double ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_double() < 0.2 ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/scumax/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/scumax/benchmark/c/benchmark.length.c index 17e1bb32321b..c18e368070b8 100644 --- a/lib/node_modules/@stdlib/stats/strided/scumax/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/scumax/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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -118,6 +120,8 @@ static double benchmark1( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -130,11 +134,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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -152,6 +158,8 @@ static double benchmark2( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/scumaxabs/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/scumaxabs/benchmark/c/benchmark.length.c index 1ef600bc1eaf..9187326d1c79 100644 --- a/lib/node_modules/@stdlib/stats/strided/scumaxabs/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/scumaxabs/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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -118,6 +120,8 @@ static double benchmark1( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -130,11 +134,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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -152,6 +158,8 @@ static double benchmark2( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/scumin/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/scumin/benchmark/c/benchmark.length.c index c89499eaefaf..9c0b521dc782 100644 --- a/lib/node_modules/@stdlib/stats/strided/scumin/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/scumin/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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -118,6 +120,8 @@ static double benchmark1( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -130,11 +134,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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -152,6 +158,8 @@ static double benchmark2( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/scuminabs/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/scuminabs/benchmark/c/benchmark.length.c index 39fc858c1ac9..8a3a956db77e 100644 --- a/lib/node_modules/@stdlib/stats/strided/scuminabs/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/scuminabs/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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -118,6 +120,8 @@ static double benchmark1( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } @@ -130,11 +134,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() * 20000.0f ) - 10000.0f; y[ i ] = 0.0f; @@ -152,6 +158,8 @@ static double benchmark2( int iterations, int len ) { if ( y[ len-1 ] != y[ len-1 ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/smskmax/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/smskmax/benchmark/c/benchmark.length.c index 0e3d2f578daf..f1b8cb76d7e0 100644 --- a/lib/node_modules/@stdlib/stats/strided/smskmax/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/smskmax/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/smskmin/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/smskmin/benchmark/c/benchmark.length.c index a2fa2391d71e..f13c64bb0878 100644 --- a/lib/node_modules/@stdlib/stats/strided/smskmin/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/smskmin/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/smskrange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/smskrange/benchmark/c/benchmark.length.c index f154599e43ab..9097a94e8a1f 100644 --- a/lib/node_modules/@stdlib/stats/strided/smskrange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/smskrange/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/snanmskmax/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/snanmskmax/benchmark/c/benchmark.length.c index 50fc631f65d8..6ab82e92f130 100644 --- a/lib/node_modules/@stdlib/stats/strided/snanmskmax/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/snanmskmax/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/snanmskmin/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/snanmskmin/benchmark/c/benchmark.length.c index 0404c0b4b41f..3caff0fbf0b3 100644 --- a/lib/node_modules/@stdlib/stats/strided/snanmskmin/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/snanmskmin/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/snanmskrange/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/snanmskrange/benchmark/c/benchmark.length.c index 6bf97d7c068b..6a7b00ccc60c 100644 --- a/lib/node_modules/@stdlib/stats/strided/snanmskrange/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/snanmskrange/benchmark/c/benchmark.length.c @@ -95,13 +95,15 @@ static float rand_float( void ) { * @return elapsed time in seconds */ static double benchmark1( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -124,6 +126,8 @@ static double benchmark1( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } @@ -135,13 +139,15 @@ static double benchmark1( int iterations, int len ) { * @return elapsed time in seconds */ static double benchmark2( int iterations, int len ) { - unsigned char mask[ len ]; + unsigned char *mask; double elapsed; - float x[ len ]; + float *x; float v; double t; int i; + x = (float *)malloc( len * sizeof( float ) ); + mask = (unsigned char *)malloc( len * sizeof( unsigned char ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { mask[ i ] = 1; // missing @@ -164,6 +170,8 @@ static double benchmark2( int iterations, int len ) { if ( v != v ) { printf( "should not return NaN\n" ); } + free( x ); + free( mask ); return elapsed; } diff --git a/lib/node_modules/@stdlib/stats/strided/sztest/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/sztest/benchmark/c/benchmark.length.c index 55e3d18ee7da..f66107a42031 100644 --- a/lib/node_modules/@stdlib/stats/strided/sztest/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/sztest/benchmark/c/benchmark.length.c @@ -100,7 +100,7 @@ static float random_uniform( const float min, const float max ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; double t; int i; @@ -115,6 +115,7 @@ static double benchmark1( int iterations, int len ) { .sd = 0.0f }; + x = (float *)malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0f, 5.0f ); } @@ -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; - float x[ len ]; + float *x; double t; int i; @@ -158,6 +160,7 @@ static double benchmark2( int iterations, int len ) { .sd = 0.0f }; + x = (float *)malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0f, 5.0f ); } @@ -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/sztest2/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/stats/strided/sztest2/benchmark/c/benchmark.length.c index 40b774a9b9c9..fbd8878731f5 100644 --- a/lib/node_modules/@stdlib/stats/strided/sztest2/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/stats/strided/sztest2/benchmark/c/benchmark.length.c @@ -100,8 +100,8 @@ static float random_uniform( const float min, const float max ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; - float y[ len ]; + float *x; + float *y; double t; int i; @@ -117,6 +117,8 @@ static double benchmark1( int iterations, int len ) { .ymean = 0.0f }; + x = (float *)malloc( len * sizeof( float ) ); + y = (float *)malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0f, 5.0f ); y[ i ] = random_uniform( -5.0f, 5.0f ); @@ -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; - float x[ len ]; - float y[ len ]; + float *x; + float *y; double t; int i; @@ -163,6 +167,8 @@ static double benchmark2( int iterations, int len ) { .ymean = 0.0f }; + x = (float *)malloc( len * sizeof( float ) ); + y = (float *)malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { x[ i ] = random_uniform( -5.0f, 5.0f ); y[ i ] = random_uniform( -5.0f, 5.0f ); @@ -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; } diff --git a/lib/node_modules/@stdlib/strided/base/cmap/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/strided/base/cmap/benchmark/c/benchmark.length.c index c03882b64be1..e85c01f02a4b 100644 --- a/lib/node_modules/@stdlib/strided/base/cmap/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/strided/base/cmap/benchmark/c/benchmark.length.c @@ -106,12 +106,14 @@ static float complex identity( const float complex x ) { * @return elapsed time in seconds */ static double benchmark( int iterations, int len ) { - float complex x[ len ]; - float complex y[ len ]; + float complex *x; + float complex *y; double elapsed; double t; int i; + x = (float complex *)malloc( len * sizeof( float complex ) ); + y = (float complex *)malloc( len * sizeof( float complex ) ); for ( i = 0; i < len; i++ ) { x[ i ] = ( ( rand_float()*200.0f ) - 100.0f ) + ( ( rand_float()*200.0f ) - 100.0f )*I; y[ i ] = 0.0f + 0.0f*I; @@ -129,6 +131,8 @@ static double benchmark( int iterations, int len ) { if ( y[ i%len ] != y[ i%len ] ) { printf( "should not return NaN\n" ); } + free( x ); + free( y ); return elapsed; }