aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Antonio Sanchez <cantonios@google.com>2021-01-11 09:15:45 -0800
committerGravatar Antonio Sanchez <cantonios@google.com>2021-01-11 09:15:45 -0800
commit587fd6ab707b0743f48593e401eb546d709eca4d (patch)
treece6d63f75e3e7034b9bc61f8b0d3bd1dc183a4dc /Eigen
parent2a6addb4f931eb4256804486aa679fd007cb2fff (diff)
Only specialize complex `sqrt_impl` for CUDA if not MSVC.
We already specialize `sqrt_impl` on windows due to MSVC's mishandling of `inf` (!355).
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/arch/CUDA/Complex.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/CUDA/Complex.h b/Eigen/src/Core/arch/CUDA/Complex.h
index ab0207cac..df5a3c2a4 100644
--- a/Eigen/src/Core/arch/CUDA/Complex.h
+++ b/Eigen/src/Core/arch/CUDA/Complex.h
@@ -94,6 +94,8 @@ template<typename T> struct scalar_quotient_op<const std::complex<T>, const std:
template<typename T> struct scalar_quotient_op<std::complex<T>, std::complex<T> > : scalar_quotient_op<const std::complex<T>, const std::complex<T> > {};
+// Complex sqrt is already specialized on Windows.
+#if EIGEN_COMP_MSVC == 0
template<typename T>
struct sqrt_impl<std::complex<T> >
{
@@ -103,6 +105,7 @@ struct sqrt_impl<std::complex<T> >
return complex_sqrt<T>(x);
}
};
+#endif
} // namespace internal
} // namespace Eigen