From a4a3ab6b39a12c031fa8dc34bab5f89f8b9fae8e Mon Sep 17 00:00:00 2001 From: kronbichler Date: Tue, 2 Aug 2011 08:59:22 +0000 Subject: [PATCH] Cache loop bounds. git-svn-id: https://svn.dealii.org/trunk@23987 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/lac/sparse_matrix.templates.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5