diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 5b5ca46f6..f64116a41 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -339,7 +339,7 @@ struct sqrt_impl }; // Complex sqrt defined in MathFunctionsImpl.h. -template std::complex complex_sqrt(const std::complex& a_x); +template EIGEN_DEVICE_FUNC std::complex complex_sqrt(const std::complex& a_x); // MSVC incorrectly handles inf cases. #if EIGEN_COMP_MSVC > 0