Low-level bit manipulation helpers for bitboards.
lsb/1 finds the least-significant set square (De Bruijn sequence, nil
for empty) and pop_count/1 counts set bits; both are compiler-inlined.
Directional shifts (shift_north/1 and siblings) mask file wraps via
Echecs.Bitboard.Constants.
Summary
Functions
Returns the index (0-63) of the least significant bit. Returns nil if 0.
Returns the number of set bits (population count)
Shifts a bitboard in a direction. handles wrapping.
Functions
Returns the index (0-63) of the least significant bit. Returns nil if 0.
Returns the number of set bits (population count)
Shifts a bitboard in a direction. handles wrapping.