From fd6b551d1fc262c03fe45b27fb5c67a49aec5151 Mon Sep 17 00:00:00 2001 From: Martin 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