Skip to content

Commit

Permalink
Fix: Increment global_offset on final step
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Nov 4, 2024
1 parent 999243e commit 617e1f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/simsimd/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ SIMSIMD_PUBLIC int simsimd_ndindex_next(simsimd_ndindex_t *ndindex, simsimd_size
ndindex->byte_offset -= strides[i] * shape[i]; // Discard the running progress along this dimension
}
// If we reach here, we've iterated over all elements
ndindex->global_offset++;
return 0; // End of iteration
}

Expand Down

0 comments on commit 617e1f7

Please sign in to comment.