kokkos-kernels icon indicating copy to clipboard operation
kokkos-kernels copied to clipboard

Wrong types and deep_copy argument in BlockCrsMatrix constructor

Open cwpearson opened this issue 3 years ago • 0 comments

The destination of this deep copy is the raw argument pointer (an input argument), when instead it should probably be the values member of the BlockCrsMatrix class:

https://github.com/kokkos/kokkos-kernels/blob/564dccb339d8d1528c2bb948abdac0c6e48e09d5/src/sparse/KokkosSparse_BlockCrsMatrix.hpp#L929

Furthermore, the views passed to the StaticCrsGraph constructor are the wrong type (view of scalars instead of view of ordinals). The following:

https://github.com/kokkos/kokkos-kernels/blob/564dccb339d8d1528c2bb948abdac0c6e48e09d5/src/sparse/KokkosSparse_BlockCrsMatrix.hpp#L926-L927

could be changed to ordinals_type and supported with the following typedef:

typedef Kokkos::View<ordinal_type*, Kokkos::LayoutRight, device_type, MemoryTraits> ordinals_type;

I'm testing these modifications, and I'll make a PR if they seem to work

cwpearson avatar May 24 '21 21:05 cwpearson