SIMD enabled casts
Submitted by rod..@..il.com
Assigned to Nobody
Link to original bugzilla bug (#512)
Arguably one of the key features of Eigen is that its provide top speed with very high ease of use.
I am currently looking to optimize some vectorial code, and converting from STL to Eigen types seems like one of the easiest way to make the best of the CPU.
This particular code other than sums and multiplications, needs a cast operator (float to int, in a binning operation).
From what I can understand from the Eigen code base it seems that the ::cast<> function simply calls static_cast<> as an unary operator. However there seem to exist SIMD instructions for specific common kind of casts (such as CVTTSD2SI )
It would be then great if such ::cast<> calls would be also SIMD enabled.
Any chance of seeing this feature appear?
Given the Eigen infrastructure it seems that this should not too hard to implement; but getting "hands on" inside Eigen is quite scary to me.