aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/ProductBase.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-19 02:12:23 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-03-19 02:12:23 -0400
commit547269da3560518807efe902bce07d22db03e039 (patch)
tree0977e39381ecb056ddbbd3e34efc76f774df009f /Eigen/src/Core/ProductBase.h
parent9dba86df0b5c1d28a18666003a10f53e59154904 (diff)
fix the flags and matrix options, to always have the right RowMajor bit in the vector case
Diffstat (limited to 'Eigen/src/Core/ProductBase.h')
-rw-r--r--Eigen/src/Core/ProductBase.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h
index 789aecfb6..be32189e1 100644
--- a/Eigen/src/Core/ProductBase.h
+++ b/Eigen/src/Core/ProductBase.h
@@ -42,8 +42,10 @@ struct ei_traits<ProductBase<Derived,_Lhs,_Rhs> > //: ei_traits<typename ei_clea
ColsAtCompileTime = ei_traits<Rhs>::ColsAtCompileTime,
MaxRowsAtCompileTime = ei_traits<Lhs>::MaxRowsAtCompileTime,
MaxColsAtCompileTime = ei_traits<Rhs>::MaxColsAtCompileTime,
- Flags = EvalBeforeNestingBit | EvalBeforeAssigningBit | NestByRefBit, // Note that EvalBeforeNestingBit and NestByRefBit
- // are not used in practice because ei_nested is overloaded for products
+ Flags = (RowsAtCompileTime==1 ? RowMajorBit : 0)
+ | EvalBeforeNestingBit | EvalBeforeAssigningBit | NestByRefBit,
+ // Note that EvalBeforeNestingBit and NestByRefBit
+ // are not used in practice because ei_nested is overloaded for products
CoeffReadCost = 0 // FIXME why is it needed ?
};
};