[PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Justin Lebar via cfe-commits
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

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Artem Belevich via cfe-commits
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

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Justin Lebar via cfe-commits
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

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-17 Thread Artem Belevich via cfe-commits
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

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-18 Thread Justin Lebar via cfe-commits
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 ___

Re: [PATCH] D23627: [CUDA] Improve handling of math functions.

2016-08-18 Thread Justin Lebar via cfe-commits
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