summaryrefslogtreecommitdiffstats
path: root/debian/patches/cuda-float128.diff
blob: 6e7c22f1c0f03e3734bba1ae98720e295878f90f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Mask __float128 types from CUDA compilers (LP: #1717257)

Index: b/src/libstdc++-v3/include/std/type_traits
===================================================================
--- a/src/libstdc++-v3/include/std/type_traits
+++ b/src/libstdc++-v3/include/std/type_traits
@@ -489,7 +489,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     : public true_type { };
 #endif
 
-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
   template<>
     struct __is_floating_point_helper<__float128>
     : public true_type { };
Index: b/src/libstdc++-v3/include/bits/std_abs.h
===================================================================
--- a/src/libstdc++-v3/include/bits/std_abs.h
+++ b/src/libstdc++-v3/include/bits/std_abs.h
@@ -131,7 +131,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   { return __gnu_cxx::__bfloat16_t(__builtin_fabsf(__x)); }
 #endif
 
-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
   __extension__ inline _GLIBCXX_CONSTEXPR
   __float128
   abs(__float128 __x)
Index: b/src/libstdc++-v3/include/bits/stl_algobase.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_algobase.h
+++ b/src/libstdc++-v3/include/bits/stl_algobase.h
@@ -1052,7 +1052,7 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
   __size_to_integer(double __n) { return (long long)__n; }
   inline _GLIBCXX_CONSTEXPR long long
   __size_to_integer(long double __n) { return (long long)__n; }
-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
   __extension__ inline _GLIBCXX_CONSTEXPR long long
   __size_to_integer(__float128 __n) { return (long long)__n; }
 #endif
Index: b/src/libstdc++-v3/include/std/numbers
===================================================================
--- a/src/libstdc++-v3/include/std/numbers
+++ b/src/libstdc++-v3/include/std/numbers
@@ -219,7 +219,7 @@ __glibcxx_numbers (_Float128, F128);
 __glibcxx_numbers (__gnu_cxx::__bfloat16_t, BF16);
 #endif
 
-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
+#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
 __glibcxx_numbers (__float128, Q);
 #endif // USE_FLOAT128