diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-01 17:51:53 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-01 17:51:53 +0200 |
commit | 6f846ef9c6ef3e838d1361a30dc11f65ddff967d (patch) | |
tree | 4f78d3c7d1ba7b959229342b68125053e1daf51f /Eigen/src/Core/Product.h | |
parent | 3c63446507dbbc891e44b58af07f12f6ef58a175 (diff) |
Split StorageKind promotion into two helpers: one for products, and one for coefficient-wise operations.
Diffstat (limited to 'Eigen/src/Core/Product.h')
-rw-r--r-- | Eigen/src/Core/Product.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index e381ac46a..cb4d4c924 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -62,8 +62,9 @@ struct traits<Product<Lhs, Rhs, Option> > typedef MatrixXpr XprKind; typedef typename product_result_scalar<LhsCleaned,RhsCleaned>::Scalar Scalar; - typedef typename promote_storage_type<typename traits<LhsCleaned>::StorageKind, - typename traits<RhsCleaned>::StorageKind>::ret StorageKind; + typedef typename product_promote_storage_type<typename traits<LhsCleaned>::StorageKind, + typename traits<RhsCleaned>::StorageKind, + internal::product_type<Lhs,Rhs>::ret>::ret StorageKind; typedef typename promote_index_type<typename traits<LhsCleaned>::Index, typename traits<RhsCleaned>::Index>::type Index; @@ -94,8 +95,9 @@ struct traits<Product<Lhs, Rhs, Option> > template<typename _Lhs, typename _Rhs, int Option> class Product : public ProductImpl<_Lhs,_Rhs,Option, - typename internal::promote_storage_type<typename internal::traits<_Lhs>::StorageKind, - typename internal::traits<_Rhs>::StorageKind>::ret> + typename internal::product_promote_storage_type<typename internal::traits<_Lhs>::StorageKind, + typename internal::traits<_Rhs>::StorageKind, + internal::product_type<_Lhs,_Rhs>::ret>::ret> { public: @@ -104,8 +106,9 @@ class Product : public ProductImpl<_Lhs,_Rhs,Option, typedef typename ProductImpl< Lhs, Rhs, Option, - typename internal::promote_storage_type<typename Lhs::StorageKind, - typename Rhs::StorageKind>::ret>::Base Base; + typename internal::product_promote_storage_type<typename Lhs::StorageKind, + typename Rhs::StorageKind, + internal::product_type<Lhs,Rhs>::ret>::ret>::Base Base; EIGEN_GENERIC_PUBLIC_INTERFACE(Product) typedef typename internal::nested<Lhs>::type LhsNested; |