-
Notifications
You must be signed in to change notification settings - Fork 75
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
Avoid M_PI #1553
Comments
Out of curiosity, which C library does not define |
I primarily encountered it with MSVC 19.30 (VS 2022), where you need to explicitely ask for it with |
It sounds less intrusive to define another preprocessor flag rather than add yet another Boost dependency (see #481). |
An own variable template for pi is also an option i think. No ugly all caps name as a bonus |
We already have a Boost dependency. There is no way around it. So why reinvent the wheel? IMO the preprocessor flag adds more complexity, since it complicates the build system. And I think we have users, that don't use alpaka's CMake, so they would need to specify the flag manually each time. |
What are we reinventing?
Then we can switch to that once C++20 is available to us.
It is literally a one-liner in CMake. And we need to change the build system in Boost's case as well since we would need to check for the existence of
Those don't use MSVC anyway AFAIK. |
We don't use CMake, and we don't use MSVC, and have been using |
alpaka/rand/RandDefault.hpp
usesM_PI
which is a non-standard extension. Please replace the constant by e.g.boost::math::constants::pi
.The text was updated successfully, but these errors were encountered: