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
- Compress matrix in CSR Format after matrix multiplication

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

andrefla

Beginner

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

08-18-2010
12:10 AM

33 Views

Compress matrix in CSR Format after matrix multiplication

is there an easy way (or a predefined function) to compress a matrix in CSR format after a matrix multiplication?

I have two problems:

a) I have to set the number of non zero elements in advance, but I don't know the exact number of non zero elements after the matrix multiplication. So I have to assume the worst case, which is alway higher than the real one.

b) During matrix multiplication there can be zeros introduced, which enlarges my matrix.

The only way I know is, that I can walk through the values array "by hand", delete all zeros and correct all indices in the corresponding index arrays. But that's really exhausting ...

All the best,

Andr

Edit:

I said nothing. I should read the manual twice: Callmkl_?csrmultcsr first with request=1 and after that with request=2

Link Copied

1 Reply

Gennady_F_Intel

Moderator

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

08-18-2010
12:25 AM

33 Views

please look at themkl_ddnscsr(,,,,,) routine which converts dense to the CSR representations when job(1) == 0.

will it appropriate for you?

--Gennady

- 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.