mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Favor column major storage for inner products
This commit is contained in:
@@ -55,8 +55,8 @@ private:
|
||||
};
|
||||
|
||||
enum {
|
||||
DstIsRowMajor = DstEvaluator::Flags&RowMajorBit,
|
||||
SrcIsRowMajor = SrcEvaluator::Flags&RowMajorBit,
|
||||
DstIsRowMajor = DstFlags&RowMajorBit,
|
||||
SrcIsRowMajor = SrcFlags&RowMajorBit,
|
||||
StorageOrdersAgree = (int(DstIsRowMajor) == int(SrcIsRowMajor)),
|
||||
MightVectorize = StorageOrdersAgree
|
||||
&& (int(DstFlags) & int(SrcFlags) & ActualPacketAccessBit)
|
||||
|
||||
@@ -85,7 +85,7 @@ struct traits<Product<Lhs, Rhs, Option> >
|
||||
#endif
|
||||
|
||||
// The storage order is somewhat arbitrary here. The correct one will be determined through the evaluator.
|
||||
Flags = ( MaxRowsAtCompileTime==1
|
||||
Flags = ( (MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1)
|
||||
|| ((LhsTraits::Flags&NoPreferredStorageOrderBit) && (RhsTraits::Flags&RowMajorBit))
|
||||
|| ((RhsTraits::Flags&NoPreferredStorageOrderBit) && (LhsTraits::Flags&RowMajorBit)) )
|
||||
? RowMajorBit : (MaxColsAtCompileTime==1 ? 0 : NoPreferredStorageOrderBit)
|
||||
|
||||
Reference in New Issue
Block a user