From: Martin Kronbichler Date: Tue, 2 Aug 2011 08:59:22 +0000 (+0000) Subject: Cache loop bounds. X-Git-Tag: v8.0.0~3781 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd6b551d1fc262c03fe45b27fb5c67a49aec5151;p=dealii.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;