I have the following logic, given an input in binary 0111_1001 and mask 0001_0001, I want to select all consecutive 1 in the input that are higher than or equal to 1 in the mask.
input: 0111 1001
mask: 0001 0001
out: 0111 0001
My questions are as following:
Is there a name for this kind of function that would make it easier to search and ask further questions?
Is there a SIMD-like function and algorithm to speed this function?
Broadly? “Bitwise operation”, “bitwise function”, “bit twiddling”… Bit manipulation - Wikipedia may have some useful names and further links.
Bitwise or bit twiddling as others have pointed out. A absolute classic resource on the subject is Bit Twiddling Hacks (aimed at C, but the principles carry over obviously).