mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
[cleanup] remove commented code.
This commit is contained in:
parent
230447bea0
commit
8fecf98f37
@ -123,7 +123,6 @@ void fastSparseProduct(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
|||||||
{
|
{
|
||||||
// sort indices for sorted insertion to avoid later copying
|
// sort indices for sorted insertion to avoid later copying
|
||||||
QuickSort< 1 >::sort( indices.data(), indices.data()+nnz );
|
QuickSort< 1 >::sort( indices.data(), indices.data()+nnz );
|
||||||
//std::sort( indices.data(), indices.data()+nnz );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
res.startVec(j);
|
res.startVec(j);
|
||||||
@ -136,44 +135,6 @@ void fastSparseProduct(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
|||||||
mask[i] = false;
|
mask[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// alternative ordered insertion code:
|
|
||||||
|
|
||||||
Index t200 = rows/(log2(200)*1.39);
|
|
||||||
Index t = (rows*100)/139;
|
|
||||||
|
|
||||||
// FIXME reserve nnz non zeros
|
|
||||||
// FIXME implement fast sort algorithms for very small nnz
|
|
||||||
// if the result is sparse enough => use a quick sort
|
|
||||||
// otherwise => loop through the entire vector
|
|
||||||
// In order to avoid to perform an expensive log2 when the
|
|
||||||
// result is clearly very sparse we use a linear bound up to 200.
|
|
||||||
//if((nnz<200 && nnz<t200) || nnz * log2(nnz) < t)
|
|
||||||
//res.startVec(j);
|
|
||||||
if(true)
|
|
||||||
{
|
|
||||||
if(nnz>1) std::sort(indices.data(),indices.data()+nnz);
|
|
||||||
for(Index k=0; k<nnz; ++k)
|
|
||||||
{
|
|
||||||
Index i = indices[k];
|
|
||||||
res.insertBackByOuterInner(j,i) = values[i];
|
|
||||||
mask[i] = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// dense path
|
|
||||||
for(Index i=0; i<rows; ++i)
|
|
||||||
{
|
|
||||||
if(mask[i])
|
|
||||||
{
|
|
||||||
mask[i] = false;
|
|
||||||
res.insertBackByOuterInner(j,i) = values[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
res.finalize();
|
res.finalize();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user