File tree Expand file tree Collapse file tree
strided/special/dcbrt/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+ - [`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)_
734735- [`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)_
735736- [`d44b144`](https://github.com/stdlib-js/stdlib/commit/d44b144df2681c91a8108d00cc16afd5833a8249) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/ddeg2rad` [(#11663)](https://github.com/stdlib-js/stdlib/pull/11663) _(by Uday Kakade)_
736737- [`5029670`](https://github.com/stdlib-js/stdlib/commit/5029670736574df60258c5519cf1f6670b50806e) - **bench:** refactor to use dynamic memory allocation in `math/strided/special/drsqrt` [(#11665)](https://github.com/stdlib-js/stdlib/pull/11665) _(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 ( -100.0 , 100.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