Skip to content

Replace Kokkos::StaticCrsGraph by a local implementation

Replacing Kokkos::StaticCrsGraph class by an appropriate builtin one should be considered.

Actually the design of this class is quite crappy and does not help to protect data.

  • It is not easy to build a Kokkos::StaticCrsGraph<const index_type,...> since building tools and mirroring require this template parameter to be mutable (even for mirroring). Thus
    • up to now, CRSMatrix internal structures could be modified (which was not intended);
    • this is changed in 6b19154e (but relies on a dirty trick which could be furthermore invalidated by future changes in Kokkos).
  • The interface itself is not very clean and does not fit nicely to pugs nomenclature
  • The build methods: Kokkos::create_staticcrsgraph require the use of std::vector which is also quite questionable.
  • Also, providing a better interface could simplify coupling with external linear algebra libraries (such as PETSc).
  • Finally, not relying on Kokkos::StaticCrsGraph would reduce the direct dependency on Kokkos

The class is used mainly into two places

  • CRSMatrix (in a direct way), and
  • ConnectivityMatrix (which is embedded into ItemToItemMatrix, which provide a better interface)
Edited by Stéphane Del Pino