c++eigensimd

bitwise operations in Eigen


It doesn't seem like Eigen supports bitwise operations.

I would like bitwise SIMD functionality for "shift left" and "and".

Is there a quick and dirty way to implement this functionality? Can i call an intrinsic function and input it with something like Eigen vector.data()?


Solution

  • I think Eigen don't support this because that there isn't a good way to do this for float, double and complex numbers.

    You can always override those C++ bitwise operators by yourself, taking two MatrixBase as parameters.

    For bitwise assignment operators, you need to add a function inside MatrixBase class. Eigen made this possible, see here how to.