From 44eedd89159d75b319bc714775b58bb54eb92927 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Tue, 30 Jun 2015 15:48:55 -0700 Subject: [PATCH] Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs --- Eigen/src/Core/MathFunctions.h | 2 ++ 1 file changed, 2 insertions(+) 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); }