118 || ( PlainObjectType::IsVectorAtCompileTime
121 ||
int(PlainObjectType::RowsAtCompileTime)==
int(Expression::ColsAtCompileTime))
124 ||
int(PlainObjectType::ColsAtCompileTime)==
int(Expression::RowsAtCompileTime)))),
125 YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES
131 if(PlainObjectType::RowsAtCompileTime==1)
137 else if(PlainObjectType::ColsAtCompileTime==1)
145 (PlainObjectType::RowsAtCompileTime ==
Dynamic) || (PlainObjectType::RowsAtCompileTime ==
rows));
147 (PlainObjectType::ColsAtCompileTime ==
Dynamic) || (PlainObjectType::ColsAtCompileTime ==
cols));
151 const bool transpose = PlainObjectType::IsVectorAtCompileTime && (
rows != expr.rows());
153 const bool row_major = ((PlainObjectType::Flags)&
RowMajorBit) != 0;
154 const bool expr_row_major = (Expression::Flags&
RowMajorBit) != 0;
155 const bool storage_differs = (row_major != expr_row_major);
157 const bool swap_stride = (transpose != storage_differs);
165 Expression::IsVectorAtCompileTime != 0,
170 const bool row_vector = (
rows == 1);
171 const bool col_vector = (
cols == 1);
172 const Index inner_stride =
173 ( (!row_major && row_vector) || (row_major && col_vector) ) ?
174 ( StrideType::InnerStrideAtCompileTime > 0 ?
Index(StrideType::InnerStrideAtCompileTime) : 1)
175 : swap_stride ? expr_outer_actual : expr_inner_actual;
179 const Index outer_stride =
180 ( (!row_major && col_vector) || (row_major && row_vector) ) ?
181 ( StrideType::OuterStrideAtCompileTime > 0 ?
Index(StrideType::OuterStrideAtCompileTime) :
rows *
cols * inner_stride)
182 : swap_stride ? expr_inner_actual : expr_outer_actual;
185 const bool inner_valid = (StrideType::InnerStrideAtCompileTime ==
Dynamic)
191 const bool outer_valid = (StrideType::OuterStrideAtCompileTime ==
Dynamic)
194 Index(StrideType::OuterStrideAtCompileTime),
195 rows,
cols, PlainObjectType::IsVectorAtCompileTime != 0,
202 internal::construct_at<Base>(
this, expr.data(),
rows,
cols);
204 (StrideType::OuterStrideAtCompileTime == 0) ? 0 : outer_stride,
205 (StrideType::InnerStrideAtCompileTime == 0) ? 0 : inner_stride );
#define EIGEN_STATIC_ASSERT(X, MSG)
#define EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0, TYPE1)
internal::traits< Derived >::PlainObjectType PlainObjectType
static EIGEN_CONSTEXPR Index resolveInnerStride(Index inner)
static EIGEN_CONSTEXPR Index resolveOuterStride(Index inner, Index outer, Index rows, Index cols, bool isVectorAtCompileTime, bool isRowMajor)
const unsigned int RowMajorBit
T * construct_at(T *p, Args &&... args)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.