[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 15:37:31 PDT 2016


jlebar added a comment.

> Is this because the functions are in <cmath> instead of in <complex> are you don't want to mark all of <cmath> as host/device?

Yes.  cmath is its own beast; we need to have our own implementation of it in order to direct the std functions to the appropriate low-level device functions.  (And even if this could somehow be made to work with libc++, we'd still need it for libstdc++, so doing it one way, even if it's horrible, is very likely preferable to doing it two ways.)


https://reviews.llvm.org/D25403





More information about the cfe-commits mailing list