fix priority operator bugs in the computation

of the VectorizableBit flag, now benchmark.cpp is properly vectorized
This commit is contained in:
Gael Guennebaud
2008-04-09 18:24:13 +00:00
parent 8f957564ec
commit 212da8ffe0
3 changed files with 6 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ struct ei_traits<CwiseBinaryOp<BinaryOp, Lhs, Rhs> >
MaxRowsAtCompileTime = Lhs::MaxRowsAtCompileTime,
MaxColsAtCompileTime = Lhs::MaxColsAtCompileTime,
Flags = ((Lhs::Flags | Rhs::Flags) & ~VectorizableBit)
| (ei_functor_traits<BinaryOp>::IsVectorizable && ((Lhs::Flags&RowMajorBit)==(Rhs::Flags&RowMajorBit))
| (ei_functor_traits<BinaryOp>::IsVectorizable && ((Lhs::Flags & RowMajorBit)==(Rhs::Flags & RowMajorBit))
? (Lhs::Flags & Rhs::Flags & VectorizableBit) : 0),
CoeffReadCost = Lhs::CoeffReadCost + Rhs::CoeffReadCost + ei_functor_traits<BinaryOp>::Cost
};