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;
93 EIGEN_DEVICE_FUNC
explicit evaluator(
const T& xpr) : Base(xpr) {}
108 template<
typename ExpressionType>
126 template<
typename Derived>
135 IsRowMajor = PlainObjectType::IsRowMajor,
136 IsVectorAtCompileTime = PlainObjectType::IsVectorAtCompileTime,
137 RowsAtCompileTime = PlainObjectType::RowsAtCompileTime,
138 ColsAtCompileTime = PlainObjectType::ColsAtCompileTime,
147 m_outerStride(IsVectorAtCompileTime ? 0
148 : int(IsRowMajor) ? ColsAtCompileTime
154 EIGEN_DEVICE_FUNC
explicit evaluator(
const PlainObjectType& m)
155 : m_data(m.data()), m_outerStride(IsVectorAtCompileTime ? 0 : m.outerStride())
164 return m_data[row * m_outerStride.value() +
col];
166 return m_data[row + col * m_outerStride.value()];
172 return m_data[index];
179 return const_cast<Scalar*
>(m_data)[row * m_outerStride.value() +
col];
181 return const_cast<Scalar*
>(m_data)[row + col * m_outerStride.value()];
187 return const_cast<Scalar*
>(m_data)[index];
190 template<
int LoadMode,
typename PacketType>
195 return ploadt<PacketType, LoadMode>(m_data + row * m_outerStride.value() +
col);
197 return ploadt<PacketType, LoadMode>(m_data + row + col * m_outerStride.value());
200 template<
int LoadMode,
typename PacketType>
204 return ploadt<PacketType, LoadMode>(m_data + index);
207 template<
int StoreMode,
typename PacketType>
212 return pstoret<Scalar, PacketType, StoreMode>
213 (
const_cast<Scalar*
>(m_data) + row * m_outerStride.value() +
col, x);
215 return pstoret<Scalar, PacketType, StoreMode>
216 (
const_cast<Scalar*
>(m_data) + row + col * m_outerStride.value(), x);
219 template<
int StoreMode,
typename PacketType>
223 return pstoret<Scalar, PacketType, StoreMode>(
const_cast<Scalar*
>(m_data) + index, x);
231 : int(IsRowMajor) ? ColsAtCompileTime
235 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
237 :
evaluator<PlainObjectBase<Matrix<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >
248 template<
typename Scalar,
int Rows,
int Cols,
int Options,
int MaxRows,
int MaxCols>
250 :
evaluator<PlainObjectBase<Array<Scalar, Rows, Cols, Options, MaxRows, MaxCols> > >
263 template<
typename ArgType>
275 EIGEN_DEVICE_FUNC
explicit unary_evaluator(
const XprType& t) : m_argImpl(t.nestedExpression()) {}
283 return m_argImpl.coeff(col, row);
289 return m_argImpl.coeff(index);
295 return m_argImpl.coeffRef(col, row);
301 return m_argImpl.coeffRef(index);
304 template<
int LoadMode,
typename PacketType>
308 return m_argImpl.template packet<LoadMode,PacketType>(
col,
row);
311 template<
int LoadMode,
typename PacketType>
315 return m_argImpl.template packet<LoadMode,PacketType>(index);
318 template<
int StoreMode,
typename PacketType>
322 m_argImpl.template writePacket<StoreMode,PacketType>(
col,
row, x);
325 template<
int StoreMode,
typename PacketType>
329 m_argImpl.template writePacket<StoreMode,PacketType>(index, x);
340 template<
typename Scalar,
typename NullaryOp,
346 template <
typename IndexType>
348 template <
typename IndexType>
351 template <
typename T,
typename IndexType> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T
packetOp(
const NullaryOp& op, IndexType i, IndexType j)
const {
return op.template packetOp<T>(i,j); }
352 template <
typename T,
typename IndexType> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T
packetOp(
const NullaryOp& op, IndexType i)
const {
return op.template packetOp<T>(i); }
355 template<
typename Scalar,
typename NullaryOp>
358 template <
typename IndexType>
360 template <
typename T,
typename IndexType> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T
packetOp(
const NullaryOp& op, IndexType=0, IndexType=0)
const {
return op.template packetOp<T>(); }
363 template<
typename Scalar,
typename NullaryOp>
366 template <
typename IndexType>
368 template <
typename T,
typename IndexType> EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T
packetOp(
const NullaryOp& op, IndexType i, IndexType j=0)
const {
return op.template packetOp<T>(i,j); }
374 template<
typename Scalar,
typename NullaryOp>
377 template <
typename IndexType>
384 return op.template packetOp<T>(i+j);
387 template <
typename IndexType>
389 template <
typename T,
typename IndexType>
393 template<
typename Scalar,
typename NullaryOp>
396 #if 0 && EIGEN_COMP_MSVC>0 414 template<
typename T>
struct nullary_wrapper_workaround_msvc {
415 nullary_wrapper_workaround_msvc(
const T&);
419 template<
typename Scalar,
typename NullaryOp>
422 template <
typename IndexType>
423 EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Scalar operator()(
const NullaryOp& op, IndexType i, IndexType j)
const {
429 template <
typename IndexType>
430 EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE Scalar operator()(
const NullaryOp& op, IndexType i)
const {
437 template <
typename T,
typename IndexType>
438 EIGEN_DEVICE_FUNC
EIGEN_STRONG_INLINE T packetOp(
const NullaryOp& op, IndexType i, IndexType j)
const {
444 template <
typename T,
typename IndexType>
452 #endif // MSVC workaround 454 template<
typename NullaryOp,
typename PlainObjectType>
473 : m_functor(n.functor()), m_wrapper()
480 template <
typename IndexType>
484 return m_wrapper(m_functor, row, col);
487 template <
typename IndexType>
489 CoeffReturnType
coeff(IndexType index)
const 491 return m_wrapper(m_functor,index);
494 template<
int LoadMode,
typename PacketType,
typename IndexType>
498 return m_wrapper.template packetOp<PacketType>(m_functor,
row,
col);
501 template<
int LoadMode,
typename PacketType,
typename IndexType>
505 return m_wrapper.template packetOp<PacketType>(m_functor, index);
515 template<
typename UnaryOp,
typename ArgType>
531 : m_functor(op.functor()),
532 m_argImpl(op.nestedExpression())
543 return m_functor(m_argImpl.coeff(row, col));
549 return m_functor(m_argImpl.coeff(index));
552 template<
int LoadMode,
typename PacketType>
556 return m_functor.packetOp(m_argImpl.template packet<LoadMode, PacketType>(row, col));
559 template<
int LoadMode,
typename PacketType>
563 return m_functor.packetOp(m_argImpl.template packet<LoadMode, PacketType>(index));
574 template<
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
581 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& xpr) : Base(xpr) {}
584 template<
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
598 Flags0 = (
int(Arg1Flags) | int(Arg2Flags) | int(Arg3Flags)) & (
600 | (
int(Arg1Flags) &
int(Arg2Flags) &
int(Arg3Flags) &
613 : m_functor(xpr.functor()),
614 m_arg1Impl(xpr.arg1()),
615 m_arg2Impl(xpr.arg2()),
616 m_arg3Impl(xpr.arg3())
627 return m_functor(m_arg1Impl.coeff(row, col), m_arg2Impl.coeff(row, col), m_arg3Impl.coeff(row, col));
633 return m_functor(m_arg1Impl.coeff(index), m_arg2Impl.coeff(index), m_arg3Impl.coeff(index));
636 template<
int LoadMode,
typename PacketType>
640 return m_functor.packetOp(m_arg1Impl.template packet<LoadMode,PacketType>(row, col),
641 m_arg2Impl.template packet<LoadMode,PacketType>(row, col),
642 m_arg3Impl.template packet<LoadMode,PacketType>(row, col));
645 template<
int LoadMode,
typename PacketType>
649 return m_functor.packetOp(m_arg1Impl.template packet<LoadMode,PacketType>(index),
650 m_arg2Impl.template packet<LoadMode,PacketType>(index),
651 m_arg3Impl.template packet<LoadMode,PacketType>(index));
664 template<
typename BinaryOp,
typename Lhs,
typename Rhs>
671 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& xpr) : Base(xpr) {}
674 template<
typename BinaryOp,
typename Lhs,
typename Rhs>
687 Flags0 = (
int(LhsFlags) | int(RhsFlags)) & (
689 | (
int(LhsFlags) &
int(RhsFlags) &
690 ( (StorageOrdersAgree ? LinearAccessBit : 0)
700 : m_functor(xpr.functor()),
701 m_lhsImpl(xpr.lhs()),
713 return m_functor(m_lhsImpl.coeff(row, col), m_rhsImpl.coeff(row, col));
719 return m_functor(m_lhsImpl.coeff(index), m_rhsImpl.coeff(index));
722 template<
int LoadMode,
typename PacketType>
726 return m_functor.packetOp(m_lhsImpl.template packet<LoadMode,PacketType>(row, col),
727 m_rhsImpl.template packet<LoadMode,PacketType>(row, col));
730 template<
int LoadMode,
typename PacketType>
734 return m_functor.packetOp(m_lhsImpl.template packet<LoadMode,PacketType>(index),
735 m_rhsImpl.template packet<LoadMode,PacketType>(index));
746 template<
typename UnaryOp,
typename ArgType>
761 : m_unaryOp(op.functor()),
762 m_argImpl(op.nestedExpression())
774 return m_unaryOp(m_argImpl.coeff(row, col));
780 return m_unaryOp(m_argImpl.coeff(index));
786 return m_unaryOp(m_argImpl.coeffRef(row, col));
792 return m_unaryOp(m_argImpl.coeffRef(index));
804 template<
typename Derived,
typename PlainObjectType>
807 template<
typename Derived,
typename PlainObjectType>
816 IsRowMajor = XprType::RowsAtCompileTime,
817 ColsAtCompileTime = XprType::ColsAtCompileTime,
822 : m_data(const_cast<PointerType>(map.data())),
823 m_innerStride(map.innerStride()),
824 m_outerStride(map.outerStride())
827 PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1);
834 return m_data[col * colStride() + row * rowStride()];
840 return m_data[index * m_innerStride.value()];
846 return m_data[col * colStride() + row * rowStride()];
852 return m_data[index * m_innerStride.value()];
855 template<
int LoadMode,
typename PacketType>
859 PointerType ptr = m_data + row * rowStride() + col * colStride();
860 return internal::ploadt<PacketType, LoadMode>(ptr);
863 template<
int LoadMode,
typename PacketType>
867 return internal::ploadt<PacketType, LoadMode>(m_data + index * m_innerStride.value());
870 template<
int StoreMode,
typename PacketType>
874 PointerType ptr = m_data + row * rowStride() + col * colStride();
875 return internal::pstoret<Scalar, PacketType, StoreMode>(ptr, x);
878 template<
int StoreMode,
typename PacketType>
882 internal::pstoret<Scalar, PacketType, StoreMode>(m_data + index * m_innerStride.value(), x);
886 inline Index rowStride()
const {
return XprType::IsRowMajor ? m_outerStride.value() : m_innerStride.value(); }
888 inline Index colStride()
const {
return XprType::IsRowMajor ? m_innerStride.value() : m_outerStride.value(); }
895 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
897 :
public mapbase_evaluator<Map<PlainObjectType, MapOptions, StrideType>, PlainObjectType>
905 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
906 ? int(PlainObjectType::InnerStrideAtCompileTime)
907 : int(StrideType::InnerStrideAtCompileTime),
908 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
909 ? int(PlainObjectType::OuterStrideAtCompileTime)
910 : int(StrideType::OuterStrideAtCompileTime),
911 HasNoInnerStride = InnerStrideAtCompileTime == 1,
912 HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
913 HasNoStride = HasNoInnerStride && HasNoOuterStride,
914 IsDynamicSize = PlainObjectType::SizeAtCompileTime==
Dynamic,
916 PacketAccessMask = bool(HasNoInnerStride) ? ~int(0) : ~int(PacketAccessBit),
917 LinearAccessMask = bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime) ? ~int(0) : ~int(LinearAccessBit),
918 Flags = int(
evaluator<PlainObjectType>::Flags) & (LinearAccessMask&PacketAccessMask),
923 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& map)
930 template<
typename PlainObjectType,
int RefOptions,
typename Str
ideType>
932 :
public mapbase_evaluator<Ref<PlainObjectType, RefOptions, StrideType>, PlainObjectType>
941 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& ref)
948 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel,
951 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
969 IsRowMajor = (MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1) ? 1
970 : (MaxColsAtCompileTime==1 && MaxRowsAtCompileTime!=1) ? 0
972 HasSameStorageOrderAsArgType = (IsRowMajor == ArgTypeIsRowMajor),
973 InnerSize = IsRowMajor ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
974 InnerStrideAtCompileTime = HasSameStorageOrderAsArgType
977 OuterStrideAtCompileTime = HasSameStorageOrderAsArgType
980 MaskPacketAccessBit = (InnerStrideAtCompileTime == 1) ? PacketAccessBit : 0,
982 FlagsLinearAccessBit = (RowsAtCompileTime == 1 || ColsAtCompileTime == 1 || (InnerPanel && (
evaluator<ArgType>::Flags&LinearAccessBit))) ? LinearAccessBit : 0,
986 MaskPacketAccessBit),
987 Flags = Flags0 | FlagsLinearAccessBit | FlagsRowMajorBit,
990 Alignment0 = (InnerPanel && (OuterStrideAtCompileTime!=
Dynamic) && (((OuterStrideAtCompileTime * int(sizeof(Scalar))) % int(PacketAlignment)) == 0)) ? int(PacketAlignment) : 0,
994 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType&
block) : block_evaluator_type(block)
1001 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1012 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1014 :
evaluator_base<Block<ArgType, BlockRows, BlockCols, InnerPanel> >
1019 : m_argImpl(block.nestedExpression()),
1020 m_startRow(block.startRow()),
1021 m_startCol(block.startCol())
1028 RowsAtCompileTime = XprType::RowsAtCompileTime
1034 return m_argImpl.coeff(m_startRow.value() +
row, m_startCol.value() +
col);
1040 return coeff(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);
1046 return m_argImpl.coeffRef(m_startRow.value() +
row, m_startCol.value() +
col);
1052 return coeffRef(RowsAtCompileTime == 1 ? 0 : index, RowsAtCompileTime == 1 ? index : 0);
1055 template<
int LoadMode,
typename PacketType>
1059 return m_argImpl.template packet<LoadMode,PacketType>(m_startRow.value() +
row, m_startCol.value() +
col);
1062 template<
int LoadMode,
typename PacketType>
1066 return packet<LoadMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,
1067 RowsAtCompileTime == 1 ? index : 0);
1070 template<
int StoreMode,
typename PacketType>
1074 return m_argImpl.template writePacket<StoreMode,PacketType>(m_startRow.value() +
row, m_startCol.value() +
col, x);
1077 template<
int StoreMode,
typename PacketType>
1081 return writePacket<StoreMode,PacketType>(RowsAtCompileTime == 1 ? 0 : index,
1082 RowsAtCompileTime == 1 ? index : 0,
1095 template<
typename ArgType,
int BlockRows,
int BlockCols,
bool InnerPanel>
1098 typename Block<ArgType, BlockRows, BlockCols, InnerPanel>::PlainObject>
1116 template<
typename ConditionMatrixType,
typename ThenMatrixType,
typename ElseMatrixType>
1118 :
evaluator_base<Select<ConditionMatrixType, ThenMatrixType, ElseMatrixType> >
1132 : m_conditionImpl(select.conditionMatrix()),
1133 m_thenImpl(select.thenMatrix()),
1134 m_elseImpl(select.elseMatrix())
1144 if (m_conditionImpl.coeff(row, col))
1145 return m_thenImpl.coeff(row, col);
1147 return m_elseImpl.coeff(row, col);
1153 if (m_conditionImpl.coeff(index))
1154 return m_thenImpl.coeff(index);
1156 return m_elseImpl.coeff(index);
1168 template<
typename ArgType,
int RowFactor,
int ColFactor>
1182 LinearAccessMask = XprType::IsVectorAtCompileTime ? LinearAccessBit : 0,
1189 : m_arg(replicate.nestedExpression()),
1191 m_rows(replicate.nestedExpression().rows()),
1192 m_cols(replicate.nestedExpression().cols())
1200 : RowFactor==1 ? row
1201 : row % m_rows.value();
1203 : ColFactor==1 ? col
1204 : col % m_cols.value();
1206 return m_argImpl.coeff(actual_row, actual_col);
1214 ? (ColFactor==1 ? index : index%m_cols.value())
1215 : (RowFactor==1 ? index : index%m_rows.value());
1217 return m_argImpl.coeff(actual_index);
1220 template<
int LoadMode,
typename PacketType>
1225 : RowFactor==1 ? row
1226 : row % m_rows.value();
1228 : ColFactor==1 ? col
1229 : col % m_cols.value();
1231 return m_argImpl.template packet<LoadMode,PacketType>(actual_row, actual_col);
1234 template<
int LoadMode,
typename PacketType>
1239 ? (ColFactor==1 ? index : index%m_cols.value())
1240 : (RowFactor==1 ? index : index%m_rows.value());
1242 return m_argImpl.template packet<LoadMode,PacketType>(actual_index);
1255 template<
typename ArgType,
typename MemberOp,
int Direction>
1257 :
evaluator_base<PartialReduxExpr<ArgType, MemberOp, Direction> >
1265 TraversalSize = Direction==int(
Vertical) ? int(ArgType::RowsAtCompileTime) : int(ArgType::ColsAtCompileTime)
1267 typedef typename MemberOp::template Cost<InputScalar,int(TraversalSize)>
CostOpType;
1278 : m_arg(xpr.nestedExpression()), m_functor(xpr.functor())
1290 return m_functor(m_arg.col(j));
1292 return m_functor(m_arg.row(i));
1299 return m_functor(m_arg.col(index));
1301 return m_functor(m_arg.row(index));
1315 template<
typename XprType>
1334 return m_argImpl.coeff(row, col);
1340 return m_argImpl.coeff(index);
1346 return m_argImpl.coeffRef(row, col);
1352 return m_argImpl.coeffRef(index);
1355 template<
int LoadMode,
typename PacketType>
1359 return m_argImpl.template packet<LoadMode,PacketType>(
row,
col);
1362 template<
int LoadMode,
typename PacketType>
1366 return m_argImpl.template packet<LoadMode,PacketType>(index);
1369 template<
int StoreMode,
typename PacketType>
1373 m_argImpl.template writePacket<StoreMode>(
row,
col, x);
1376 template<
int StoreMode,
typename PacketType>
1380 m_argImpl.template writePacket<StoreMode>(index, x);
1387 template<
typename TArgType>
1398 template<
typename TArgType>
1415 template<
typename ArgType,
int Direction>
1424 IsRowMajor = XprType::IsRowMajor,
1425 IsColMajor = !IsRowMajor,
1429 || ((Direction ==
Vertical) && IsColMajor)
1430 || ((Direction ==
Horizontal) && IsRowMajor),
1438 || ((ReverseRow && XprType::ColsAtCompileTime==1) || (ReverseCol && XprType::RowsAtCompileTime==1))
1439 ? LinearAccessBit : 0,
1447 : m_argImpl(reverse.nestedExpression()),
1448 m_rows(ReverseRow ? reverse.nestedExpression().rows() : 1),
1449 m_cols(ReverseCol ? reverse.nestedExpression().cols() : 1)
1455 return m_argImpl.coeff(ReverseRow ? m_rows.value() - row - 1 :
row,
1456 ReverseCol ? m_cols.value() - col - 1 :
col);
1462 return m_argImpl.coeff(m_rows.value() * m_cols.value() - index - 1);
1468 return m_argImpl.coeffRef(ReverseRow ? m_rows.value() - row - 1 :
row,
1469 ReverseCol ? m_cols.value() - col - 1 :
col);
1475 return m_argImpl.coeffRef(m_rows.value() * m_cols.value() - index - 1);
1478 template<
int LoadMode,
typename PacketType>
1484 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
1485 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1
1489 ReverseRow ? m_rows.value() - row - OffsetRow :
row,
1490 ReverseCol ? m_cols.value() - col - OffsetCol :
col));
1493 template<
int LoadMode,
typename PacketType>
1498 return preverse(m_argImpl.template packet<LoadMode,PacketType>(m_rows.value() * m_cols.value() - index - PacketSize));
1501 template<
int LoadMode,
typename PacketType>
1508 OffsetRow = ReverseRow && IsColMajor ? PacketSize : 1,
1509 OffsetCol = ReverseCol && IsRowMajor ? PacketSize : 1
1512 m_argImpl.template writePacket<LoadMode>(
1513 ReverseRow ? m_rows.value() - row - OffsetRow :
row,
1514 ReverseCol ? m_cols.value() - col - OffsetCol :
col,
1518 template<
int LoadMode,
typename PacketType>
1523 m_argImpl.template writePacket<LoadMode>
1524 (m_rows.value() * m_cols.value() - index - PacketSize,
preverse(x));
1539 template<
typename ArgType,
int DiagIndex>
1553 EIGEN_DEVICE_FUNC
explicit evaluator(
const XprType& diagonal)
1554 : m_argImpl(diagonal.nestedExpression()),
1555 m_index(diagonal.index())
1564 return m_argImpl.coeff(row + rowOffset(), row + colOffset());
1570 return m_argImpl.coeff(index + rowOffset(), index + colOffset());
1576 return m_argImpl.coeffRef(row + rowOffset(), row + colOffset());
1582 return m_argImpl.coeffRef(index + rowOffset(), index + colOffset());
1605 template<
typename ArgType>
1610 template<
typename ArgType>
1630 return m_arg.rows();
1635 return m_arg.cols();
1642 template<
typename ArgType>
1644 :
public evaluator<typename ArgType::PlainObject>
1651 : m_result(xpr.
arg())
1653 ::new (static_cast<Base*>(
this)) Base(m_result);
1660 ::new (static_cast<Base*>(
this)) Base(m_result);
1671 #endif // EIGEN_COREEVALUATORS_H EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &replicate)
EIGEN_DEVICE_FUNC evaluator_wrapper_base(const ArgType &arg)
Generic expression of a matrix where all coefficients are defined by a functor.
CwiseNullaryOp< NullaryOp, PlainObjectType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE unary_evaluator(const XprType &op)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
internal::traits< Derived >::Scalar Scalar
storage_kind_to_evaluator_kind< typename traits< T >::StorageKind >::Kind Kind
EIGEN_STRONG_INLINE PacketType packet(IndexType row, IndexType col) const
CwiseUnaryView< UnaryOp, ArgType > XprType
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
CwiseUnaryOp< UnaryOp, ArgType > XprType
EIGEN_DEVICE_FUNC evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC evaluator(const XprType &block)
internal::add_const_on_value_type< ArgTypeNested >::type m_arg
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_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType=0, IndexType=0) const
Expression of a mathematical vector or matrix as an array object.
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 CoeffReturnType coeff(Index row, Index col) const
evaluator< ElseMatrixType > m_elseImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
ArrayWrapper< TArgType > XprType
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
EIGEN_DEVICE_FUNC mapbase_evaluator(const XprType &map)
Transpose< ArgType > XprType
CwiseBinaryOp< BinaryOp, Lhs, Rhs > XprType
packet_traits< Scalar >::type PacketScalar
evaluator< Arg1 > m_arg1Impl
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
A matrix or vector expression mapping an existing array of data.
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &wrapper)
EIGEN_DEVICE_FUNC Index colStride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType=0, IndexType=0) const
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_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
evaluator< Arg3 > m_arg3Impl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index col)
traits< ExpressionType > ExpressionTraits
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
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)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
XprType::CoeffReturnType CoeffReturnType
const internal::nullary_wrapper< CoeffReturnType, NullaryOp > m_wrapper
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
MatrixWrapper< TArgType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE XprType::Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC block_evaluator(const XprType &block)
Generic expression of a partially reduxed matrix.
evaluator< ArgType > m_argImpl
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
EIGEN_DEVICE_FUNC evaluator()
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
evaluator< Rhs > m_rhsImpl
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
const variable_if_dynamic< Index, ArgType::RowsAtCompileTime > m_rows
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
#define EIGEN_IMPLIES(a, b)
EIGEN_STRONG_INLINE PacketType packet(IndexType index) const
evaluator< ArgType > m_argImpl
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &op)
XprType::CoeffReturnType CoeffReturnType
packet_traits< Scalar >::type PacketScalar
internal::nested_eval< ArgType, 1 >::type ArgTypeNested
const unsigned int PacketAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index colOffset() const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
evaluator< ArgType > m_argImpl
EIGEN_DEVICE_FUNC Index rowStride() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index row, Index)
unary_evaluator< T > Base
EIGEN_DEVICE_FUNC evaluator(const XprType &n)
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.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j=0) const
evaluator< ArgTypeNestedCleaned > m_argImpl
const NullaryOp m_functor
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC evaluator(const T &xpr)
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &reverse)
#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
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
MemberOp::template Cost< InputScalar, int(TraversalSize)> CostOpType
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &t)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T value()
block_evaluator< ArgType, BlockRows, BlockCols, InnerPanel > block_evaluator_type
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i, IndexType j=0) const
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEVICE_FUNC evaluator(const T &xpr)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &block)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
EIGEN_DEVICE_FUNC evaluator(const XprType xpr)
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_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr block(Index startRow, Index startCol, Index blockRows, Index blockCols)
This is the const version of block(Index,Index,Index,Index). */.
EIGEN_DEVICE_FUNC evaluator(const XprType &m)
dense_xpr_base< EvalToTemp >::type Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). */.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i) const
evaluator< Arg2 > m_arg2Impl
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 row, Index col) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i, IndexType j) const
XprType::CoeffReturnType CoeffReturnType
const internal::variable_if_dynamicindex< Index, XprType::DiagIndex > m_index
Ref< PlainObjectType, RefOptions, StrideType > XprType
evaluator< ArgType > m_argImpl
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
evaluator< Lhs > m_lhsImpl
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 CoeffReturnType coeff(IndexType index) const
const variable_if_dynamic< Index,(ArgType::RowsAtCompileTime==1 &&BlockRows==1)?0:Dynamic > m_startRow
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp &op, IndexType i) 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 evaluator()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
Block< ArgType, BlockRows, BlockCols, InnerPanel > XprType
XprType::CoeffReturnType CoeffReturnType
const TernaryOp m_functor
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > XprType
EIGEN_DEVICE_FUNC evaluator()
evaluator< ArgType > m_argImpl
A matrix or vector expression mapping an existing expression.
binary_evaluator< CwiseBinaryOp< BinaryOp, Lhs, Rhs > > Base
ternary_evaluator< CwiseTernaryOp< TernaryOp, Arg1, Arg2, Arg3 > > Base
const internal::variable_if_dynamic< Index, XprType::OuterStrideAtCompileTime > m_outerStride
EIGEN_DEVICE_FUNC evaluator(const XprType &ref)
EIGEN_DEVICE_FUNC evaluator(const PlainObjectType &m)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
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
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 Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC unary_evaluator(const XprType &wrapper)
Expression of a fixed-size or dynamic-size block.
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC ternary_evaluator(const XprType &xpr)
#define EIGEN_PLAIN_ENUM_MIN(a, b)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
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 CoeffReturnType coeff(IndexType row, IndexType col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index col) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp &op, IndexType i, IndexType j) const
EIGEN_DEVICE_FUNC evaluator(const XprType &diagonal)
XprType::PointerType PointerType
evaluator< PlainObject > Base
General-purpose arrays with easy API for coefficient-wise operations.
CwiseBinaryOp< BinaryOp, Lhs, Rhs > XprType
const ArgTypeNested m_arg
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index index) const
XprType::CoeffReturnType CoeffReturnType
Diagonal< ArgType, DiagIndex > XprType
const ArgType & arg() const
remove_all< typename XprType::NestedExpressionType >::type ArgType
Base::PointerType PointerType
EIGEN_STRONG_INLINE void writePacket(Index index, const PacketType &x)
variable_if_dynamic< Index, IsVectorAtCompileTime?0:int(IsRowMajor)?ColsAtCompileTime:RowsAtCompileTime > m_outerStride
ArgType::Scalar InputScalar
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)
internal::remove_all< ArgTypeNested >::type ArgTypeNestedCleaned
const unsigned int EvalBeforeNestingBit
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_DEVICE_FUNC evaluator(const XprType &select)
EIGEN_STRONG_INLINE void writePacket(Index row, Index col, const PacketType &x)
internal::nested_eval< ArgType, Factor >::type ArgTypeNested
The matrix class, also used for vectors and row-vectors.
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Expression of the reverse of a vector or matrix.
EIGEN_STRONG_INLINE PacketType packet(Index index) const
void run(Expr &expr, Dev &dev)
PartialReduxExpr< ArgType, MemberOp, Direction > XprType
Reverse< ArgType, Direction > XprType
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC evaluator(const ArgType &arg)
EIGEN_DEVICE_FUNC block_evaluator(const XprType &block)
PlainObjectType::Scalar Scalar
EIGEN_DEVICE_FUNC evaluator(const XprType &m)
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 row, Index col) const
const unsigned int LinearAccessBit
ArgType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rowOffset() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_STRONG_INLINE PacketType packet(Index index) const
EIGEN_STRONG_INLINE PacketType packet(Index row, Index col) const
Select< ConditionMatrixType, ThenMatrixType, ElseMatrixType > XprType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index row, Index) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
EIGEN_DEVICE_FUNC binary_evaluator(const XprType &xpr)
Expression of a coefficient wise version of the C++ ternary operator ?:
internal::remove_all< ArgTypeNested >::type ArgTypeNestedCleaned