mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-16 14:49:39 +08:00
Favor column major storage for inner products
This commit is contained in:
parent
26db954776
commit
c83e01f2d6
@ -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)
|
||||
|
@ -30,13 +30,15 @@ std::string demangle_unrolling(int t)
|
||||
std::string demangle_flags(int f)
|
||||
{
|
||||
std::string res;
|
||||
if(f&RowMajorBit) res += " | RowMajor";
|
||||
if(f&PacketAccessBit) res += " | Packet";
|
||||
if(f&LinearAccessBit) res += " | Linear";
|
||||
if(f&LvalueBit) res += " | Lvalue";
|
||||
if(f&DirectAccessBit) res += " | Direct";
|
||||
if(f&AlignedBit) res += " | Aligned";
|
||||
if(f&NestByRefBit) res += " | NestByRef";
|
||||
if(f&RowMajorBit) res += " | RowMajor";
|
||||
if(f&PacketAccessBit) res += " | Packet";
|
||||
if(f&LinearAccessBit) res += " | Linear";
|
||||
if(f&LvalueBit) res += " | Lvalue";
|
||||
if(f&DirectAccessBit) res += " | Direct";
|
||||
if(f&AlignedBit) res += " | Aligned";
|
||||
if(f&NestByRefBit) res += " | NestByRef";
|
||||
if(f&NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user