CuSparseMatrixCSC constructor

This only works for sparse from SparseArrays:

julia> using SparseArrays

julia> sparse(Array(I), Array(J), Array(V), 3, 3)
3×3 SparseMatrixCSC{Float64,Int64} with 2 stored entries:
  [1, 1]  =  0.2
  [1, 2]  =  0.3

You need to convert your coordinate lists (I and J) to CSC format (colPtr and rowVal).

julia> colPtr = CuArray([1, 2, 3, 3]);

julia> rowVal = CuArray([1, 1]);

julia> CUSPARSE.CuSparseMatrixCSC(colPtr, rowVal, V, (3,3))
3×3 CuSparseMatrixCSC{Float64} with 2 stored entries:
  [1, 1]  =  0.2
  [1, 2]  =  0.3
2 Likes