I want to check if any of the 1024 bits (128 bytes) are set. If all are clear, then I want to do something. Is it possible to do this quickly, i.e one instruction or do I have to loop through my bitmap?
Check if N(large) bits are set
157 Views Asked by beans At
2
As i have understood the questions, you want to check if any of the bit is set out of 1024 bits you have.
Assuming you are on 64 bit machine. store the bits as array of
unit64_t
type which is8 bytes
.So you have array of this kind.
and to check your bit condition