tra added inline comments.

================
Comment at: clang/lib/Headers/__clang_cuda_cmath.h:81-90
+__DEVICE__ bool isinf(long double __x) { return ::__isinfl(__x); }
 __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); }
 // For inscrutable reasons, __finite(), the double-precision version of
 // __finitef, does not exist when compiling for MacOS.  __isfinited is 
available
 // everywhere and is just as good.
 __DEVICE__ bool isfinite(double __x) { return ::__isfinited(__x); }
+__DEVICE__ bool isfinite(long double __x) { return ::__finitel(__x); }
----------------
CUDA [[ 
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#long-double | 
does not support]]  long double on device side, so I would rather see a 
compilation error when someone attempts to use a long double, as opposed to 
providing inconsistent support for it. 

I wonder if we could just provide declarations for these functions. This should 
allow math_functions.hpp to compile, but would still prevent any use of `long 
double` on device side.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60220/new/

https://reviews.llvm.org/D60220



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to