diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-04-20 15:59:17 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-04-20 15:59:17 -0400 |
commit | 4ba032c9abd653ce24d5f8b94a5d1897c0d4ffce (patch) | |
tree | ec63031a1ce05406b7b10e736ba020bf78d123c1 /Eigen | |
parent | 941a7e4ebd93526b509b841f5c7000e6c08de7aa (diff) |
fix grave bug introduced by me: the low-level matrix-vector product functions can't be fed strided vectors, only strided matrices.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/Product.h | 3 | ||||
-rw-r--r-- | Eigen/src/Core/util/BlasUtil.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 4e7ffa5c1..3e6fbf065 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -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); } diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index 762de0290..43c49670b 100644 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -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, |