aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-06-30 15:48:55 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-06-30 15:48:55 -0700
commit44eedd89159d75b319bc714775b58bb54eb92927 (patch)
treecdb57525608cd05a2a9ccd42d575b3dc9ed4eb41
parent6021b68d8bfa7a6e1e2fe6cc275054b8278a347e (diff)
Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs
-rw-r--r--Eigen/src/Core/MathFunctions.h2
1 files changed, 2 insertions, 0 deletions
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<typename OldType, typename NewType>
struct cast_impl
{
+ EIGEN_DEVICE_FUNC
static inline NewType run(const OldType& x)
{
return static_cast<NewType>(x);
@@ -360,6 +361,7 @@ struct cast_impl
template<typename OldType, typename NewType>
inline NewType cast(const OldType& x)
{
+ EIGEN_DEVICE_FUNC
return cast_impl<OldType, NewType>::run(x);
}