Skip to content

Instantly share code, notes, and snippets.

@aczid
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aczid/9639238 to your computer and use it in GitHub Desktop.
Save aczid/9639238 to your computer and use it in GitHub Desktop.
size_t offset = 8;
while(offset--){
uint16_t word = _mm_movemask_epi8((__m128i) value);
for(int8_t index = offset; index < 128; index += 8){
if(word & 1){
// index was set
}
word >>= 1;
}
value <<= 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment