* Added ReferencableBit flag to known if coeffRef is available.

(needed by the new product implementation)
* Make the packet* members template to support aligned and unaligned
  access. This makes Block vectorizable. Combined with ReferencableBit,
  we should be able to determine at runtime (in some specific cases) if
  an aligned vectorization is possible or not.
* Improved the new product implementation to robustly handle all cases,
  it now passes all the tests.
* Renamed the packet version ei_predux to ei_preduxp to avoid name collision.
This commit is contained in:
Gael Guennebaud
2008-05-08 08:12:52 +00:00
parent 64c49de7ba
commit bf5326c3ca
9 changed files with 191 additions and 120 deletions

View File

@@ -71,7 +71,7 @@ struct ei_traits<Block<MatrixType, BlockRows, BlockCols> >
|| (ColsAtCompileTime != Dynamic && MatrixType::ColsAtCompileTime == Dynamic))
? ~LargeBit
: ~(unsigned int)0,
Flags = MatrixType::Flags & DefaultLostFlagMask & FlagsMaskLargeBit,
Flags = MatrixType::Flags & (DefaultLostFlagMask | VectorizableBit | ReferencableBit) & FlagsMaskLargeBit,
CoeffReadCost = MatrixType::CoeffReadCost
};
};
@@ -146,13 +146,13 @@ template<typename MatrixType, int BlockRows, int BlockCols> class Block
template<int LoadMode>
PacketScalar _packetCoeff(int row, int col) const
{
return m_matrix.packetCoeff<UnAligned>(row + m_startRow.value(), col + m_startCol.value());
return m_matrix.template packetCoeff<UnAligned>(row + m_startRow.value(), col + m_startCol.value());
}
template<int LoadMode>
void _writePacketCoeff(int row, int col, const PacketScalar& x)
{
m_matrix.const_cast_derived().writePacketCoeff<UnAligned>(row + m_startRow.value(), col + m_startCol.value(), x);
m_matrix.const_cast_derived().template writePacketCoeff<UnAligned>(row + m_startRow.value(), col + m_startCol.value(), x);
}
protected: