From: kronbichler Date: Tue, 2 Aug 2011 08:59:22 +0000 (+0000) Subject: Cache loop bounds. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4a3ab6b39a12c031fa8dc34bab5f89f8b9fae8e;p=dealii-svn.git Cache loop bounds. git-svn-id: https://svn.dealii.org/trunk@23987 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/lac/sparse_matrix.templates.h b/deal.II/include/deal.II/lac/sparse_matrix.templates.h index e73595b042..1c899618cc 100644 --- a/deal.II/include/deal.II/lac/sparse_matrix.templates.h +++ b/deal.II/include/deal.II/lac/sparse_matrix.templates.h @@ -280,7 +280,8 @@ SparseMatrix::n_actually_nonzero_elements (const double threshold) const Assert (cols != 0, ExcNotInitialized()); Assert (threshold >= 0, ExcMessage ("Negative threshold!")); unsigned int nnz = 0; - for (unsigned int i=0; i threshold) ++nnz; return nnz;