Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs

This commit is contained in:
Benoit Steiner 2015-06-30 15:48:55 -07:00
parent 6021b68d8b
commit 44eedd8915

View File

@ -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);
}