diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index dfc651908..408f76b1a 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -349,6 +349,7 @@ struct hypot_retval template struct cast_impl { + EIGEN_DEVICE_FUNC static inline NewType run(const OldType& x) { return static_cast(x); @@ -360,6 +361,7 @@ struct cast_impl template inline NewType cast(const OldType& x) { + EIGEN_DEVICE_FUNC return cast_impl::run(x); }