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).
This commit is contained in:
Antonio Sanchez 2021-01-11 09:15:45 -08:00
parent 2a6addb4f9
commit 587fd6ab70

View File

@ -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