From ae039dde135a6af852d7028abd772316613a5249 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 27 Jun 2014 15:53:51 +0200 Subject: Add a NoPreferredStorageOrderBit flag for expression having no preferred storage order. It is currently only used in Product. --- Eigen/src/Core/Product.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Eigen/src/Core/Product.h') diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index 626b737c7..e381ac46a 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -82,7 +82,10 @@ struct traits > #endif // The storage order is somewhat arbitrary here. The correct one will be determined through the evaluator. - Flags = (MaxRowsAtCompileTime==1 ? RowMajorBit : 0) + Flags = ( MaxRowsAtCompileTime==1 + || ((LhsCleaned::Flags&NoPreferredStorageOrderBit) && (RhsCleaned::Flags&RowMajorBit)) + || ((RhsCleaned::Flags&NoPreferredStorageOrderBit) && (LhsCleaned::Flags&RowMajorBit)) ) + ? RowMajorBit : (MaxColsAtCompileTime==1 ? 0 : NoPreferredStorageOrderBit) }; }; @@ -156,6 +159,16 @@ public: } // namespace internal +#ifdef EIGEN_TEST_EVALUATORS +// Generic API dispatcher +template +class ProductImpl : public internal::generic_xpr_base, MatrixXpr, StorageKind>::type +{ + public: + typedef typename internal::generic_xpr_base, MatrixXpr, StorageKind>::type Base; +}; +#endif + template class ProductImpl : public internal::dense_product_base -- cgit v1.2.3