mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 10:09:36 +08:00
fix priority operator bugs in the computation
of the VectorizableBit flag, now benchmark.cpp is properly vectorized
This commit is contained in:
parent
8f957564ec
commit
212da8ffe0
@ -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
|
||||
};
|
||||
|
@ -51,7 +51,7 @@ struct ei_traits<CwiseUnaryOp<UnaryOp, MatrixType> >
|
||||
MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
|
||||
MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime,
|
||||
Flags = (MatrixType::Flags & ~VectorizableBit)
|
||||
| (ei_functor_traits<UnaryOp>::IsVectorizable ? MatrixType::Flags & VectorizableBit : 0),
|
||||
| (ei_functor_traits<UnaryOp>::IsVectorizable ? (MatrixType::Flags & VectorizableBit) : 0),
|
||||
CoeffReadCost = MatrixType::CoeffReadCost + ei_functor_traits<UnaryOp>::Cost
|
||||
};
|
||||
};
|
||||
|
@ -134,9 +134,10 @@ struct ei_traits<Product<Lhs, Rhs, EvalMode> >
|
||||
: (unsigned int)(LhsFlags | RhsFlags) & ~LargeBit )
|
||||
| EvalBeforeAssigningBit
|
||||
| (ei_product_eval_mode<Lhs, Rhs>::value == (int)CacheOptimal ? EvalBeforeNestingBit : 0))
|
||||
& (~(RowMajorBit|VectorizableBit))
|
||||
| (((!Lhs::Flags&RowMajorBit) && Lhs::Flags&VectorizableBit) ? VectorizableBit
|
||||
: ((Rhs::Flags&RowMajorBit && Rhs::Flags&VectorizableBit) ? (RowMajorBit|VectorizableBit) : EIGEN_DEFAULT_MATRIX_STORAGE_ORDER)),
|
||||
& (~(RowMajorBit | VectorizableBit))
|
||||
| (((!(Lhs::Flags & RowMajorBit)) && (Lhs::Flags & VectorizableBit)) ? VectorizableBit
|
||||
: ((Rhs::Flags & RowMajorBit && (Rhs::Flags & VectorizableBit)) ? (RowMajorBit | VectorizableBit)
|
||||
: EIGEN_DEFAULT_MATRIX_STORAGE_ORDER)),
|
||||
CoeffReadCost
|
||||
= Lhs::ColsAtCompileTime == Dynamic
|
||||
? Dynamic
|
||||
|
Loading…
x
Reference in New Issue
Block a user