13 #ifndef EIGEN_COREEVALUATORS_H 14 #define EIGEN_COREEVALUATORS_H 22 template<
typename StorageKind>
83 template<typename T, typename Shape = typename evaluator_traits<T>::Shape >
85 static const bool value =
false;
109 template<
typename ExpressionType>
141 #ifndef EIGEN_INTERNAL_DEBUGGING 162 template<
typename Derived>
171 IsRowMajor = PlainObjectType::IsRowMajor,
172 IsVectorAtCompileTime = PlainObjectType::IsVectorAtCompileTime,
173 RowsAtCompileTime = PlainObjectType::RowsAtCompileTime,
174 ColsAtCompileTime = PlainObjectType::ColsAtCompileTime,
182 OuterStrideAtCompileTime = IsVectorAtCompileTime ? 0
183 :
int(IsRowMajor) ? ColsAtCompileTime
189 : m_d(0,OuterStrideAtCompileTime)
196 : m_d(m.
data(),IsVectorAtCompileTime ? 0 : m.outerStride())
205 return m_d.data[row * m_d.outerStride() +
col];
207 return m_d.data[row + col * m_d.outerStride()];
213 return m_d.data[index];
220 return const_cast<Scalar*
>(m_d.data)[row * m_d.outerStride() +
col];
222 return const_cast<Scalar*
>(m_d.data)[row + col * m_d.outerStride()];
228 return const_cast<Scalar*
>(m_d.data)[index];
231 template<
int LoadMode,
typename PacketType>
236 return ploadt<PacketType, LoadMode>(m_d.data + row * m_d.outerStride() +
col);
238 return ploadt<PacketType, LoadMode>(m_d.data + row + col * m_d.outerStride());
241 template<
int LoadMode,
typename PacketType>
245 return ploadt<PacketType, LoadMode>(m_d.data + index);
248 template<
int StoreMode,
typename PacketType>
253 return pstoret<Scalar, PacketType, StoreMode>
254 (
const_cast<Scalar*
>(m_d.data) + row * m_d.outerStride() +
col,
x);
256 return pstoret<Scalar, PacketType, StoreMode>
257 (
const_cast<Scalar*
>(m_d.data) + row + col * m_d.outerStride(),
x);
260 template<
int StoreMode,
typename PacketType>
264 return pstoret<Scalar, PacketType, StoreMode>(
const_cast<Scalar*
>(m_d.data) + index, x);
272 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
274 :
evaluator<PlainObjectBase<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >
287 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
289 :
evaluator<PlainObjectBase<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >
304 template<
typename ArgType>
325 return m_argImpl.coeff(col, row);
331 return m_argImpl.coeff(index);
337 return m_argImpl.coeffRef(col, row);
343 return m_argImpl.coeffRef(index);
346 template<
int LoadMode,
typename PacketType>
350 return m_argImpl.template packet<LoadMode,PacketType>(
col,
row);
353 template<
int LoadMode,
typename PacketType>
357 return m_argImpl.template packet<LoadMode,PacketType>(index);
360 template<
int StoreMode,
typename PacketType>
364 m_argImpl.template writePacket<StoreMode,PacketType>(
col,
row,
x);
367 template<
int StoreMode,
typename PacketType>
371 m_argImpl.template writePacket<StoreMode,PacketType>(index,
x);
382 template<
typename Scalar,
typename NullaryOp,
388 template <
typename IndexType>
390 template <
typename IndexType>
397 template<
typename Scalar,
typename NullaryOp>
400 template <
typename IndexType>
405 template<
typename Scalar,
typename NullaryOp>
408 template <
typename IndexType>
416 template<
typename Scalar,
typename NullaryOp>
419 template <
typename IndexType>
426 return op.template packetOp<T>(i+
j);
429 template <
typename IndexType>
431 template <
typename T,
typename IndexType>
435 template<
typename Scalar,
typename NullaryOp>
438 #if 0 && EIGEN_COMP_MSVC>0 456 template<
typename T>
struct nullary_wrapper_workaround_msvc {
457 nullary_wrapper_workaround_msvc(
const T&);
461 template<
typename Scalar,
typename NullaryOp>
464 template <
typename IndexType>
471 template <
typename IndexType>
479 template <
typename T,
typename IndexType>
486 template <
typename T,
typename IndexType>
494 #endif // MSVC workaround 496 template<
typename NullaryOp,
typename PlainObjectType>
515 : m_functor(n.functor()), m_wrapper()
522 template <
typename IndexType>
526 return m_wrapper(m_functor, row, col);
529 template <
typename IndexType>
531 CoeffReturnType
coeff(IndexType index)
const 533 return m_wrapper(m_functor,index);
536 template<
int LoadMode,
typename PacketType,
typename IndexType>
540 return m_wrapper.template packetOp<PacketType>(m_functor,
row,
col);
543 template<
int LoadMode,
typename PacketType,
typename IndexType>
547 return m_wrapper.template packetOp<PacketType>(m_functor, index);
557 template<
typename UnaryOp,
typename ArgType>
583 return m_d.func()(m_d.argImpl.coeff(row, col));
589 return m_d.func()(m_d.argImpl.coeff(index));
592 template<
int LoadMode,
typename PacketType>
596 return m_d.func().packetOp(m_d.argImpl.template packet<LoadMode, PacketType>(row, col));
599 template<
int LoadMode,
typename PacketType>
603 return m_d.func().packetOp(m_d.argImpl.template packet<LoadMode, PacketType>(index));
612 Data(
const XprType& xpr) : op(xpr.functor()), argImpl(xpr.nestedExpression()) {}
614 const UnaryOp&
func()
const {
return op; }
625 template<
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
635 template<
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
649 Flags0 = (
int(Arg1Flags) |
int(Arg2Flags) |
int(Arg3Flags)) & (
651 | (
int(Arg1Flags) &
int(Arg2Flags) &
int(Arg3Flags) &
674 return m_d.func()(m_d.arg1Impl.coeff(row, col), m_d.arg2Impl.coeff(row, col), m_d.arg3Impl.coeff(row, col));
680 return m_d.func()(m_d.arg1Impl.coeff(index), m_d.arg2Impl.coeff(index), m_d.arg3Impl.coeff(index));
683 template<
int LoadMode,
typename PacketType>
687 return m_d.func().packetOp(m_d.arg1Impl.template packet<LoadMode,PacketType>(row, col),
688 m_d.arg2Impl.template packet<LoadMode,PacketType>(row, col),
689 m_d.arg3Impl.template packet<LoadMode,PacketType>(row, col));
692 template<
int LoadMode,
typename PacketType>
696 return m_d.func().packetOp(m_d.arg1Impl.template packet<LoadMode,PacketType>(index),
697 m_d.arg2Impl.template packet<LoadMode,PacketType>(index),
698 m_d.arg3Impl.template packet<LoadMode,PacketType>(index));
706 Data(
const XprType& xpr) : op(xpr.functor()), arg1Impl(xpr.arg1()), arg2Impl(xpr.arg2()), arg3Impl(xpr.arg3()) {}
708 const TernaryOp&
func()
const {
return op; }
721 template<
typename BinaryOp,
typename Lhs,
typename Rhs>
732 template<
typename BinaryOp,
typename Lhs,
typename Rhs>
745 Flags0 = (
int(LhsFlags) |
int(RhsFlags)) & (
747 | (
int(LhsFlags) &
int(RhsFlags) &
748 ( (StorageOrdersAgree ? LinearAccessBit : 0)
769 return m_d.func()(m_d.lhsImpl.coeff(row, col), m_d.rhsImpl.coeff(row, col));
775 return m_d.func()(m_d.lhsImpl.coeff(index), m_d.rhsImpl.coeff(index));
778 template<
int LoadMode,
typename PacketType>
782 return m_d.func().packetOp(m_d.lhsImpl.template packet<LoadMode,PacketType>(row, col),
783 m_d.rhsImpl.template packet<LoadMode,PacketType>(row, col));
786 template<
int LoadMode,
typename PacketType>
790 return m_d.func().packetOp(m_d.lhsImpl.template packet<LoadMode,PacketType>(index),
791 m_d.rhsImpl.template packet<LoadMode,PacketType>(index));
800 Data(
const XprType& xpr) : op(xpr.functor()), lhsImpl(xpr.lhs()), rhsImpl(xpr.rhs()) {}
802 const BinaryOp&
func()
const {
return op; }
813 template<
typename UnaryOp,
typename ArgType>
839 return m_d.func()(m_d.argImpl.coeff(row, col));
845 return m_d.func()(m_d.argImpl.coeff(index));
851 return m_d.func()(m_d.argImpl.coeffRef(row, col));
857 return m_d.func()(m_d.argImpl.coeffRef(index));
866 Data(
const XprType& xpr) : op(xpr.functor()), argImpl(xpr.nestedExpression()) {}
868 const UnaryOp&
func()
const {
return op; }
880 template<
typename Derived,
typename PlainObjectType>
883 template<
typename Derived,
typename PlainObjectType>
892 IsRowMajor = XprType::RowsAtCompileTime,
893 ColsAtCompileTime = XprType::ColsAtCompileTime,
899 : m_data(const_cast<PointerType>(map.
data())),
900 m_innerStride(map.innerStride()),
901 m_outerStride(map.outerStride())
904 PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);
911 return m_data[col * colStride() + row * rowStride()];
917 return m_data[index * m_innerStride.value()];
923 return m_data[col * colStride() + row * rowStride()];
929 return m_data[index * m_innerStride.value()];
932 template<
int LoadMode,
typename PacketType>
936 PointerType ptr = m_data + row * rowStride() + col * colStride();
937 return internal::ploadt<PacketType, LoadMode>(ptr);
940 template<
int LoadMode,
typename PacketType>
944 return internal::ploadt<PacketType, LoadMode>(m_data + index * m_innerStride.value());
947 template<
int StoreMode,
typename PacketType>
951 PointerType ptr = m_data + row * rowStride() + col * colStride();
952 return internal::pstoret<Scalar, PacketType, StoreMode>(ptr,
x);
955 template<
int StoreMode,
typename PacketType>
959 internal::pstoret<Scalar, PacketType, StoreMode>(m_data + index * m_innerStride.value(),
x);
964 return XprType::IsRowMajor ? m_outerStride.value() : m_innerStride.value();
968 return XprType::IsRowMajor ? m_innerStride.value() : m_outerStride.value();
976 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
978 :
public mapbase_evaluator<Map<PlainObjectType, MapOptions, StrideType>, PlainObjectType>
986 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
987 ?
int(PlainObjectType::InnerStrideAtCompileTime)
988 :
int(StrideType::InnerStrideAtCompileTime),
989 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
990 ?
int(PlainObjectType::OuterStrideAtCompileTime)
991 :
int(StrideType::OuterStrideAtCompileTime),
992 HasNoInnerStride = InnerStrideAtCompileTime == 1,
993 HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
994 HasNoStride = HasNoInnerStride && HasNoOuterStride,
995 IsDynamicSize = PlainObjectType::SizeAtCompileTime==
Dynamic,
997 PacketAccessMask = bool(HasNoInnerStride) ? ~
int(0) : ~
int(PacketAccessBit),
998 LinearAccessMask = bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime) ? ~
int(0) : ~
int(LinearAccessBit),
999 Flags =
int(
evaluator<PlainObjectType>::Flags) & (LinearAccessMask&PacketAccessMask),
1011 template<
typename PlainObjectType,
int RefOptions,
typename Str
ideType>
1013 :
public mapbase_evaluator<Ref<PlainObjectType, RefOptions, StrideType>, PlainObjectType>
1030 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel,
1033 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1051 IsRowMajor = (MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1) ? 1
1052 : (MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1) ? 0
1053 : ArgTypeIsRowMajor,
1054 HasSameStorageOrderAsArgType = (IsRowMajor == ArgTypeIsRowMajor),
1055 InnerSize = IsRowMajor ?
int(ColsAtCompileTime) : int(RowsAtCompileTime),
1056 InnerStrideAtCompileTime = HasSameStorageOrderAsArgType
1059 OuterStrideAtCompileTime = HasSameStorageOrderAsArgType
1062 MaskPacketAccessBit = (InnerStrideAtCompileTime == 1 || HasSameStorageOrderAsArgType) ? PacketAccessBit : 0,
1064 FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1 || (InnerPanel && (
evaluator<ArgType>::Flags&LinearAccessBit))) ? LinearAccessBit : 0,
1068 MaskPacketAccessBit),
1069 Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit,
1072 Alignment0 = (InnerPanel && (OuterStrideAtCompileTime!=
Dynamic)
1073 && (OuterStrideAtCompileTime!=0)
1074 && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % int(PacketAlignment)) == 0)) ? int(PacketAlignment) : 0,
1086 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1098 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1100 :
evaluator_base<Block<ArgType, BlockRows, BlockCols, InnerPanel> >
1106 : m_argImpl(block.nestedExpression()),
1107 m_startRow(block.startRow()),
1108 m_startCol(block.startCol()),
1109 m_linear_offset(ForwardLinearAccess?(ArgType::IsRowMajor ? block.startRow()*block.nestedExpression().
cols() + block.startCol() : block.startCol()*block.nestedExpression().
rows() + block.startRow()):0)
1116 RowsAtCompileTime = XprType::RowsAtCompileTime,
1123 return m_argImpl.coeff(m_startRow.value() +
row, m_startCol.value() +
col);
1135 return m_argImpl.coeffRef(m_startRow.value() +
row, m_startCol.value() +
col);
1144 template<
int LoadMode,
typename PacketType>
1148 return m_argImpl.template packet<LoadMode,PacketType>(m_startRow.value() +
row, m_startCol.value() +
col);
1151 template<
int LoadMode,
typename PacketType>
1155 if (ForwardLinearAccess)
1156 return m_argImpl.template packet<LoadMode,PacketType>(m_linear_offset.value() + index);
1158 return packet<LoadMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,
1159 RowsAtCompileTime == 1 ? index : 0);
1162 template<
int StoreMode,
typename PacketType>
1166 return m_argImpl.template writePacket<StoreMode,PacketType>(m_startRow.value() +
row, m_startCol.value() +
col,
x);
1169 template<
int StoreMode,
typename PacketType>
1173 if (ForwardLinearAccess)
1174 return m_argImpl.template writePacket<StoreMode,PacketType>(m_linear_offset.value() + index,
x);
1176 return writePacket<StoreMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,
1177 RowsAtCompileTime == 1 ? index : 0,
1185 return m_argImpl.coeff(m_linear_offset.value() + index);
1190 return coeff(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);
1196 return m_argImpl.coeffRef(m_linear_offset.value() + index);
1201 return coeffRef(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);
1213 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1216 typename Block<ArgType, BlockRows, BlockCols, InnerPanel>::PlainObject>
1235 template<
typename ConditionMatrixType,
typename ThenMatrixType,
typename ElseMatrixType>
1237 :
evaluator_base<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
1252 : m_conditionImpl(select.conditionMatrix()),
1253 m_thenImpl(select.thenMatrix()),
1254 m_elseImpl(select.elseMatrix())
1264 if (m_conditionImpl.coeff(row, col))
1265 return m_thenImpl.coeff(row, col);
1267 return m_elseImpl.coeff(row, col);
1273 if (m_conditionImpl.coeff(index))
1274 return m_thenImpl.coeff(index);
1276 return m_elseImpl.coeff(index);
1288 template<
typename ArgType,
int RowFactor,
int ColFactor>
1310 : m_arg(replicate.nestedExpression()),
1312 m_rows(replicate.nestedExpression().
rows()),
1313 m_cols(replicate.nestedExpression().
cols())
1321 : RowFactor==1 ?
row 1322 : row % m_rows.value();
1324 : ColFactor==1 ?
col 1325 : col % m_cols.value();
1327 return m_argImpl.coeff(actual_row, actual_col);
1335 ? (ColFactor==1 ? index : index%m_cols.value())
1336 : (RowFactor==1 ? index : index%m_rows.value());
1338 return m_argImpl.coeff(actual_index);
1341 template<
int LoadMode,
typename PacketType>
1346 : RowFactor==1 ?
row 1347 : row % m_rows.value();
1349 : ColFactor==1 ?
col 1350 : col % m_cols.value();
1352 return m_argImpl.template packet<LoadMode,PacketType>(actual_row, actual_col);
1355 template<
int LoadMode,
typename PacketType>
1360 ? (ColFactor==1 ? index : index%m_cols.value())
1361 : (RowFactor==1 ? index : index%m_rows.value());
1363 return m_argImpl.template packet<LoadMode,PacketType>(actual_index);
1378 template<
typename XprType>
1398 return m_argImpl.coeff(row, col);
1404 return m_argImpl.coeff(index);
1410 return m_argImpl.coeffRef(row, col);
1416 return m_argImpl.coeffRef(index);
1419 template<
int LoadMode,
typename PacketType>
1423 return m_argImpl.template packet<LoadMode,PacketType>(
row,
col);
1426 template<
int LoadMode,
typename PacketType>
1430 return m_argImpl.template packet<LoadMode,PacketType>(index);
1433 template<
int StoreMode,
typename PacketType>
1437 m_argImpl.template writePacket<StoreMode>(
row,
col,
x);
1440 template<
int StoreMode,
typename PacketType>
1444 m_argImpl.template writePacket<StoreMode>(index,
x);
1451 template<
typename TArgType>
1463 template<
typename TArgType>
1481 template<
typename ArgType,
int Direction>
1490 IsRowMajor = XprType::IsRowMajor,
1491 IsColMajor = !IsRowMajor,
1495 || ((Direction ==
Vertical) && IsColMajor)
1496 || ((Direction ==
Horizontal) && IsRowMajor),
1504 || ((ReverseRow && XprType::ColsAtCompileTime==1) || (ReverseCol && XprType::RowsAtCompileTime==1))
1505 ? LinearAccessBit : 0,
1514 : m_argImpl(reverse.nestedExpression()),
1515 m_rows(ReverseRow ? reverse.nestedExpression().
rows() : 1),
1516 m_cols(ReverseCol ? reverse.nestedExpression().
cols() : 1)
1522 return m_argImpl.coeff(ReverseRow ? m_rows.value() - row - 1 :
row,
1523 ReverseCol ? m_cols.value() - col - 1 :
col);
1529 return m_argImpl.coeff(m_rows.value() * m_cols.value() - index - 1);
1535 return m_argImpl.coeffRef(ReverseRow ? m_rows.value() - row - 1 :
row,
1536 ReverseCol ? m_cols.value() - col - 1 :
col);
1542 return m_argImpl.coeffRef(m_rows.value() * m_cols.value() - index - 1);
1545 template<
int LoadMode,
typename PacketType>
1551 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
1552 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1
1556 ReverseRow ? m_rows.value() - row - OffsetRow :
row,
1557 ReverseCol ? m_cols.value() - col - OffsetCol :
col));
1560 template<
int LoadMode,
typename PacketType>
1565 return preverse(m_argImpl.template packet<LoadMode,PacketType>(m_rows.value() * m_cols.value() - index - PacketSize));
1568 template<
int LoadMode,
typename PacketType>
1575 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
1576 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1
1579 m_argImpl.template writePacket<LoadMode>(
1580 ReverseRow ? m_rows.value() - row - OffsetRow :
row,
1581 ReverseCol ? m_cols.value() - col - OffsetCol :
col,
1585 template<
int LoadMode,
typename PacketType>
1590 m_argImpl.template writePacket<LoadMode>
1591 (m_rows.value() * m_cols.value() - index - PacketSize,
preverse(x));
1606 template<
typename ArgType,
int DiagIndex>
1622 : m_argImpl(diagonal.nestedExpression()),
1623 m_index(diagonal.index())
1632 return m_argImpl.coeff(row + rowOffset(), row + colOffset());
1638 return m_argImpl.coeff(index + rowOffset(), index + colOffset());
1644 return m_argImpl.coeffRef(row + rowOffset(), row + colOffset());
1650 return m_argImpl.coeffRef(index + rowOffset(), index + colOffset());
1675 template<
typename ArgType>
1680 template<
typename ArgType>
1700 return m_arg.rows();
1705 return m_arg.cols();
1712 template<
typename ArgType>
1714 :
public evaluator<typename ArgType::PlainObject>
1721 : m_result(xpr.
arg())
1723 ::new (static_cast<Base*>(
this)) Base(m_result);
1730 ::new (static_cast<Base*>(
this)) Base(m_result);
1741 #endif // EIGEN_COREEVALUATORS_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &t)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE plainobjectbase_evaluator_data(const Scalar *ptr, Index outerStride)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rowOffset() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &m)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
Generic expression of a matrix where all coefficients are defined by a functor.
CwiseNullaryOp< NullaryOp, PlainObjectType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE block_evaluator(const XprType &block)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &block)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &op)
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
internal::traits< Derived >::Scalar Scalar
storage_kind_to_evaluator_kind< typename traits< T >::StorageKind >::Kind Kind
CwiseUnaryView< UnaryOp, ArgType > XprType
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &diagonal)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
CwiseUnaryOp< UnaryOp, ArgType > XprType
Array< Scalar, Rows, Cols, Options, MaxRows, MaxCols > XprType
internal::remove_all< PlainObjectType >::type PlainObjectTypeCleaned
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
Expression of a mathematical vector or matrix as an array object.
m m block(1, 0, 2, 2)<< 4
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType=0, IndexType=0) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator_wrapper_base(const ArgType &arg)
EIGEN_STRONG_INLINE PacketType packet(IndexType index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
evaluator< ConditionMatrixType > m_conditionImpl
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
evaluator< ArgType > m_argImpl
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &wrapper)
evaluator< Arg2 > arg2Impl
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
plainobjectbase_evaluator_data< Scalar, OuterStrideAtCompileTime > m_d
evaluator< ElseMatrixType > m_elseImpl
ArrayWrapper< TArgType > XprType
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index) const
Transpose< ArgType > XprType
CwiseBinaryOp< BinaryOp, Lhs, Rhs > XprType
packet_traits< Scalar >::type PacketScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE binary_evaluator(const XprType &xpr)
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
A matrix or vector expression mapping an existing array of data.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &select)
XprType::CoeffReturnType CoeffReturnType
Expression of the transpose of a matrix.
const unsigned int DirectAccessBit
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rowStride() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
traits< ExpressionType > ExpressionTraits
void diagonal(const MatrixType &m)
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
evaluator< ThenMatrixType > m_thenImpl
const internal::variable_if_dynamic< Index, XprType::InnerStrideAtCompileTime > m_innerStride
#define EIGEN_PLAIN_ENUM_MAX(a, b)
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
XprType::CoeffReturnType CoeffReturnType
const internal::nullary_wrapper< CoeffReturnType, NullaryOp > m_wrapper
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
MatrixWrapper< TArgType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE XprType::Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
evaluator< ArgType > m_argImpl
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
const variable_if_dynamic< Index, ForwardLinearAccess ? Dynamic :0 > m_linear_offset
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const PlainObjectType &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TernaryOp & func() const
const variable_if_dynamic< Index, ArgType::RowsAtCompileTime > m_rows
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const UnaryOp & func() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
#define EIGEN_IMPLIES(a, b)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
evaluator< ArgType > m_argImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE block_evaluator(const XprType &block)
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &op)
XprType::CoeffReturnType CoeffReturnType
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
packet_traits< Scalar >::type PacketScalar
const unsigned int PacketAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & linear_coeffRef_impl(Index index, internal::true_type)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index outerStride() const EIGEN_NOEXCEPT
evaluator< ArgType > m_argImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &replicate)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index)
unary_evaluator< T > Base
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType &xpr)
EIGEN_DEVICE_FUNC evaluator(const XprType &n)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i) const
Generic lvalue expression of a coefficient-wise unary operator of a matrix or a vector.
Expression of an array as a mathematical vector or matrix.
evaluator< ArgTypeNestedCleaned > m_argImpl
const NullaryOp m_functor
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index colStride() const EIGEN_NOEXCEPT
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Generic expression where a coefficient-wise binary operator is applied to two expressions.
const unsigned int HereditaryBits
XprType::CoeffReturnType CoeffReturnType
XprType::CoeffReturnType CoeffReturnType
EIGEN_STRONG_INLINE PacketType packet(IndexType row, IndexType col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
void replicate(const MatrixType &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &ref)
block_evaluator< ArgType, BlockRows, BlockCols, InnerPanel > block_evaluator_type
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const BinaryOp & func() const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
evaluator< Arg1 > arg1Impl
EIGEN_STRONG_INLINE PacketType packet(Index index) const
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
EvalToTemp< ArgType > XprType
const variable_if_dynamic< Index, ReverseRow ? ArgType::RowsAtCompileTime :1 > m_rows
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
dense_xpr_base< EvalToTemp >::type Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR T value()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Eigen::Triplet< double > T
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(IndexType row, IndexType col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Expression of the multiple replication of a matrix or vector.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType linear_coeff_impl(Index index, internal::false_type) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType &xpr)
const internal::variable_if_dynamicindex< Index, XprType::DiagIndex > m_index
Ref< PlainObjectType, RefOptions, StrideType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const T &xpr)
PlainObjectType::CoeffReturnType CoeffReturnType
TranspositionsShape Shape
Replicate< ArgType, RowFactor, ColFactor > XprType
CwiseTernaryOp< TernaryOp, Arg1, Arg2, Arg3 > XprType
Map< PlainObjectType, MapOptions, StrideType > XprType
const variable_if_dynamic< Index, ArgType::ColsAtCompileTime > m_cols
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ~evaluator_base()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index colOffset() const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
const variable_if_dynamic< Index,(ArgType::RowsAtCompileTime==1 &&BlockRows==1) ? 0 :Dynamic > m_startRow
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Reference counting helper.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index outerStride() const
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
XprType::CoeffReturnType CoeffReturnType
Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
A matrix or vector expression mapping an existing expression.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i, IndexType j) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
binary_evaluator< CwiseBinaryOp< BinaryOp, Lhs, Rhs > > Base
ternary_evaluator< CwiseTernaryOp< TernaryOp, Arg1, Arg2, Arg3 > > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i) const
const internal::variable_if_dynamic< Index, XprType::OuterStrideAtCompileTime > m_outerStride
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &block)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator_base()
#define EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
ArgType::PlainObject PlainObject
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator()
evaluator< ArgType > argImpl
CwiseTernaryOp< TernaryOp, Arg1, Arg2, Arg3 > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
evaluator< ArgType > m_argImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &reverse)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType linear_coeff_impl(Index index, internal::true_type) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &wrapper)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Expression of a fixed-size or dynamic-size block.
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC ternary_evaluator(const XprType &xpr)
void reverse(const MatrixType &m)
#define EIGEN_PLAIN_ENUM_MIN(a, b)
PlainObjectBase< Derived > PlainObjectType
storage_kind_to_shape< typename traits< BandMatrixWrapper< _CoefficientsType, _Rows, _Cols, _Supers, _Subs, _Options > >::StorageKind >::Shape Shape
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType=0, IndexType=0) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Data(const XprType &xpr)
XprType::PointerType PointerType
evaluator< PlainObject > Base
evaluator< ArgType > argImpl
General-purpose arrays with easy API for coefficient-wise operations.
CwiseBinaryOp< BinaryOp, Lhs, Rhs > XprType
const ArgTypeNested m_arg
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const UnaryOp & func() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE mapbase_evaluator(const XprType &map)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j) const
XprType::CoeffReturnType CoeffReturnType
Diagonal< ArgType, DiagIndex > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(IndexType index) const
remove_all< typename XprType::NestedExpressionType >::type ArgType
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j=0) const
const variable_if_dynamic< Index,(ArgType::ColsAtCompileTime==1 &&BlockCols==1) ? 0 :Dynamic > m_startCol
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
EIGEN_DEVICE_FUNC evaluator(const XprType &map)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator()
const unsigned int EvalBeforeNestingBit
#define eigen_internal_assert(x)
const variable_if_dynamic< Index, ReverseCol ? ArgType::ColsAtCompileTime :1 > m_cols
XprType::CoeffReturnType CoeffReturnType
Generic expression where a coefficient-wise unary operator is applied to an expression.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
internal::nested_eval< ArgType, Factor >::type ArgTypeNested
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
The matrix class, also used for vectors and row-vectors.
const ArgType & arg() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const T &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
Expression of the reverse of a vector or matrix.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Reverse< ArgType, Direction > XprType
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC evaluator(const ArgType &arg)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & linear_coeffRef_impl(Index index, internal::false_type)
PlainObjectType::Scalar Scalar
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE plainobjectbase_evaluator_data(const Scalar *ptr, Index outerStride)
ArgType::CoeffReturnType CoeffReturnType
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i, IndexType j) const
evaluator< Arg3 > arg3Impl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
#define EIGEN_UNUSED_VARIABLE(var)
Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType > XprType
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i, IndexType j=0) const
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Expression of a coefficient wise version of the C++ ternary operator ?:
internal::remove_all< ArgTypeNested >::type ArgTypeNestedCleaned