Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math functions for integral batches #403

Open
JohanMabille opened this issue Nov 23, 2020 · 2 comments
Open

Math functions for integral batches #403

JohanMabille opened this issue Nov 23, 2020 · 2 comments

Comments

@JohanMabille
Copy link
Member

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.

@serge-sans-paille
Copy link
Contributor

@JohanMabille do you think we should make that conversion implicit? We already have enough functions to allow users to do the conversion explicitly...

@JohanMabille
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants