10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H 24 template<
typename LhsXprType,
typename RhsXprType>
27 typedef typename LhsXprType::Scalar
Scalar;
43 template<
typename LhsXprType,
typename RhsXprType>
49 template<
typename LhsXprType,
typename RhsXprType>
59 template<
typename LhsXprType,
typename RhsXprType>
71 : m_lhs_xpr(lhs), m_rhs_xpr(rhs) {}
88 template<
typename LeftArgType,
typename RightArgType,
typename Device>
107 m_leftImpl(op.lhsExpression(), device),
108 m_rightImpl(op.rhsExpression(), device)
118 return m_rightImpl.dimensions();
123 m_leftImpl.evalSubExprsIfNeeded(NULL);
128 return m_rightImpl.evalSubExprsIfNeeded(m_leftImpl.data());
131 m_leftImpl.cleanup();
132 m_rightImpl.cleanup();
136 m_leftImpl.coeffRef(i) = m_rightImpl.coeff(i);
141 m_leftImpl.template writePacket<LhsStoreMode>(i, m_rightImpl.template packet<RhsLoadMode>(i));
143 EIGEN_DEVICE_FUNC CoeffReturnType
coeff(Index index)
const 145 return m_leftImpl.coeff(index);
147 template<
int LoadMode>
148 EIGEN_DEVICE_FUNC PacketReturnType
packet(Index index)
const 150 return m_leftImpl.template packet<LoadMode>(index);
158 TensorOpCost left = m_leftImpl.costPerCoeff(vectorized);
159 return m_rightImpl.costPerCoeff(vectorized) +
161 numext::maxi(0.0, left.
bytes_loaded() -
sizeof(CoeffReturnType)),
163 TensorOpCost(0,
sizeof(CoeffReturnType), 0, vectorized, PacketSize);
171 EIGEN_DEVICE_FUNC CoeffReturnType*
data()
const {
return m_leftImpl.data(); }
181 #endif // EIGEN_CXX11_TENSOR_TENSOR_ASSIGN_H LhsXprType::CoeffReturnType CoeffReturnType
TensorAssignOp< LhsXprType, RhsXprType > type
const TensorEvaluator< RightArgType, Device > & right_impl() const
required by sycl in order to extract the accessor
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const
TensorEvaluator< RightArgType, Device >::Dimensions Dimensions
EIGEN_DEVICE_FUNC internal::remove_all< typename LhsXprType::Nested >::type & lhsExpression() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bytes_loaded() const
Eigen::NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void cleanup()
EIGEN_DEVICE_FUNC CoeffReturnType * data() const
const TensorAssignOp< LhsXprType, RhsXprType > & type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double compute_cycles() const
remove_reference< LhsNested >::type _LhsNested
TensorEvaluator< LeftArgType, Device > m_leftImpl
A cost model used to limit the number of threads used for evaluating tensor expression.
const TensorEvaluator< LeftArgType, Device > & left_impl() const
required by sycl in order to extract the accessor
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Eigen::internal::nested< TensorAssignOp >::type Nested
remove_reference< RhsNested >::type _RhsNested
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorAssignOp(LhsXprType &lhs, const RhsXprType &rhs)
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(Scalar *)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Eigen::internal::traits< TensorAssignOp >::StorageKind StorageKind
internal::remove_all< typename LhsXprType::Nested >::type & m_lhs_xpr
const internal::remove_all< typename RhsXprType::Nested >::type & m_rhs_xpr
LhsXprType::Scalar Scalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE double bytes_stored() const
promote_index_type< typename traits< LhsXprType >::Index, typename traits< RhsXprType >::Index >::type Index
TensorAssignOp< LeftArgType, RightArgType > XprType
EIGEN_DEVICE_FUNC bool dimensions_match(Dims1 &dims1, Dims2 &dims2)
Eigen::internal::traits< TensorAssignOp >::Index Index
TensorEvaluator< RightArgType, Device > m_rightImpl
PacketType< CoeffReturnType, Device >::type PacketReturnType
traits< LhsXprType >::StorageKind StorageKind
LhsXprType::Nested LhsNested
EIGEN_DEVICE_FUNC const internal::remove_all< typename RhsXprType::Nested >::type & rhsExpression() const
Eigen::internal::traits< TensorAssignOp >::Scalar Scalar
RhsXprType::Nested RhsNested
internal::packet_traits< Scalar >::type type
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
EIGEN_DEVICE_FUNC TensorEvaluator(const XprType &op, const Device &device)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalPacket(Index i)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalScalar(Index i)