diff --git a/Eigen/src/Core/GeneralProduct.h b/Eigen/src/Core/GeneralProduct.h index e3a165ac6..c9ab63782 100644 --- a/Eigen/src/Core/GeneralProduct.h +++ b/Eigen/src/Core/GeneralProduct.h @@ -98,6 +98,31 @@ public: #endif }; +template struct product_tag +{ +private: + + typedef typename remove_all::type _Lhs; + typedef typename remove_all::type _Rhs; + enum { + Rows = _Lhs::RowsAtCompileTime, + Cols = _Rhs::ColsAtCompileTime, + Depth = EIGEN_SIZE_MIN_PREFER_FIXED(_Lhs::ColsAtCompileTime, _Rhs::RowsAtCompileTime) + }; + + enum { + rows_select = Rows==1 ? int(Rows) : int(Large), + cols_select = Cols==1 ? int(Cols) : int(Large), + depth_select = Depth==1 ? int(Depth) : int(Large) + }; + typedef product_type_selector selector; + +public: + enum { + ret = selector::ret + }; + +}; /* The following allows to select the kind of product at compile time * based on the three dimensions of the product.