This commit is contained in:
Gregory Burd 2024-04-05 21:19:21 -04:00
parent d68c4b612e
commit e9128a8422

View file

@ -1187,14 +1187,9 @@ size_t
sparsemap_span(sparsemap_t *map, size_t loc, size_t len)
{
size_t size = 1024;
// size_t size = sparsemap_get_size(map);
// assert(size >= SM_SIZEOF_OVERHEAD);
// if (loc + 1 > size - len || len < size) {
// return size;
// }
do {
size_t nth = sparsemap_select(map, loc, len);
size_t nth = sparsemap_select(map, len);
size_t count = sparsemap_rank(map, nth - len, nth);
if (count == len) {
return nth - len;