diff --git a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c index 04ac010e577a..2d95d20e97f4 100644 --- a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c @@ -96,14 +96,14 @@ static double benchmark( void ) { double t; int i; - int64_t shape[] = { 10, 10, 10 }; + const int64_t shape[] = { 10, 10, 10 }; int64_t strides[] = { 100, 10, 1 }; - int64_t offset = 1000; - int64_t ndims = 3; + const int64_t offset = 1000; + const int64_t ndims = 3; t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - strides[ 0 ] *= ( rand_double() < 0.5 ) ? 1 : -1; + strides[ 0 ] *= ( i%2 == 1 ) ? 1 : -1; n = stdlib_ndarray_max_view_buffer_index( ndims, shape, strides, offset ); if ( n > 1e10 ) { printf( "unexpected result\n" );