[clang] 5d689cf - [NFC][CUDA] Fix order of round(f) definition in __clang_cuda_math.h for non-LP64.
Joachim Meyer via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 2 12:53:03 PDT 2021
Author: Joachim Meyer
Date: 2021-07-02T21:55:48+02:00
New Revision: 5d689cf2a667d8dc51768400455e0ecc55d19eaf
URL: https://github.com/llvm/llvm-project/commit/5d689cf2a667d8dc51768400455e0ecc55d19eaf
DIFF: https://github.com/llvm/llvm-project/commit/5d689cf2a667d8dc51768400455e0ecc55d19eaf.diff
LOG: [NFC][CUDA] Fix order of round(f) definition in __clang_cuda_math.h for non-LP64.
This broke ARM builds e.g.: https://lab.llvm.org/buildbot/#/builders/187/builds/212
Added:
Modified:
clang/lib/Headers/__clang_cuda_math.h
Removed:
################################################################################
diff --git a/clang/lib/Headers/__clang_cuda_math.h b/clang/lib/Headers/__clang_cuda_math.h
index acb26ad345d59..538556f394da4 100644
--- a/clang/lib/Headers/__clang_cuda_math.h
+++ b/clang/lib/Headers/__clang_cuda_math.h
@@ -166,6 +166,8 @@ __DEVICE__ long long llrint(double __a) { return __nv_llrint(__a); }
__DEVICE__ long long llrintf(float __a) { return __nv_llrintf(__a); }
__DEVICE__ long long llround(double __a) { return __nv_llround(__a); }
__DEVICE__ long long llroundf(float __a) { return __nv_llroundf(__a); }
+__DEVICE__ double round(double __a) { return __nv_round(__a); }
+__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); }
__DEVICE__ double log(double __a) { return __nv_log(__a); }
__DEVICE__ double log10(double __a) { return __nv_log10(__a); }
__DEVICE__ float log10f(float __a) { return __nv_log10f(__a); }
@@ -270,8 +272,6 @@ __DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d) {
__DEVICE__ float rnormf(int __dim, const float *__t) {
return __nv_rnormf(__dim, __t);
}
-__DEVICE__ double round(double __a) { return __nv_round(__a); }
-__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); }
__DEVICE__ double rsqrt(double __a) { return __nv_rsqrt(__a); }
__DEVICE__ float rsqrtf(float __a) { return __nv_rsqrtf(__a); }
__DEVICE__ double scalbn(double __a, int __b) { return __nv_scalbn(__a, __b); }
More information about the cfe-commits
mailing list