mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Marked the cast functions as EIGEN_DEVICE_FUNC to ensure that we can run casting on GPUs
This commit is contained in:
parent
6021b68d8b
commit
44eedd8915
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user