10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H 16 template<
typename XprType,
template <
class>
class MakePointer_>
24 typedef typename XprType::Nested
Nested;
26 static const int NumDimensions = XprTraits::NumDimensions;
27 static const int Layout = XprTraits::Layout;
39 template<
typename XprType,
template <
class>
class MakePointer_>
45 template<
typename XprType,
template <
class>
class MakePointer_>
64 template<
typename XprType,
template <
class>
class MakePointer_>
93 template<
typename ArgType,
typename Device,
template <
class>
class MakePointer_>
106 PacketAccess = (PacketSize > 1),
113 : m_impl(op.expression(), device), m_op(op.expression()), m_device(device), m_buffer(
NULL)
116 EIGEN_DEVICE_FUNC
const Dimensions&
dimensions()
const {
return m_impl.dimensions(); }
120 m_buffer = (CoeffReturnType*)m_device.allocate(numValues *
sizeof(CoeffReturnType));
123 for (Index
i = 0;
i < numValues; ++
i) {
124 new(m_buffer+
i) CoeffReturnType();
128 EvalTo evalToTmp(m_buffer, m_op);
134 m_device.deallocate(m_buffer);
140 return m_buffer[index];
143 template<
int LoadMode>
146 return internal::ploadt<PacketReturnType, LoadMode>(m_buffer + index);
150 return TensorOpCost(
sizeof(CoeffReturnType), 0, 0, vectorized, PacketSize);
158 const Device&
device()
const{
return m_device;}
169 #endif // EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H Eigen::internal::nested< TensorForcedEvalOp >::type Nested
const TensorEvaluator< ArgType, Device > & impl()
required by sycl in order to extract the sycl accessor
const TensorForcedEvalOp< XprType, MakePointer_ > & type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
#define EIGEN_STRONG_INLINE
Eigen::internal::traits< TensorForcedEvalOp >::Index Index
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
TensorEvaluator< ArgType, Device > m_impl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Namespace containing all symbols from the Eigen library.
XprType::CoeffReturnType CoeffReturnType
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
A cost model used to limit the number of threads used for evaluating tensor expression.
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
TensorForcedEvalOp< ArgType, MakePointer_ > XprType
internal::remove_const< typename XprType::CoeffReturnType >::type CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
remove_reference< Nested >::type _Nested
EIGEN_DEVICE_FUNC TensorEvaluator(const XprType &op, const Device &device)
op_ is used for sycl
traits< XprType > XprTraits
EIGEN_DEVICE_FUNC MakePointer< Scalar >::Type data() const
Eigen::internal::traits< TensorForcedEvalOp >::StorageKind StorageKind
Eigen::internal::traits< TensorForcedEvalOp >::Scalar Scalar
PacketType< CoeffReturnType, Device >::type PacketReturnType
Eigen::NumTraits< Scalar >::Real RealScalar
MakePointer_< T > MakePointerT
MakePointer< CoeffReturnType >::Type m_buffer
const Device & device() const
used by sycl in order to build the sycl buffer
traits< XprType >::StorageKind StorageKind
void run(Expr &expr, Dev &dev)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(CoeffReturnType *)
EIGEN_DEVICE_FUNC const internal::remove_all< typename XprType::Nested >::type & expression() const
traits< XprType >::Index Index
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorForcedEvalOp(const XprType &expr)
TensorForcedEvalOp< XprType, MakePointer_ > type