Skip to content

Commit 9082065

Browse files
authored
bench: fix compilation failure
Signed-off-by: Athan <kgryte@gmail.com>
1 parent 1af348e commit 9082065

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c

lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ static double benchmark( void ) {
9797
int i;
9898

9999
const int64_t shape[] = { 10, 10, 10 };
100-
const int64_t strides[] = { 100, 10, 1 };
100+
int64_t strides[] = { 100, 10, 1 };
101101
const int64_t offset = 1000;
102102
const int64_t ndims = 3;
103103

104104
t = tic();
105105
for ( i = 0; i < ITERATIONS; i++ ) {
106-
strides[ 0 ] *= ( rand_double() < 0.5 ) ? 1 : -1;
106+
strides[ 0 ] *= ( i%2 == 1 ) ? 1 : -1;
107107
n = stdlib_ndarray_max_view_buffer_index( ndims, shape, strides, offset );
108108
if ( n > 1e10 ) {
109109
printf( "unexpected result\n" );

0 commit comments

Comments
 (0)