xsimd
xsimd copied to clipboard
Math functions for integral batches
A lot of mathematical functions from the STL convert their argument for integer to double and then rely on the overload for double (remainder, nearbyint, etc...).
xsimd
should follow the same pattern when no equivalent more optimized implementation is possible. Generic functions for converting subset of integral batches to double batches should be added as part of the public API.
@JohanMabille do you think we should make that conversion implicit? We already have enough functions to allow users to do the conversion explicitly...
do you think we should make that conversion implicit?
Actually no; the C++ runtime provides implicit conversions between builtin types for convenience, but these are usually source of warnings that lead to replace them with explicit conversions; so let's do it the right way and not provide implicit conversions.
However, I still think we should provide overloads of math functions for integral batches at some point.