diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index c85a6be80..624d8a83b 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -233,33 +233,33 @@ template struct size_of_xpr_at_compile_time */ template::StorageKind> struct plain_matrix_type; -template struct plain_matrix_type_dense; +template struct plain_matrix_type_dense; template struct plain_matrix_type { - typedef typename plain_matrix_type_dense::XprKind>::type type; + typedef typename plain_matrix_type_dense::XprKind, traits::Flags>::type type; }; template struct plain_matrix_type { typedef typename T::PlainObject type; }; -template struct plain_matrix_type_dense +template struct plain_matrix_type_dense { typedef Matrix::Scalar, traits::RowsAtCompileTime, traits::ColsAtCompileTime, - AutoAlign | (traits::Flags&RowMajorBit ? RowMajor : ColMajor), + AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor), traits::MaxRowsAtCompileTime, traits::MaxColsAtCompileTime > type; }; -template struct plain_matrix_type_dense +template struct plain_matrix_type_dense { typedef Array::Scalar, traits::RowsAtCompileTime, traits::ColsAtCompileTime, - AutoAlign | (traits::Flags&RowMajorBit ? RowMajor : ColMajor), + AutoAlign | (Flags&RowMajorBit ? RowMajor : ColMajor), traits::MaxRowsAtCompileTime, traits::MaxColsAtCompileTime > type; @@ -303,6 +303,15 @@ struct eval, Dense> }; +/* similar to plain_matrix_type, but using the evaluator's Flags */ +template::StorageKind> struct plain_object_eval; + +template +struct plain_object_eval +{ + typedef typename plain_matrix_type_dense::XprKind, evaluator::Flags>::type type; +}; + /* plain_matrix_type_column_major : same as plain_matrix_type but guaranteed to be column-major */ @@ -385,7 +394,7 @@ struct transfer_constness * \param n the number of coefficient accesses in the nested expression for each coefficient access in the bigger expression. * \param PlainObject the type of the temporary if needed. */ -template::type> struct nested_eval +template::type> struct nested_eval { enum { // For the purpose of this test, to keep it reasonably simple, we arbitrarily choose a value of Dynamic values. diff --git a/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h b/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h index 6e664515d..a61ceb7cc 100644 --- a/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +++ b/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h @@ -138,7 +138,7 @@ struct conservative_sparse_sparse_product_selector RowMajorMatrix; typedef SparseMatrix ColMajorMatrixAux; - typedef typename sparse_eval::type ColMajorMatrix; + typedef typename sparse_eval::type ColMajorMatrix; // If the result is tall and thin (in the extreme case a column vector) // then it is faster to sort the coefficients inplace instead of transposing twice. diff --git a/Eigen/src/SparseCore/SparseUtil.h b/Eigen/src/SparseCore/SparseUtil.h index 75c604f79..62f0f6864 100644 --- a/Eigen/src/SparseCore/SparseUtil.h +++ b/Eigen/src/SparseCore/SparseUtil.h @@ -74,20 +74,20 @@ template class SparseSymmetricPermutationProduct; namespace internal { -template struct sparse_eval; +template struct sparse_eval; template struct eval - : public sparse_eval::RowsAtCompileTime,traits::ColsAtCompileTime> + : sparse_eval::RowsAtCompileTime,traits::ColsAtCompileTime,traits::Flags> {}; -template struct sparse_eval { +template struct sparse_eval { typedef typename traits::Scalar _Scalar; typedef typename traits::StorageIndex _StorageIndex; public: typedef SparseVector<_Scalar, RowMajor, _StorageIndex> type; }; -template struct sparse_eval { +template struct sparse_eval { typedef typename traits::Scalar _Scalar; typedef typename traits::StorageIndex _StorageIndex; public: @@ -95,15 +95,15 @@ template struct sparse_eval { }; // TODO this seems almost identical to plain_matrix_type -template struct sparse_eval { +template struct sparse_eval { typedef typename traits::Scalar _Scalar; typedef typename traits::StorageIndex _StorageIndex; - enum { _Options = ((traits::Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; + enum { _Options = ((Flags&RowMajorBit)==RowMajorBit) ? RowMajor : ColMajor }; public: typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; }; -template struct sparse_eval { +template struct sparse_eval { typedef typename traits::Scalar _Scalar; public: typedef Matrix<_Scalar, 1, 1> type; @@ -118,10 +118,15 @@ template struct plain_matrix_type typedef SparseMatrix<_Scalar, _Options, _StorageIndex> type; }; +template +struct plain_object_eval + : sparse_eval::RowsAtCompileTime,traits::ColsAtCompileTime, evaluator::Flags> +{}; + template struct solve_traits { - typedef typename sparse_eval::type PlainObject; + typedef typename sparse_eval::Flags>::type PlainObject; }; template