From 9aac5867dee0e30fa334ac458fb976ffc62c9df3 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Sat, 3 Dec 2005 17:28:27 +0000 Subject: [PATCH] some linker warnings removed git-svn-id: https://svn.dealii.org/trunk@11808 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/lac/compressed_sparsity_pattern.h | 156 +----------------- .../lac/source/compressed_sparsity_pattern.cc | 153 +++++++++++++++++ 2 files changed, 159 insertions(+), 150 deletions(-) diff --git a/deal.II/lac/include/lac/compressed_sparsity_pattern.h b/deal.II/lac/include/lac/compressed_sparsity_pattern.h index 1e39105964..5b3a41221a 100644 --- a/deal.II/lac/include/lac/compressed_sparsity_pattern.h +++ b/deal.II/lac/include/lac/compressed_sparsity_pattern.h @@ -440,152 +440,6 @@ class CompressedSparsityPattern : public Subscriptor /*---------------------- Inline functions -----------------------------------*/ -inline -void -CompressedSparsityPattern::Line::flush_cache () const -{ - // do nothing if the cache is empty - if (cache_entries == 0) - return; - - // first sort the entries in the cache, so - // that it is easier to merge it with the - // main array. note that due to the way - // add() inserts elements, there can be no - // duplicates in the cache - // - // do the sorting in a way that is fast for - // the small cache sizes we have - // here. basically, use bubble sort - switch (cache_entries) - { - case 1: - { - break; - } - - case 2: - { - if (cache[1] < cache[0]) - std::swap (cache[0], cache[1]); - break; - } - - case 3: - { - if (cache[1] < cache[0]) - std::swap (cache[0], cache[1]); - if (cache[2] < cache[1]) - std::swap (cache[1], cache[2]); - if (cache[1] < cache[0]) - std::swap (cache[0], cache[1]); - break; - } - - case 4: - case 5: - case 6: - case 7: - { - for (unsigned int i=0; i new_entries; - new_entries.reserve (n_new_entries); - unsigned int cache_position = 0; - unsigned int entry_position = 0; - while ((entry_position new_entries; + new_entries.reserve (n_new_entries); + unsigned int cache_position = 0; + unsigned int entry_position = 0; + while ((entry_position