Kokkos static CRS graph row view is too tightly typed #5939
Labels
Enhancement
Improve existing capability; will potentially require voting
Question
For Kokkos internal and external contributors and users
During siam cse, we discussed with @brian-kelley about using static crs graph with a custom type as the data type.
issue 1
This led us to look at such a use, which led us to the following line in the static crs graph row view helper structure:
kokkos/containers/src/Kokkos_StaticCrsGraph.hpp
Line 149 in 32868fa
It is used afterwards in the ‘colidx’ getter both as the ordinal type for the index and as the value type for the return value. This seems appropriate if the data type is an integral type. But, in a use case in which it’s for instance a floating type or a custom type, it seems too restrictive. It seems it prevents static crs graph to be used with non integral data type.
Similarly, in the static crs graph class itself, there seem to be similar issues, where the data type is also used as the ordinal type.
Issue 2
We also wonder why the row view structure is used. Since the stride is always 1, it seems that a kokkos subview could be used instead too.
kokkos/containers/src/Kokkos_StaticCrsGraph.hpp
Line 392 in 5ad6096
The text was updated successfully, but these errors were encountered: