14#include "./InternalHeaderCheck.h"
21template <
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT>
22class generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT,
23 swap_assign_op<typename DstEvaluatorTypeT::Scalar>, Specialized>
24 :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT,
25 swap_assign_op<typename DstEvaluatorTypeT::Scalar>, BuiltIn> {
27 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT,
28 swap_assign_op<typename DstEvaluatorTypeT::Scalar>, BuiltIn>
31 using Base::m_functor;
35 typedef typename Base::Scalar Scalar;
36 typedef typename Base::DstXprType DstXprType;
37 typedef swap_assign_op<Scalar> Functor;
39 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE generic_dense_assignment_kernel(DstEvaluatorTypeT &dst,
40 const SrcEvaluatorTypeT &src,
41 const Functor &func, DstXprType &dstExpr)
42 : Base(dst, src, func, dstExpr) {}
44 template <
int StoreMode,
int LoadMode,
typename PacketType>
45 EIGEN_STRONG_INLINE
void assignPacket(
Index row,
Index col) {
46 PacketType tmp = m_src.template packet<LoadMode, PacketType>(row, col);
47 const_cast<SrcEvaluatorTypeT &
>(m_src).
template writePacket<LoadMode>(
48 row, col, m_dst.template packet<StoreMode, PacketType>(row, col));
49 m_dst.template writePacket<StoreMode>(row, col, tmp);
52 template <
int StoreMode,
int LoadMode,
typename PacketType>
53 EIGEN_STRONG_INLINE
void assignPacket(
Index index) {
54 PacketType tmp = m_src.template packet<LoadMode, PacketType>(index);
55 const_cast<SrcEvaluatorTypeT &
>(m_src).
template writePacket<LoadMode>(
56 index, m_dst.template packet<StoreMode, PacketType>(index));
57 m_dst.template writePacket<StoreMode>(index, tmp);
62 template <
int StoreMode,
int LoadMode,
typename PacketType>
63 EIGEN_STRONG_INLINE
void assignPacketByOuterInner(
Index outer,
Index inner) {
64 Index row = Base::rowIndexByOuterInner(outer, inner);
65 Index col = Base::colIndexByOuterInner(outer, inner);
66 assignPacket<StoreMode, LoadMode, PacketType>(row, col);
69 template <
int StoreMode,
int LoadMode,
typename PacketType>
71 PacketType tmp = m_src.template packetSegment<LoadMode, PacketType>(row, col, begin, count);
72 const_cast<SrcEvaluatorTypeT &
>(m_src).
template writePacketSegment<LoadMode>(
73 row, col, m_dst.template packetSegment<StoreMode, PacketType>(row, col, begin, count), begin, count);
74 m_dst.template writePacketSegment<StoreMode>(row, col, tmp, begin, count);
77 template <
int StoreMode,
int LoadMode,
typename PacketType>
78 EIGEN_STRONG_INLINE
void assignPacketSegment(
Index index,
Index begin,
Index count) {
79 PacketType tmp = m_src.template packetSegment<LoadMode, PacketType>(index, begin, count);
80 const_cast<SrcEvaluatorTypeT &
>(m_src).
template writePacketSegment<LoadMode>(
81 index, m_dst.template packetSegment<StoreMode, PacketType>(index, begin, count), begin, count);
82 m_dst.template writePacketSegment<StoreMode>(index, tmp, begin, count);
87 template <
int StoreMode,
int LoadMode,
typename PacketType>
88 EIGEN_STRONG_INLINE
void assignPacketSegmentByOuterInner(
Index outer,
Index inner,
Index begin,
Index count) {
89 Index row = Base::rowIndexByOuterInner(outer, inner);
90 Index col = Base::colIndexByOuterInner(outer, inner);
91 assignPacketSegment<StoreMode, LoadMode, PacketType>(row, col, begin, count);
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82