Fill by Subtraction
On this page
Home * Board Representation * Bitboards * Sliding Piece Attacks * Fill by Subtraction
Performing the o^(o-2r) - trick in a SWAR-wise fashion with bytes (ranks), saves some instructions compared to Kogge-Stone.
Cpwmappinghint.JPG | Code samples and bitboard diagrams rely on Little endian file and rank mapping. |
Unfortunately it only works in positive horizontal direction, so the possible savings are marginal, despite even less generalization of handling one out of eight cases with a different code pattern.
Source Code
Even more with vectors of two bitboards and SSE2-instructions.
Comparison with Kogge-Stone
For comparison the Kogge-Stone attack-getter. It gives an idea how to implement a Kogge-Stone Adder with bitwise operations only.
See also
- Add/Sub versus Attacks from Parallel Prefix Algorithms
- Fill Algorithms
- Fill by Subtraction with SSE2-instructions
- Kogge-Stone Algorithm
- Pieces versus Directions
- SIMD and SWAR Techniques
- Subtracting a Rook from a Blocking Piece
Prev
Fill AlgorithmsNext
FinalGen