Skip to content
Snippets Groups Projects
  1. Feb 10, 2024
  2. Jan 27, 2024
  3. Jan 26, 2024
    • Carsten Gräser's avatar
      Speed up MatrixIndestSet::exportIdx() · b6409900
      Carsten Gräser authored
      Before this patch `BCRSMatrix::addindex()` was used on individual
      column indices. This is slow because each insertion does a binary
      search although the inserted indices are already sorted. Bulk-inserting
      whole rows with `setIndices()` improves on this significantly but still
      does a non-necessary sort. The latter is avoided by the new
      `BCRSMatrix::setIndicesNoSort()` method.
      b6409900
    • Carsten Gräser's avatar
      Add method BCRSMatrix::setIndicesNoSort() · e0622c3b
      Carsten Gräser authored
      This is similar to `setIndices()` but does not sort indices
      after insertion which allows to avoid an additional sort
      on an already sorted range. The latter e.g. is the case when
      using sorted containers as it is done in `MatrixIndexSet`.
      e0622c3b
  4. Jan 18, 2024
  5. Jan 17, 2024
  6. Nov 20, 2023
  7. Oct 12, 2023
  8. Oct 10, 2023
  9. Oct 09, 2023
  10. Oct 08, 2023
  11. Sep 20, 2023
  12. Sep 19, 2023
  13. Jun 21, 2023
  14. May 25, 2023
  15. Apr 11, 2023
    • Carsten Gräser's avatar
    • Andreas Dedner's avatar
    • Carsten Gräser's avatar
      Switch to std::uint_least32_t for stored indices in MatrixIndexSet · 4886d18b
      Carsten Gräser authored
      Using `std::uint_least32_t` instead of `std::size_t` halves the required memory
      and thus also improves performance.
      Notice that `std::uint32_t` is optional and `std::uint_fast32_t` is intended to be
      fast in terms of computations and may have 64 bits. Here we're interested in reducing
      memory and thus bandwith. Hence `std::uint_least32_t`, which is the smallest sufficient
      type is most appropriate.
      4886d18b
    • Carsten Gräser's avatar
      Switch internal data structure in MatrixIndexSet · c8272a07
      Carsten Gräser authored
      This replaces the `std::set` used to store the column indices for each
      rows by a `std::vector` based implementation. The `std::vector` is
      kept sorted when inserting such that we can avoid duplicates. This
      can improve assembly time of matrices significantly (if `MatrixIndexSet` is used).
      
      In the worst case (insertion in reverse) this may lead to O(n^2) complexity
      when inserting n entries in a row compared to O(n log(n)) for `std::set`.
      However, the sorted `std::vector` implementation still wins for relatively
      large n. To avoid the worst case complexity when using very dense rows,
      the implementation is switched to `std::set` if the size exceeds the threshold
      value `maxVectorSize`. The default `maxVectorSize=2048` was selected based
      on benchmark results.
      c8272a07
  16. Apr 04, 2023
  17. Mar 16, 2023
  18. Mar 07, 2023
  19. Feb 12, 2023
Loading