@dysfun by setting the vector to zero the output will be parity(A*x), meaning you can compute the parity of any subset of bits you like in a given byte by setting or clearing bits in the row of A. and of course it works with any permutation of bits in A, so you can calculate the bytewise parities of any chosen subset of bits in a 128-bit vector.
if you wanted the overall parity you could then take the output and feed it back in with A set to all ones and finally POPCNT the resulting 16-bit word
Comments
Displaying 0 of 0 comments