File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/node_modules/@stdlib/stats/base/dsnanmeanwd/benchmark/c Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ static double benchmark1( int iterations, int len ) {
102102 int i ;
103103
104104 for ( i = 0 ; i < len ; i ++ ) {
105- // cppcheck-suppress uninitvar
106105 x [ i ] = ( rand_float ()* 20000.0f ) - 10000.0f ;
107106 }
108107 v = 0.0 ;
109108 t = tic ();
110109 for ( i = 0 ; i < iterations ; i ++ ) {
110+ // cppcheck-suppress uninitvar
111111 v = stdlib_strided_dsnanmeanwd ( len , x , 1 );
112112 if ( v != v ) {
113113 printf ( "should not return NaN\n" );
@@ -136,12 +136,12 @@ static double benchmark2( int iterations, int len ) {
136136 int i ;
137137
138138 for ( i = 0 ; i < len ; i ++ ) {
139- // cppcheck-suppress uninitvar
140139 x [ i ] = ( rand_float ()* 20000.0f ) - 10000.0f ;
141140 }
142141 v = 0.0 ;
143142 t = tic ();
144143 for ( i = 0 ; i < iterations ; i ++ ) {
144+ // cppcheck-suppress uninitvar
145145 v = stdlib_strided_dsnanmeanwd_ndarray ( len , x , 1 , 0 );
146146 if ( v != v ) {
147147 printf ( "should not return NaN\n" );
You can’t perform that action at this time.
0 commit comments