mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-06 05:05:12 +08:00
rm local fill-in ratio estimation (was broken sometimes)
This commit is contained in:
parent
732a50d043
commit
33e52a3943
@ -61,10 +61,12 @@ static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& r
|
|||||||
res.resize(rows, cols);
|
res.resize(rows, cols);
|
||||||
|
|
||||||
res.reserve(estimated_nnz_prod);
|
res.reserve(estimated_nnz_prod);
|
||||||
|
double ratioColRes = double(estimated_nnz_prod)/double(lhs.rows()*rhs.cols());
|
||||||
for (Index j=0; j<cols; ++j)
|
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
|
// 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.init(ratioColRes);
|
||||||
tempVector.setZero();
|
tempVector.setZero();
|
||||||
for (typename Rhs::InnerIterator rhsIt(rhs, j); rhsIt; ++rhsIt)
|
for (typename Rhs::InnerIterator rhsIt(rhs, j); rhsIt; ++rhsIt)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user