From d331def6cce11fa4635a0b25cfda294805763955 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 29 Nov 2013 16:18:22 +0100 Subject: [PATCH] add definition of product_tag --- Eigen/src/Core/GeneralProduct.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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.