jlebar created this revision.
jlebar added a reviewer: tra.
jlebar added a subscriber: cfe-commits.
A bunch of related changes here to our CUDA math headers.
- The second arg to nexttoward is a double (well, technically, long
double, but we don't have that), not a float.
- Add a forward-declar
tra added inline comments.
Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133
@@ -122,8 +124,11 @@
__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr);
}
-__DEVICE__ float nexttoward(float __from, float __to) {
+__DEVICE__ float nexttoward(float
jlebar added inline comments.
Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133
@@ -122,8 +124,11 @@
__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr);
}
-__DEVICE__ float nexttoward(float __from, float __to) {
+__DEVICE__ float nexttoward(fl
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
LGTM, but we may want someone familiar with math library to take a look.
Comment at: clang/lib/Headers/__clang_cuda_cmath.h:125-133
@@ -122,8 +124,11 @@
__DEVICE__ float modf(float
jlebar added a comment.
These changes have always been kind of scary. tra tested this against Thrust
all combinations of CUDA 7.0/7.5, c++98/11,
libc++/libstdc++{4.8.5/4.9.3,5.3.0}. So we should be good here. I hope.
https://reviews.llvm.org/D23627
___
This revision was automatically updated to reflect the committed changes.
Closed by commit rL279140: [CUDA] Improve handling of math functions. (authored
by jlebar).
Changed prior to commit:
https://reviews.llvm.org/D23627?vs=68427&id=68600#toc
Repository:
rL LLVM
https://reviews.llvm.org/D