File tree Expand file tree Collapse file tree
strided/special/dramp/benchmark/c Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -731,6 +731,7 @@ A total of 95 issues were closed in this release:
731731
732732<details>
733733
734+ - [`39f9ad9`](https://github.com/stdlib-js/stdlib/commit/39f9ad9302a52b735769bcf0c25b11dbe87c9b7a) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/dramp` [(#11664)](https://github.com/stdlib-js/stdlib/pull/11664) _(by Uday Kakade)_
734735- [`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)_
735736- [`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)_
736737- [`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)_
Original file line number Diff line number Diff line change @@ -114,11 +114,13 @@ float rand_uniformf( float a, float b ) {
114114*/
115115static double benchmark ( int iterations , int len ) {
116116 double elapsed ;
117- double x [ len ] ;
118- double y [ len ] ;
117+ double * x ;
118+ double * y ;
119119 double t ;
120120 int i ;
121121
122+ x = (double * ) malloc ( len * sizeof ( double ) );
123+ y = (double * ) malloc ( len * sizeof ( double ) );
122124 for ( i = 0 ; i < len ; i ++ ) {
123125 x [ i ] = rand_uniform ( -10.0 , 10.0 );
124126 y [ i ] = 0.0 ;
@@ -135,6 +137,8 @@ static double benchmark( int iterations, int len ) {
135137 if ( y [ 0 ] != y [ 0 ] ) {
136138 printf ( "should not return NaN\n" );
137139 }
140+ free ( x );
141+ free ( y );
138142 return elapsed ;
139143}
140144
You can’t perform that action at this time.
0 commit comments