bug #1612: fix regression in "outer-vectorization" of partial reductions for PacketSize==1 (aka complex<double>)

This commit is contained in:
Gael Guennebaud 2018-10-16 01:04:25 +02:00
parent e3b85771d7
commit a39e0f7438

View File

@ -206,6 +206,13 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
Direction==Vertical ? m_arg.rows() : Index(PacketSize),
Direction==Vertical ? Index(PacketSize) : m_arg.cols());
// FIXME
// See bug 1612, currently if PacketSize==1 (i.e. complex<double> with 128bits registers) then the storage-order of panel get reversed
// and methods like packetByOuterInner do not make sense anymore in this context.
// So let's just by pass "vectorization" in this case:
if(PacketSize==1)
return internal::pset1<PacketType>(coeff(idx));
typedef typename internal::redux_evaluator<PanelType> PanelEvaluator;
PanelEvaluator panel_eval(panel);
typedef typename MemberOp::BinaryOp BinaryOp;