[PATCH] D23627: [CUDA] Improve handling of math functions.
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 17 17:04:47 PDT 2016
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 __x, float *__iptr) { return ::modff(__x, __iptr); }
-__DEVICE__ float nexttoward(float __from, float __to) {
+__DEVICE__ float nexttoward(float __from, double __to) {
return __builtin_nexttowardf(__from, __to);
}
__DEVICE__ double nexttoward(double __from, double __to) {
return __builtin_nexttoward(__from, __to);
}
+__DEVICE__ float nexttowardf(float __from, double __to) {
+ return __builtin_nexttowardf(__from, __to);
+}
__DEVICE__ float pow(float __base, float __exp) {
----------------
jlebar wrote:
> tra wrote:
> > You've got two identical `nexttoward(float, double)` now.
> > Perhaps first one was supposed to remain `nexttoward(float, float)` ?
> >
> >
> It's hard to see, but one is nexttowardf.
Indeed, I've missed that.
https://reviews.llvm.org/D23627
More information about the cfe-commits
mailing list