Changes

Jump to: navigation, search

Parallel Prefix Algorithms

139 bytes added, 00:13, 12 April 2021
no edit summary
// SIMD bytewise add a + b
U64 koggeStoneByteAdd(U64 a, U64 b) {
const U64 aFile = C64(0x0101010101010101);
U64 gen, pro;
gen = a & b;
// SIMD bytewise sub a - b
U64 koggeStoneByteSub(U64 a, U64 b) {
const U64 aFile = C64(0x0101010101010101);
U64 gen, pro;
gen = a & ~b; // based on -b = ~b + 1
<pre>
U64 eastAttacks(U64 occ, U64 rooks) {
const U64 aFile = C64(0x0101010101010101);
U64 gen, pro;
pro = ~occ & ~aFile;

Navigation menu