Bits Loops

TanayLabUtilities.BitsLoops.@foreach_true_index Macro
@foreach_true_index bits index begin
    ...use index...
end

Iterate on all indices for which bits are true and invoke body(index) for each. This efficiently skips 64-but chunks so is reasonably efficient for sparse bit vectors. It also does this with no allocations (unlike using findall ).

Index