diff options
author | 2015-02-13 10:03:53 +0100 | |
---|---|---|
committer | 2015-02-13 10:03:53 +0100 | |
commit | fe513199808654bfa5080fe16bda7dcdafbd57c6 (patch) | |
tree | 71c207f44df25ebd76d19531e65cb6e22efd5c89 /Eigen/src/Core/ProductEvaluators.h | |
parent | e8cdbedefb1913b5a0e2f2b7d38470f081cb8d29 (diff) | |
parent | 0918c51e600bed36a53448fa276b01387119a3c2 (diff) |
Merge Index-refactoring branch with default, fix PastixSupport, remove some useless typedefs
Diffstat (limited to 'Eigen/src/Core/ProductEvaluators.h')
-rw-r--r-- | Eigen/src/Core/ProductEvaluators.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index b2c9b56ed..7f9d135f7 100644 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -210,23 +210,26 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,InnerProduct> template<typename Dst, typename Lhs, typename Rhs, typename Func> EIGEN_DONT_INLINE void outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const false_type&) { + typename evaluator<Rhs>::type rhsEval(rhs); // FIXME make sure lhs is sequentially stored // FIXME not very good if rhs is real and lhs complex while alpha is real too - // FIXME we should probably build an evaluator for dst and rhs + // FIXME we should probably build an evaluator for dst const Index cols = dst.cols(); for (Index j=0; j<cols; ++j) - func(dst.col(j), rhs.coeff(0,j) * lhs); + func(dst.col(j), rhsEval.coeff(0,j) * lhs); } // Row major result template<typename Dst, typename Lhs, typename Rhs, typename Func> -EIGEN_DONT_INLINE void outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const true_type&) { +EIGEN_DONT_INLINE void outer_product_selector_run(Dst& dst, const Lhs &lhs, const Rhs &rhs, const Func& func, const true_type&) +{ + typename evaluator<Lhs>::type lhsEval(lhs); // FIXME make sure rhs is sequentially stored // FIXME not very good if lhs is real and rhs complex while alpha is real too - // FIXME we should probably build an evaluator for dst and lhs + // FIXME we should probably build an evaluator for dst const Index rows = dst.rows(); for (Index i=0; i<rows; ++i) - func(dst.row(i), lhs.coeff(i,0) * rhs); + func(dst.row(i), lhsEval.coeff(i,0) * rhs); } template<typename Lhs, typename Rhs> |