Skip to content

Commit 3d5e646

Browse files
authored
bench: move declaration
Signed-off-by: Athan <kgryte@gmail.com>
1 parent 6695ab7 commit 3d5e646

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/node_modules/@stdlib/stats/strided/distances/dminkowski/benchmark/c/benchmark.length.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,20 +174,20 @@ static double benchmark2( int iterations, int len, double p ) {
174174
*/
175175
int main( void ) {
176176
double elapsed;
177-
double *powers;
178177
int count;
179178
int iter;
180179
int len;
181180
int i;
182181
int j;
183182
int p;
183+
184+
const double powers[ 4 ] = { 1.0, 2.0, 10.0, INFINITY };
184185

185186
// Use the current time to seed the random number generator:
186187
srand( time( NULL ) );
187188

188189
print_version();
189190
count = 0;
190-
powers = (double[]) { 1.0, 2.0, 10.0, INFINITY };
191191
for ( i = MIN; i <= MAX; i++ ) {
192192
len = pow( 10, i );
193193
iter = ITERATIONS / pow( 10, i-1 );

0 commit comments

Comments
 (0)