diff options
author | 2015-10-08 21:41:53 +0200 | |
---|---|---|
committer | 2015-10-08 21:41:53 +0200 | |
commit | c9718514f59844f1811685c6703389fc95195864 (patch) | |
tree | 254255f5ef3ac54d0154b0c6e2fdd5d728ffe3bb /Eigen/src | |
parent | 4140ee039d1b9adc7ec0e747e466ee073d239d29 (diff) |
Fix nesting sub-expression in outer-products
Diffstat (limited to 'Eigen/src')
-rwxr-xr-x | Eigen/src/Core/ProductEvaluators.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Eigen/src/Core/ProductEvaluators.h b/Eigen/src/Core/ProductEvaluators.h index a40113325..7099d1fdc 100755 --- a/Eigen/src/Core/ProductEvaluators.h +++ b/Eigen/src/Core/ProductEvaluators.h @@ -218,12 +218,12 @@ 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&) { evaluator<Rhs> rhsEval(rhs); - // FIXME make sure lhs is sequentially stored + typename nested_eval<Lhs,Rhs::SizeAtCompileTime>::type actual_lhs(lhs); + // FIXME if cols is large enough, then it might be useful to make sure that 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 const Index cols = dst.cols(); for (Index j=0; j<cols; ++j) - func(dst.col(j), rhsEval.coeff(0,j) * lhs); + func(dst.col(j), rhsEval.coeff(0,j) * actual_lhs); } // Row major result @@ -231,12 +231,12 @@ 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&) { evaluator<Lhs> lhsEval(lhs); - // FIXME make sure rhs is sequentially stored + typename nested_eval<Rhs,Lhs::SizeAtCompileTime>::type actual_rhs(rhs); + // FIXME if rows is large enough, then it might be useful to make sure that 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 const Index rows = dst.rows(); for (Index i=0; i<rows; ++i) - func(dst.row(i), lhsEval.coeff(i,0) * rhs); + func(dst.row(i), lhsEval.coeff(i,0) * actual_rhs); } template<typename Lhs, typename Rhs> |