diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-16 16:29:46 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-16 16:29:46 +0100 |
commit | 33e52a3943fdb50ab2e2f56fc678a9af5d2f27a4 (patch) | |
tree | ca60e49a584d0da14e4468e26742bd81822bbd62 | |
parent | 732a50d0432de3ebedda803ea843d00b263854e3 (diff) |
rm local fill-in ratio estimation (was broken sometimes)
-rw-r--r-- | Eigen/src/SparseCore/SparseSparseProductWithPruning.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Eigen/src/SparseCore/SparseSparseProductWithPruning.h b/Eigen/src/SparseCore/SparseSparseProductWithPruning.h index 9bfdb20c5..7fe9e7641 100644 --- a/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +++ b/Eigen/src/SparseCore/SparseSparseProductWithPruning.h @@ -61,10 +61,12 @@ static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& r res.resize(rows, cols); res.reserve(estimated_nnz_prod); + double ratioColRes = double(estimated_nnz_prod)/double(lhs.rows()*rhs.cols()); for (Index j=0; j<cols; ++j) { + // FIXME: + //double ratioColRes = (double(rhs.innerVector(j).nonZeros()) + double(lhs.nonZeros())/double(lhs.cols()))/double(lhs.rows()); // let's do a more accurate determination of the nnz ratio for the current column j of res - double ratioColRes = (double(rhs.col(j).nonZeros()) + double(lhs.nonZeros())/double(lhs.cols()))/double(lhs.rows()); tempVector.init(ratioColRes); tempVector.setZero(); for (typename Rhs::InnerIterator rhsIt(rhs, j); rhsIt; ++rhsIt) |