Fix support for AMD processors

Was a problem with the portability of boolean types across different architectures.
On NVIDIA platforms, boolean types are single bytes, on AMD platforms they're 4 bytes.
Now considers everything as bytes for the bitmask calculations
Update tests a bit