10#ifndef EIGEN_PARTIALREDUX_H
11#define EIGEN_PARTIALREDUX_H
42template<
typename Func,
typename Evaluator>
46 OuterSize = int(Evaluator::IsRowMajor) ? Evaluator::RowsAtCompileTime : Evaluator::ColsAtCompileTime,
55template<
typename PacketType,
typename Func>
60template<
typename PacketType,
typename Scalar>
65template<
typename Func,
typename Evaluator,
66 int Unrolling = packetwise_redux_traits<Func, Evaluator>::Unrolling
71template<
typename Func,
typename Evaluator>
75 typedef typename Evaluator::Scalar
Scalar;
77 template<
typename PacketType>
89template<
typename Func,
typename Evaluator,
int Start>
92 template<
typename PacketType>
96 return packetwise_redux_empty_value<PacketType>(f);
101template<
typename Func,
typename Evaluator>
104 typedef typename Evaluator::Scalar
Scalar;
107 template<
typename PacketType>
112 return packetwise_redux_empty_value<PacketType>(func);
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));
131template<
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),
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>
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;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::conditional< Direction==Vertical, ColXpr, RowXpr >::type subVector(Index i)
Definition: BlockMethods.h:1422
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_UNROLLING_LIMIT
Defines the maximal loop size to enable meta unrolling of loops.
Definition: Settings.h:24
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C)
Definition: StaticAssert.h:218
Expression of a fixed-size or dynamic-size block.
Definition: Block.h:105
Generic expression of a partially reduxed matrix.
Definition: VectorwiseOp.h:58
DirectionType
Enum containing possible values for the Direction parameter of Reverse, PartialReduxExpr and Vectorwi...
Definition: Constants.h:261
@ Vertical
For Reverse, all columns are reversed; for PartialReduxExpr and VectorwiseOp, act on columns.
Definition: Constants.h:264
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition: Constants.h:94
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition: Constants.h:130
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:66
EIGEN_CONSTEXPR Index size(const T &x)
Definition: Meta.h:479
EIGEN_DEVICE_FUNC PacketType packetwise_redux_empty_value(const Func &)
Definition: PartialReduxEvaluator.h:57
Namespace containing all symbols from the Eigen library.
Definition: Core:141
const unsigned int HereditaryBits
Definition: Constants.h:195
const int HugeCost
This value means that the cost to evaluate an expression coefficient is either very expensive or cann...
Definition: Constants.h:44
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
@ CompleteUnrolling
Definition: Constants.h:304
@ NoUnrolling
Definition: Constants.h:299
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition: Constants.h:22
Definition: Eigen_Colamd.h:50
const T type
Definition: Meta.h:214
Definition: XprHelper.h:332
internal::nested_eval< ArgType, 1 >::type ArgTypeNested
Definition: PartialReduxEvaluator.h:136
ArgType::Scalar InputScalar
Definition: PartialReduxEvaluator.h:139
internal::add_const_on_value_type< ArgTypeNested >::type ConstArgTypeNested
Definition: PartialReduxEvaluator.h:137
PartialReduxExpr< ArgType, MemberOp, Direction > XprType
Definition: PartialReduxEvaluator.h:135
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC PacketType packet(Index idx) const
Definition: PartialReduxEvaluator.h:195
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index index) const
Definition: PartialReduxEvaluator.h:181
MemberOp::template Cost< int(TraversalSize)> CostOpType
Definition: PartialReduxEvaluator.h:144
ConstArgTypeNested m_arg
Definition: PartialReduxEvaluator.h:224
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType packet(Index i, Index j) const
Definition: PartialReduxEvaluator.h:188
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar coeff(Index i, Index j) const
Definition: PartialReduxEvaluator.h:175
XprType::Scalar Scalar
Definition: PartialReduxEvaluator.h:140
internal::remove_all< ArgTypeNested >::type ArgTypeNestedCleaned
Definition: PartialReduxEvaluator.h:138
const MemberOp m_functor
Definition: PartialReduxEvaluator.h:225
EIGEN_DEVICE_FUNC evaluator(const XprType xpr)
Definition: PartialReduxEvaluator.h:165
XprType::CoeffReturnType CoeffReturnType
Definition: PartialReduxEvaluator.h:172
Definition: CoreEvaluators.h:111
Definition: CoreEvaluators.h:91
Definition: XprHelper.h:176
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType run(const Evaluator &eval, const Func &func, Index)
Definition: PartialReduxEvaluator.h:79
redux_novec_unroller< Func, Evaluator, 0, Evaluator::SizeAtCompileTime > Base
Definition: PartialReduxEvaluator.h:74
Evaluator::Scalar Scalar
Definition: PartialReduxEvaluator.h:75
static EIGEN_DEVICE_FUNC PacketType run(const Evaluator &eval, const Func &func, Index size)
Definition: PartialReduxEvaluator.h:109
Evaluator::Scalar Scalar
Definition: PartialReduxEvaluator.h:104
redux_traits< Func, Evaluator >::PacketType PacketScalar
Definition: PartialReduxEvaluator.h:105
Definition: PartialReduxEvaluator.h:68
Definition: PartialReduxEvaluator.h:44
@ Cost
Definition: PartialReduxEvaluator.h:47
@ OuterSize
Definition: PartialReduxEvaluator.h:46
find_best_packet< typenameEvaluator::Scalar, Evaluator::SizeAtCompileTime >::type PacketType
Definition: Redux.h:30
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketType run(const Evaluator &, const Func &f)
Definition: PartialReduxEvaluator.h:94
T type
Definition: Meta.h:126
Definition: BinaryFunctors.h:71
Definition: ForwardDeclarations.h:17
Definition: GenericPacketMath.h:133