MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / reverse_offsets

Function reverse_offsets

python/stringzilla.c:380–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378}
379
380void reverse_offsets(sz_sorted_idx_t *array, sz_size_t length) {
381 sz_size_t i, j;
382 // Swap array[i] and array[j]
383 for (i = 0, j = length - 1; i < j; i++, j--) {
384 sz_sorted_idx_t temp = array[i];
385 array[i] = array[j];
386 array[j] = temp;
387 }
388}
389
390void reverse_haystacks(sz_string_view_t *array, sz_size_t length) {
391 sz_size_t i, j;

Callers 2

Strs_sortedFunction · 0.85
Strs_argsortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…