65PacketType packetwise_redux_empty_value(
const scalar_product_op<Scalar,Scalar>& ) {
109 typedef typename Evaluator::Scalar Scalar;
110 typedef typename redux_traits<Func, Evaluator>::PacketType PacketScalar;
112 template<
typename PacketType>
114 static PacketType run(
const Evaluator &
eval,
const Func& func,
Index size)
117 return packetwise_redux_empty_value<PacketType>(func);
119 const Index size4 = (size-1)&(~3);
120 PacketType p =
eval.template packetByOuterInner<Unaligned,PacketType>(0,0);
128 func.packetOp(
eval.template packetByOuterInner<Unaligned,PacketType>(i+0,0),
eval.template packetByOuterInner<Unaligned,PacketType>(i+1,0)),
129 func.packetOp(
eval.template packetByOuterInner<Unaligned,PacketType>(i+2,0),
eval.template packetByOuterInner<Unaligned,PacketType>(i+3,0))));
131 p = func.packetOp(p,
eval.template packetByOuterInner<Unaligned,PacketType>(i,0));
142 typedef typename internal::add_const_on_value_type<ArgTypeNested>::type ConstArgTypeNested;
143 typedef typename internal::remove_all<ArgTypeNested>::type ArgTypeNestedCleaned;
144 typedef typename ArgType::Scalar InputScalar;
145 typedef typename XprType::Scalar Scalar;
147 TraversalSize = Direction==int(
Vertical) ? int(ArgType::RowsAtCompileTime) : int(ArgType::ColsAtCompileTime)
149 typedef typename MemberOp::template Cost<int(TraversalSize)> CostOpType;
152 : TraversalSize==0 ? 1
158 && bool(MemberOp::Vectorizable)
160 && (TraversalSize!=0),
171 : m_arg(xpr.nestedExpression()), m_functor(xpr.functor())
173 EIGEN_INTERNAL_CHECK_COST_VALUE(TraversalSize==
Dynamic ?
HugeCost : (TraversalSize==0 ? 1 : int(CostOpType::value)));
174 EIGEN_INTERNAL_CHECK_COST_VALUE(CoeffReadCost);
177 typedef typename XprType::CoeffReturnType CoeffReturnType;
179 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
182 return coeff(Direction==
Vertical ? j : i);
185 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
186 const Scalar coeff(
Index index)
const
188 return m_functor(m_arg.template subVector<
DirectionType(Direction)>(index));
191 template<
int LoadMode,
typename PacketType>
192 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
195 return packet<LoadMode,PacketType>(Direction==
Vertical ? j : i);
198 template<
int LoadMode,
typename PacketType>
199 EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
200 PacketType packet(
Index idx)
const
203 typedef Block<
const ArgTypeNestedCleaned,
204 Direction==
Vertical ? int(ArgType::RowsAtCompileTime) : int(PacketSize),
205 Direction==
Vertical ? int(PacketSize) : int(ArgType::ColsAtCompileTime),
208 PanelType panel(m_arg,
219 return internal::pset1<PacketType>(coeff(idx));
222 PanelEvaluator panel_eval(panel);
223 typedef typename MemberOp::BinaryOp BinaryOp;
229 ConstArgTypeNested m_arg;
230 const MemberOp m_functor;