Greetings,
Would there be simple way to convert vectors from a CSC matrix to the CSR format? Anyway I can manipulate the indexing?
cheers,
Badlishah
CSC To CSR Matrix Conversion
Re: CSC To CSR Matrix Conversion
Try magma_zmtranspose.
-mark
-mark
Re: CSC To CSR Matrix Conversion
I was looking for the same answer, magma_zmtranspose didn't work for me btw. Thanks Mark.
Re: CSC To CSR Matrix Conversion
Thank you Mark. That tip was very helpful. Apologies for my ignorance, I am still new in this field :)
How would I actually change the indices used in the matrix? For example in the CUDA CuSparse library there is the CUSPARSE_INDEX_BASE_ZERO and CUSPARSE_INDEX_BASE_ONE that can be used.
Cheers,
Badlishah
How would I actually change the indices used in the matrix? For example in the CUDA CuSparse library there is the CUSPARSE_INDEX_BASE_ZERO and CUSPARSE_INDEX_BASE_ONE that can be used.
Cheers,
Badlishah
-
hartwig anzt
- Posts: 90
- Joined: Tue Sep 02, 2014 5:44 pm
Re: CSC To CSR Matrix Conversion
Badlishah,
There is no function for this at this point (all MAGMA sparse is using 0-based indexing). At this point, I would do this manually on the CPU:
for( magma_int_t i=0; i<A.num_rows+1; i++) {
A.row += 1;
}
for( magma_int_t i=0; i<A.nnz; i++) {
A.col += 1;
}
Please let me know if you have problems, then I can provide you with a function.
Thanks, Hartwig
There is no function for this at this point (all MAGMA sparse is using 0-based indexing). At this point, I would do this manually on the CPU:
for( magma_int_t i=0; i<A.num_rows+1; i++) {
A.row += 1;
}
for( magma_int_t i=0; i<A.nnz; i++) {
A.col += 1;
}
Please let me know if you have problems, then I can provide you with a function.
Thanks, Hartwig
Re: CSC To CSR Matrix Conversion
Hartwig,
That worked well. Thanks a bundle.
cheers,
Badlishah
That worked well. Thanks a bundle.
cheers,
Badlishah