Many ML and HPC algorithms operate on sparse matrices. Currently, grCUDA supports only dense multi-dimensional arrays with MultiDimArray.
Provide a similar abstraction the three common representations:
- Compressed sparse row (CSR)
- Compressed sparse column (CSC)
- Coordinate list (COO)
In each case, a sparse matrix is represented by three dense arrays. These arrays need to be passed explicitly to the kernel as separate arguments, thus, the TruffleObjects for the sparse matrices will expose these arrays as attributes (members) that are "read-only" from the host-perspective. The pointer to the underlying mutable data is passed to the kernel.