mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Fix bug #132
In the matrix-vector products, we were calling coeffRef on the vector xpr without checking it has DirectAccess. Will add unit test (since it's in 2.0, just import the test case provided in the bug report). Confirming that this can't happen in the devel branch, and that if we tried to call coeffRef on an xpr without DirectAccess, that would not compile (since the DenseCoeffsBase class was introduced).
This commit is contained in:
parent
c76c8d6917
commit
501063d9e9
@ -636,6 +636,7 @@ struct ei_cache_friendly_product_selector<ProductType,LhsRows,RowMajor,HasDirect
|
||||
typedef typename ei_traits<ProductType>::_RhsNested Rhs;
|
||||
enum {
|
||||
UseRhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (Rhs::Flags&ActualPacketAccessBit))
|
||||
&& (Rhs::Flags&DirectAccessBit)
|
||||
&& (!(Rhs::Flags & RowMajorBit)) };
|
||||
|
||||
template<typename DestDerived>
|
||||
@ -664,6 +665,7 @@ struct ei_cache_friendly_product_selector<ProductType,1,LhsOrder,LhsAccess,RhsCo
|
||||
typedef typename ei_traits<ProductType>::_LhsNested Lhs;
|
||||
enum {
|
||||
UseLhsDirectly = ((ei_packet_traits<Scalar>::size==1) || (Lhs::Flags&ActualPacketAccessBit))
|
||||
&& (Lhs::Flags&DirectAccessBit)
|
||||
&& (Lhs::Flags & RowMajorBit) };
|
||||
|
||||
template<typename DestDerived>
|
||||
|
Loading…
x
Reference in New Issue
Block a user