Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Sparse matrix coordinate to CSC conversion

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Petros

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-07-2015
01:39 AM

191 Views

Sparse matrix coordinate to CSC conversion

Hi,

I have a matrix in COO format and want to convert to CSC to be used with KLU solver from SuiteSparse. MKL comes with several converters, but I don't seem to find a mkl_?CSCCOO. Is the only way to do this is through :

mkl_dCSRCOO(...) mkl_dCSRCSC(...)

Any faster way?

Thanks in advance, Petros.

1 Solution

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-07-2015
03:23 AM

191 Views

You may be able to skip the conversion altogether if the solver allows you to solve A^{T}x = b in the solution phase, because the CSC representation of A is identical to the CSR representation of A^{T}.

You can use a COO ⇒ CSR converter to do a COO ⇒ CSC conversion by interchanging the COO row and column index vectors in the call. A couple of points to consider carefully: COO data may be in arbitrary order, whereas CSC and CSR have to be in prescribed order; COO data may contain multiple entries for any matrix position, and these entries need not appear consecutively. Make sure that the conversion routine is capable of sorting the COO data and combining multiple entries into a single entry.

Link Copied

2 Replies

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-07-2015
03:23 AM

192 Views

You may be able to skip the conversion altogether if the solver allows you to solve A^{T}x = b in the solution phase, because the CSC representation of A is identical to the CSR representation of A^{T}.

You can use a COO ⇒ CSR converter to do a COO ⇒ CSC conversion by interchanging the COO row and column index vectors in the call. A couple of points to consider carefully: COO data may be in arbitrary order, whereas CSC and CSR have to be in prescribed order; COO data may contain multiple entries for any matrix position, and these entries need not appear consecutively. Make sure that the conversion routine is capable of sorting the COO data and combining multiple entries into a single entry.

Petros

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-07-2015
04:52 AM

191 Views

mecej4 wrote:

You may be able to skip the conversion altogether if the solver allows you to solve A

^{T}x = b in the solution phase, because the CSC representation of A is identical to the CSR representation of A^{T}.You can use a COO ⇒ CSR converter to do a COO ⇒ CSC conversion by interchanging the COO row and column index vectors in the call. A couple of points to consider carefully: COO data may be in arbitrary order, whereas CSC and CSR have to be in prescribed order; COO data may contain multiple entries for any matrix position, and these entries need not appear consecutively. Make sure that the conversion routine is capable of sorting the COO data and combining multiple entries into a single entry.

Thanks! I didn't realize that by swapping row and column of the COO I can get the CSC!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.