fix grave bug introduced by me: the low-level matrix-vector product functions can't be fed strided vectors, only strided matrices.

This commit is contained in:
Benoit Jacob 2010-04-20 15:59:17 -04:00
parent 941a7e4ebd
commit 4ba032c9ab
2 changed files with 6 additions and 2 deletions

View File

@ -297,7 +297,8 @@ struct ei_gemv_selector<OnTheLeft,StorageOrder,BlasCompatible>
static void run(const ProductType& prod, Dest& dest, typename ProductType::Scalar alpha)
{
Transpose<Dest> destT(dest);
ei_gemv_selector<OnTheRight,!StorageOrder,BlasCompatible>
enum { OtherStorageOrder = StorageOrder == RowMajor ? ColMajor : RowMajor };
ei_gemv_selector<OnTheRight,OtherStorageOrder,BlasCompatible>
::run(GeneralProduct<Transpose<typename ProductType::_RhsNested>,Transpose<typename ProductType::_LhsNested>, GemvProduct>
(prod.rhs().transpose(), prod.lhs().transpose()), destT, alpha);
}

View File

@ -159,7 +159,10 @@ template<typename XprType> struct ei_blas_traits
IsTransposed = false,
NeedToConjugate = false,
ActualAccess = ( (int(XprType::Flags)&DirectAccessBit)
&& (bool(XprType::IsVectorAtCompileTime) || int(ei_inner_stride_at_compile_time<XprType>::ret) == 1)
&& ( /* Uncomment this when the low-level matrix-vector product functions support strided vectors
bool(XprType::IsVectorAtCompileTime)
|| */
int(ei_inner_stride_at_compile_time<XprType>::ret) == 1)
) ? HasDirectAccess : NoDirectAccess
};
typedef typename ei_meta_if<int(ActualAccess)==HasDirectAccess,