Reconsider usage of EIGEN_FAST_MATH
@chhtz
Submitted by Christoph HertzbergAssigned to Nobody
Link to original bugzilla bug (#1687)
Version: 3.4 (development)
Description
Currently setting EIGEN_FAST_MATH to 1 (which it is by default) essentially just means that sin and cos are calculated using SIMD-math.
I assume that meanwhile our implementation is within 1ULP of the accuracy of the std
implementation, so this flag is nearly irrelevant.
If we want to keep this, I suggest renaming this to something like EIGEN_USE_SIMD_MATH_FUNCTIONS
and let it enable/disable all other packet-functions (like plog/pexp/...) as well.
And if we refactor this, I would also suggest removing HasSin
, HasCos
, ... from all the packet_traits, and replace the logic by checking if we have cast_to_int
, bitshift
, bittest
, ... (or whatever operations are needed to implement the relevant function).
Also related is Bug #1259. If SVML (or something equivalent) is available we could offer to use that library instead of our own functions.