10 #ifndef EIGEN_PARTIALREDUX_H 11 #define EIGEN_PARTIALREDUX_H 42 template<
typename Func,
typename Evaluator>
46 OuterSize =
int(Evaluator::IsRowMajor) ? Evaluator::RowsAtCompileTime : Evaluator::ColsAtCompileTime,
55 template<
typename PacketType,
typename Func>
60 template<
typename PacketType,
typename Scalar>
65 template<
typename Func,
typename Evaluator,
71 template<
typename Func,
typename Evaluator>
77 template<
typename PacketType>
89 template<
typename Func,
typename Evaluator,
int Start>
92 template<
typename PacketType>
96 return packetwise_redux_empty_value<PacketType>(
f);
101 template<
typename Func,
typename Evaluator>
107 template<
typename PacketType>
112 return packetwise_redux_empty_value<PacketType>(
func);
114 const Index size4 = (size-1)&(~3);
115 PacketType p = eval.template packetByOuterInner<Unaligned,PacketType>(0,0);
123 func.packetOp(eval.template packetByOuterInner<Unaligned,PacketType>(i+0,0),eval.template packetByOuterInner<Unaligned,PacketType>(i+1,0)),
124 func.packetOp(eval.template packetByOuterInner<Unaligned,PacketType>(i+2,0),eval.template packetByOuterInner<Unaligned,PacketType>(i+3,0))));
126 p = func.packetOp(p, eval.template packetByOuterInner<Unaligned,PacketType>(i,0));
131 template<
typename ArgType,
typename MemberOp,
int Direction>
142 TraversalSize = Direction==
int(
Vertical) ?
int(ArgType::RowsAtCompileTime) :
int(ArgType::ColsAtCompileTime)
144 typedef typename MemberOp::template Cost<int(TraversalSize)>
CostOpType;
147 : TraversalSize==0 ? 1
153 && bool(MemberOp::Vectorizable)
155 && (TraversalSize!=0),
157 Flags = (
traits<XprType>::Flags&RowMajorBit)
166 : m_arg(xpr.nestedExpression()), m_functor(xpr.functor())
177 return coeff(Direction==
Vertical ? j : i);
186 template<
int LoadMode,
typename PacketType>
190 return packet<LoadMode,PacketType>(Direction==
Vertical ?
j :
i);
193 template<
int LoadMode,
typename PacketType>
198 typedef Block<
const ArgTypeNestedCleaned,
199 Direction==
Vertical ?
int(ArgType::RowsAtCompileTime) :
int(PacketSize),
200 Direction==
Vertical ?
int(PacketSize) :
int(ArgType::ColsAtCompileTime),
203 PanelType panel(m_arg,
214 return internal::pset1<PacketType>(coeff(idx));
217 PanelEvaluator panel_eval(panel);
218 typedef typename MemberOp::BinaryOp BinaryOp;
232 #endif // EIGEN_PARTIALREDUX_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ColXpr, RowXpr >::type subVector(Index i)
EIGEN_DEVICE_FUNC PacketType packetwise_redux_empty_value(const Func &)
#define EIGEN_STRONG_INLINE
Namespace containing all symbols from the Eigen library.
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType run(const Evaluator &eval, const Func &func, Index)
Generic expression of a partially reduxed matrix.
static EIGEN_DEVICE_FUNC PacketType run(const Evaluator &eval, const Func &func, Index size)
const unsigned int RowMajorBit
internal::add_const_on_value_type< ArgTypeNested >::type ConstArgTypeNested
redux_novec_unroller< Func, Evaluator, 0, Evaluator::SizeAtCompileTime > Base
internal::nested_eval< ArgType, 1 >::type ArgTypeNested
const unsigned int PacketAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType packet(Index i, Index j) const
redux_traits< Func, Evaluator >::PacketType PacketScalar
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index index) const
XprType::CoeffReturnType CoeffReturnType
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType run(const Evaluator &, const Func &f)
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
const unsigned int HereditaryBits
EIGEN_DEVICE_FUNC evaluator(const XprType xpr)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
find_best_packet< typename Evaluator::Scalar, Evaluator::SizeAtCompileTime >::type PacketType
EIGEN_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
Expression of a fixed-size or dynamic-size block.
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC PacketType packet(Index idx) const
MemberOp::template Cost< int(TraversalSize)> CostOpType
ArgType::Scalar InputScalar
internal::nested_eval< T, 1 >::type eval(const T &xpr)
internal::remove_all< ArgTypeNested >::type ArgTypeNestedCleaned
Generic expression where a coefficient-wise unary operator is applied to an expression.
PartialReduxExpr< ArgType, MemberOp, Direction > XprType
const unsigned int LinearAccessBit
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const
#define EIGEN_UNROLLING_LIMIT