diff options
author | 2010-07-19 16:49:09 +0200 | |
---|---|---|
committer | 2010-07-19 16:49:09 +0200 | |
commit | c2ee454df447f3fc3be505c4c89ecf94140345c3 (patch) | |
tree | a31ddac487e42b1a3adb2c6604ad17a865ab2896 /Eigen/src/Core/util | |
parent | 6e157dd7c6e6e643295c5645cfb75d4c457f8d25 (diff) |
* fix compilation of mixed scalar product
* optimize mixed scalar products
Diffstat (limited to 'Eigen/src/Core/util')
-rw-r--r-- | Eigen/src/Core/util/ForwardDeclarations.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/util/Meta.h | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index 310ffa4b3..72223c9e0 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -108,11 +108,10 @@ struct ProductReturnType; // Provides scalar/packet-wise product and product with accumulation // with optional conjugation of the arguments. -template<typename LhsScalar, typename RhsScalar, bool ConjLhs, bool ConjRhs> struct ei_conj_helper; +template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRhs=false> struct ei_conj_helper; template<typename Scalar> struct ei_scalar_sum_op; template<typename Scalar> struct ei_scalar_difference_op; -template<typename Scalar> struct ei_scalar_product_op; template<typename Scalar> struct ei_scalar_conj_product_op; template<typename Scalar> struct ei_scalar_quotient_op; template<typename Scalar> struct ei_scalar_opposite_op; @@ -140,7 +139,8 @@ template<typename Scalar> struct ei_scalar_add_op; template<typename Scalar> struct ei_scalar_constant_op; template<typename Scalar> struct ei_scalar_identity_op; -template<typename Scalar1,typename Scalar2> struct ei_scalar_multiple2_op; +template<typename LhsScalar,typename RhsScalar=LhsScalar> struct ei_scalar_product_op; +template<typename LhsScalar,typename RhsScalar> struct ei_scalar_multiple2_op; struct IOFormat; diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 987020e52..7600cc3e7 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -359,10 +359,8 @@ #define EIGEN_CWISE_PRODUCT_RETURN_TYPE(LHS,RHS) \ CwiseBinaryOp< \ ei_scalar_product_op< \ - typename ei_scalar_product_traits< \ typename ei_traits<LHS>::Scalar, \ typename ei_traits<RHS>::Scalar \ - >::ReturnType \ >, \ LHS, \ RHS \ diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h index b01ceafb2..3d28680b6 100644 --- a/Eigen/src/Core/util/Meta.h +++ b/Eigen/src/Core/util/Meta.h @@ -205,10 +205,10 @@ template<typename T> struct ei_scalar_product_traits<std::complex<T>, T> }; // FIXME quick workaround around current limitation of ei_result_of -template<typename Scalar, typename ArgType0, typename ArgType1> -struct ei_result_of<ei_scalar_product_op<Scalar>(ArgType0,ArgType1)> { -typedef typename ei_scalar_product_traits<typename ei_cleantype<ArgType0>::type, typename ei_cleantype<ArgType1>::type>::ReturnType type; -}; +// template<typename Scalar, typename ArgType0, typename ArgType1> +// struct ei_result_of<ei_scalar_product_op<Scalar>(ArgType0,ArgType1)> { +// typedef typename ei_scalar_product_traits<typename ei_cleantype<ArgType0>::type, typename ei_cleantype<ArgType1>::type>::ReturnType type; +// }; template<typename T> struct ei_is_diagonal { enum { ret = false }; }; |