aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/products/CoeffBasedProduct.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-21 11:28:03 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-21 11:28:03 -0400
commit92da574ec291b32b6f0b645a1d82045eb280437a (patch)
tree658a0edd30d92937ae59c536cdba56feedadb521 /Eigen/src/Core/products/CoeffBasedProduct.h
parent547269da3560518807efe902bce07d22db03e039 (diff)
* allow matrix dimensions to be 0 (also at compile time) and provide a specialization
of ei_matrix_array for size 0 * adapt many xprs to have the right storage order, now that it matters * add static assert on expressions to check that vector xprs have the righ storage order * adapt ei_plain_matrix_type_(column|row)_major * implement assignment of selfadjointview to matrix (was before failing to compile) and add nestedExpression() methods * expand product_symm test * in ei_gemv_selector, use the PlainObject type instead of a custom Matrix<...> type * fix VectorBlock and Block mistakes
Diffstat (limited to 'Eigen/src/Core/products/CoeffBasedProduct.h')
-rw-r--r--Eigen/src/Core/products/CoeffBasedProduct.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h
index e8016e915..b507ac4a9 100644
--- a/Eigen/src/Core/products/CoeffBasedProduct.h
+++ b/Eigen/src/Core/products/CoeffBasedProduct.h
@@ -77,11 +77,12 @@ struct ei_traits<CoeffBasedProduct<LhsNested,RhsNested,NestingFlags> >
CanVectorizeLhs = (!LhsRowMajor) && (LhsFlags & PacketAccessBit)
&& (RowsAtCompileTime == Dynamic || (RowsAtCompileTime % ei_packet_traits<Scalar>::size) == 0),
- EvalToRowMajor = RhsRowMajor && (!CanVectorizeLhs),
+ EvalToRowMajor = (RowsAtCompileTime==1&&ColsAtCompileTime!=1) ? 1
+ : (ColsAtCompileTime==1&&RowsAtCompileTime!=1) ? 0
+ : (RhsRowMajor && !CanVectorizeLhs),
- RemovedBits = ~(EvalToRowMajor ? 0 : RowMajorBit),
-
- Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & RemovedBits)
+ Flags = ((unsigned int)(LhsFlags | RhsFlags) & HereditaryBits & ~RowMajorBit)
+ | (EvalToRowMajor ? RowMajorBit : 0)
| NestingFlags
| (CanVectorizeLhs || CanVectorizeRhs ? PacketAccessBit : 0)
| (LhsFlags & RhsFlags & AlignedBit),