Enable extract et. al. for HIP GPU.

(cherry picked from commit beea14a18f76817439b4d8901d29db2e9c4a24c8)
This commit is contained in:
Rohit Santhanam 2021-07-09 14:58:07 +00:00 committed by Antonio Sánchez
parent 56966fd2e6
commit 930696fc53

View File

@ -518,7 +518,7 @@ struct blas_traits<const T>
template<typename T, bool HasUsableDirectAccess=blas_traits<T>::HasUsableDirectAccess>
struct extract_data_selector {
static const typename T::Scalar* run(const T& m)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE static const typename T::Scalar* run(const T& m)
{
return blas_traits<T>::extract(m).data();
}
@ -529,7 +529,8 @@ struct extract_data_selector<T,false> {
static typename T::Scalar* run(const T&) { return 0; }
};
template<typename T> const typename T::Scalar* extract_data(const T& m)
template<typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const typename T::Scalar* extract_data(const T& m)
{
return extract_data_selector<T>::run(m);
}