Skip to content
Snippets Groups Projects
  1. Mar 03, 2024
    • Carsten Gräser's avatar
      Export missing functionality in MatrixIndexSet · 3d23f92a
      Carsten Gräser authored
      The `MatrixIndexSet` class provides access to an
      incomplete subset of its internal data. While
      the number of rows is exported, the number of cols
      and the column indices per row have been missing
      so far. This was an oversight, since one can hardly
      use the class without this, unless one relies on
      the dedicated `exportIdx()` method for `BCRSMatrix`.
      
      With the missing data exported, one can now easily
      use `MatrixIndexSet` to build patterns for
      other sparse matrix classes.
      3d23f92a
  2. 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
  3. Apr 11, 2023
    • Carsten Gräser'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
  4. Sep 30, 2022
  5. Apr 13, 2015
  6. Apr 19, 2012
  7. Apr 15, 2012
  8. Nov 03, 2009
  9. Oct 13, 2009
  10. May 08, 2007
  11. Nov 10, 2006
  12. Nov 08, 2006
  13. Sep 18, 2006
  14. Feb 28, 2006
  15. Sep 07, 2005
  16. May 17, 2005
  17. Feb 03, 2005
  18. Jan 28, 2005
  19. Jan 06, 2005
    • Oliver Sander's avatar
      This is a helper class which stores a set of matrix entries, i.e. · dad0a5c0
      Oliver Sander authored
      a set of (i,j) integer pairs.  Pairs can be added to the matrix
      in any order.  A MatrixIndexSet can be used to initialize a
      BCRSMatrix via the exportIdx method.
      
      MatrixIndexSets are meant to help with the sometimes unwieldy
      BCRSMatrix class.  If that class' handling gets easier, (or
      if somebody explain to me how BCRSMatrix are really supposed
      to be used), MatrixIndexSets may very well disappear again.
      
      [[Imported from SVN: r134]]
      dad0a5c0
Loading