From ba2612ce01eae5859ae7adb99161775fb2c4e0b2 Mon Sep 17 00:00:00 2001 From: Aaron En Ye Shi Date: Wed, 25 Nov 2020 21:08:12 +0000 Subject: [PATCH] [HIP] cmath demote long double args to double Since there is no ROCm Device Library support for long double, demote them to double, and use the fp64 math functions. Differential Revision: https://reviews.llvm.org/D92130 --- clang/lib/Headers/__clang_hip_cmath.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Headers/__clang_hip_cmath.h b/clang/lib/Headers/__clang_hip_cmath.h index 00519a9..3a70258 100644 --- a/clang/lib/Headers/__clang_hip_cmath.h +++ b/clang/lib/Headers/__clang_hip_cmath.h @@ -224,6 +224,8 @@ template struct __numeric_type { static double __test(long long); static double __test(unsigned long long); static double __test(double); + // No support for long double, use double instead. + static double __test(long double); typedef decltype(__test(std::declval<_Tp>())) type; static const bool value = !std::is_same::value; -- 2.7.4