eyalroz / cuda-kat

CUDA kernel author's tools
BSD 3-Clause "New" or "Revised" License
105 stars 8 forks source link

Bring some order to `_safe` vs `_unsafe`, constexpr vs non-constexpr math functions #23

Closed eyalroz closed 5 years ago

eyalroz commented 5 years ago

At the moment, some of our math utility functions have both constexpr and non-constexpr variants, in different files, while some have only the constexpr ones which work at run-time as well. But - we indicate the first case with the kat::constexpr_ namespace. Is this explained anywhere? Not really. Also unexplained is why math.cuh includes constexpr_math.cuh.

To add to the fun, we have several functions with two implementations, foo_safe() and foo_unsafe(); and - some of the non-safe versions are actually in constexpr_math...

We should get this stuff in order.