summaryrefslogtreecommitdiff
path: root/debian/patches/cuda-float128.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/cuda-float128.diff')
-rw-r--r--debian/patches/cuda-float128.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/patches/cuda-float128.diff b/debian/patches/cuda-float128.diff
new file mode 100644
index 0000000..7ac4c73
--- /dev/null
+++ b/debian/patches/cuda-float128.diff
@@ -0,0 +1,24 @@
+# Mask __float128 types from CUDA compilers (LP: #1717257)
+
+--- a/src/libstdc++-v3/include/std/type_traits
++++ b/src/libstdc++-v3/include/std/type_traits
+@@ -341,7 +341,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ struct __is_floating_point_helper<long double>
+ : public true_type { };
+
+-#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 { };
+--- a/src/libstdc++-v3/include/bits/std_abs.h
++++ b/src/libstdc++-v3/include/bits/std_abs.h
+@@ -97,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ abs(__GLIBCXX_TYPE_INT_N_3 __x) { return __x >= 0 ? __x : -__x; }
+ #endif
+
+-#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128)
++#if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_FLOAT128) && !defined(__CUDACC__)
+ inline _GLIBCXX_CONSTEXPR
+ __float128
+ abs(__float128 __x)