Hi! Could we have a find_prev() to go along the find_next()? That would allow efficient reverse iteration over all 1-bits. The code should be pretty much the reverse of find_next(), and using countl_zero instead of countr_zero as the bit intrinsic function.
Hi! Could we have a
find_prev()to go along thefind_next()? That would allow efficient reverse iteration over all 1-bits. The code should be pretty much the reverse offind_next(), and usingcountl_zeroinstead ofcountr_zeroas the bit intrinsic function.