cccl
cccl copied to clipboard
[FEA]: constexpr log functions
Is this a duplicate?
- [x] I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct
Area
libcu++
Is your feature request related to a problem? Please describe.
I was blocked making std::normal_distribution constexpr because cuda::std::log is not yet constexpr. This is part of C++26.
Describe the solution you'd like
.
Describe alternatives you've considered
No response
Additional context
No response
we do have constexpr ilogb is that sufficient for you?
constexpr math functions are out of our hands because the generally need compiler and runtime support
I need natural log unfortunately. Is it theoretically possible to use std::is_constant_evaluated() to "overload" for constexpr?
There are some things we can do, but there are issues wrt to denormals, so I would not hold my breath