Is there any way to transfer A in CSC to CSR in CUDA using Adjoint?
n_rows = 1000000 n_cols = 1000000 nnz = 10000000 row_indices = rand(1:n_rows, nnz) col_indices = rand(1:n_cols, nnz) values = rand(nnz)
A = sparse(row_indices, col_indices, values, n_rows, n_cols) At_cpu = sparse(adjoint(A)) A_rowptr_cpu = At_cpu.colptr A_colval_cpu = At_cpu.rowval A_nzval_cpu = At_cpu.nzval
Why not create the array in CSR to begin with by transposing the constructor(s)? Call At = sparse(col_indices, row_indices, values, n_rows, n_cols), and then you have rowptr = At.colptr, colval = At.rowval, nzval = At.nzval.
At = sparse(col_indices, row_indices, values, n_rows, n_cols)
rowptr = At.colptr
colval = At.rowval
nzval = At.nzval
Because I am getting the A in CSC format, this is not the whole code.