10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H 23 template<
typename XprType,
template <
class>
class MakePointer_>
31 typedef typename XprType::Nested
Nested;
33 static const int NumDimensions = XprTraits::NumDimensions;
34 static const int Layout = XprTraits::Layout;
47 template<
typename XprType,
template <
class>
class MakePointer_>
53 template<
typename XprType,
template <
class>
class MakePointer_>
64 template<
typename XprType,
template <
class>
class MakePointer_>
77 : m_xpr(expr), m_buffer(buffer) {}
83 EIGEN_DEVICE_FUNC PointerType
buffer()
const {
return m_buffer; }
92 template<
typename ArgType,
typename Device,
template <
class>
class MakePointer_>
112 : m_impl(op.expression(), device), m_device(device),
113 m_buffer(op.
buffer()), m_op(op), m_expression(op.expression())
125 EIGEN_DEVICE_FUNC
const Dimensions&
dimensions()
const {
return m_impl.dimensions(); }
130 return m_impl.evalSubExprsIfNeeded(m_buffer);
134 m_buffer[
i] = m_impl.coeff(i);
137 internal::pstoret<CoeffReturnType, PacketReturnType, Aligned>(m_buffer +
i, m_impl.template packet<TensorEvaluator<ArgType, Device>::IsAligned ?
Aligned :
Unaligned>(
i));
146 return m_buffer[index];
149 template<
int LoadMode>
152 return internal::ploadt<PacketReturnType, LoadMode>(m_buffer + index);
158 return m_impl.costPerCoeff(vectorized) +
159 TensorOpCost(0,
sizeof(CoeffReturnType), 0, vectorized, PacketSize);
162 EIGEN_DEVICE_FUNC DevicePointer
data()
const {
return m_buffer; }
168 const Device&
device()
const{
return m_device;}
181 #endif // EIGEN_CXX11_TENSOR_TENSOR_EVAL_TO_H const Device & device() const
added for sycl in order to construct the buffer from the sycl device
EIGEN_DEVICE_FUNC const internal::remove_all< typename XprType::Nested >::type & expression() const
traits< XprType > XprTraits
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC DevicePointer data() const
const TensorEvaluator< ArgType, Device > & impl() const
required by sycl in order to extract the accessor
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalPacket(Index i)
Namespace containing all symbols from the Eigen library.
A cost model used to limit the number of threads used for evaluating tensor expression.
XprTraits::StorageKind StorageKind
TensorEvaluator< ArgType, Device > m_impl
PacketType< CoeffReturnType, Device >::type PacketReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(DevicePointer scalar)
Eigen::internal::traits< TensorEvalToOp >::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
TensorEvalToOp< XprType, MakePointer_ > type
Eigen::internal::nested< TensorEvalToOp >::type Nested
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvalToOp(PointerType buffer, const XprType &expr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const XprType & op() const
Eigen::internal::traits< TensorEvalToOp >::Index Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
ArgType expression() const
const TensorEvalToOp< XprType, MakePointer_ > & type
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
MakePointer_< CoeffReturnType >::Type PointerType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~TensorEvaluator()
TensorEvalToOp< ArgType, MakePointer_ > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
remove_reference< Nested >::type _Nested
EIGEN_DEVICE_FUNC PointerType buffer() const
internal::remove_const< typename XprType::CoeffReturnType >::type CoeffReturnType
Eigen::internal::traits< TensorEvalToOp >::StorageKind StorageKind
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Eigen::NumTraits< Scalar >::Real RealScalar
const ArgType m_expression
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalScalar(Index i)
mxArray * scalar(mxClassID classid)
internal::remove_const< typename XprType::CoeffReturnType >::type CoeffReturnType
MakePointer_< T > MakePointerT
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
#define EIGEN_UNUSED_VARIABLE(var)
internal::traits< const TensorEvalToOp< ArgType, MakePointer_ > >::template MakePointer< CoeffReturnType >::Type DevicePointer