From 587fd6ab707b0743f48593e401eb546d709eca4d Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Mon, 11 Jan 2021 09:15:45 -0800 Subject: [PATCH] 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). --- Eigen/src/Core/arch/CUDA/Complex.h | 3 +++ 1 file changed, 3 insertions(+) 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 struct scalar_quotient_op, const std: template struct scalar_quotient_op, std::complex > : scalar_quotient_op, const std::complex > {}; +// Complex sqrt is already specialized on Windows. +#if EIGEN_COMP_MSVC == 0 template struct sqrt_impl > { @@ -103,6 +105,7 @@ struct sqrt_impl > return complex_sqrt(x); } }; +#endif } // namespace internal } // namespace Eigen