Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
const base xMask = 0x000000000000ffff;
const base constant = 0x0001000100010001;
const base yMask = (constant << 192) | (constant << 128) | (constant << 64) | constant;
const base constantBlock = 0x000f000f000f000f;
const base blockMask[16] = { ((constantBlock << 0) << 0), ((constantBlock << 4) << 0), ((constantBlock << 8) << 0), ((constantBlock << 12) << 0),
((constantBlock << 0) << 64), ((constantBlock << 4) << 64), ((constantBlock << 8) << 64), ((constantBlock << 12) << 64),
((constantBlock << 0) << 128), ((constantBlock << 4) << 128), ((constantBlock << 8) << 128), ((constantBlock << 12) << 128),
((constantBlock << 0) << 192), ((constantBlock << 4) << 192), ((constantBlock << 8) << 192), ((constantBlock << 12) << 192)};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment