Skip to content

Commit 9a8e1aa

Browse files
committed
Auto-generated commit
1 parent 611e4ab commit 9a8e1aa

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ A total of 95 issues were closed in this release:
731731

732732
<details>
733733

734+
- [`05b2f70`](https://github.com/stdlib-js/stdlib/commit/05b2f70915fae6980da8ed1fca63caa8af7e67ec) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/dabs` [(#11655)](https://github.com/stdlib-js/stdlib/pull/11655) _(by Uday Kakade)_
734735
- [`cbfa3ed`](https://github.com/stdlib-js/stdlib/commit/cbfa3edba69272dd350ed36de546c3d5c565c38c) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/dab2` [(#11656)](https://github.com/stdlib-js/stdlib/pull/11656) _(by Uday Kakade)_
735736
- [`2665799`](https://github.com/stdlib-js/stdlib/commit/2665799f49ffca226f58dbae3219e6f6305590ee) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/dcbrt` [(#11661)](https://github.com/stdlib-js/stdlib/pull/11661) _(by Uday Kakade)_
736737
- [`cb25af1`](https://github.com/stdlib-js/stdlib/commit/cb25af165ecfc0a8463fe171865094447b0be634) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/dceil` [(#11662)](https://github.com/stdlib-js/stdlib/pull/11662) _(by Uday Kakade)_

strided/special/dabs/benchmark/c/benchmark.length.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ static double rand_double( void ) {
9696
*/
9797
static double benchmark( int iterations, int len ) {
9898
double elapsed;
99-
double x[ len ];
100-
double y[ len ];
99+
double *x;
100+
double *y;
101101
double t;
102102
int i;
103103

104+
x = (double *) malloc( len * sizeof( double ) );
105+
y = (double *) malloc( len * sizeof( double ) );
104106
for ( i = 0; i < len; i++ ) {
105107
x[ i ] = ( rand_double()*200.0 ) - 100.0;
106108
y[ i ] = 0.0;
@@ -118,6 +120,8 @@ static double benchmark( int iterations, int len ) {
118120
if ( y[ 0 ] != y[ 0 ] ) {
119121
printf( "should not return NaN\n" );
120122
}
123+
free( x );
124+
free( y );
121125
return elapsed;
122126
}
123127

0 commit comments

Comments
 (0)