Module utils

Source
Expand description

Utilities related to bit manipulation of tensor elements.

Functionsยง

flip_bits
Flips the bits in num from ith position to (n-i)th position.
get_bit
Get the bit_index bit value from num.
get_flat_index
Get the index into an Op matrix
set_bit
Set the bit_index bit in num to value.