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
- mkl_?csrmultcsr and symmetric matrices

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

laniik

Beginner

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

04-28-2011
01:15 AM

92 Views

mkl_?csrmultcsr and symmetric matrices

Of course, I know that A'A will produce a sparse symmetric matrix, but I cannot find any way to convert the output of this function into a symmetric CSR format, rather than a non-symmetric CSR format.

Is there a way to do this conversion without manually going in and removing entries from the values,cols,rowIndex arrays?

I think callingdss_define_structure withMKL_DSS_NON_SYMMETRIC option should speed things up due to memory re-use.

Thanks!

Oliver

Link Copied

3 Replies

Konstantin_A_Intel

Employee

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

04-28-2011
02:02 AM

92 Views

Of course, you can solve your matrix as unsymmetrical, but it would be definitelyslower to factorize it in comparison with the code for symmetrical matrices. Anyway, this way is simple and should work for you.

As for me, I don't know any routines that can help you (I mean special unsym->sym converters etc.). The only way here is to manually convert arrays - however, it doesn't seem hard, something like this:

ja_cnt=0;

ia_new[0]=1;

for(i=1;i

ia_cnt=0;

for(j=ia[i-1];j<ia*;j++) {*

if (ja[j-1]>=i) {

ja_new[ja_cnt]=ja[j-1];

a_new[ja_cnt]=a[j-1];

ja_cnt++;

ia_cnt++;

}

}

ia_new*=ia_new[i-1]+ia_cnt;*

}

Moreover, you can just overwrite old ja and a arrays, not allocating ja_new and a_new.

Regards,

Konstantin

Danesh_Daroui

Beginner

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

04-28-2011
09:48 AM

92 Views

D.

Konstantin_A_Intel

Employee

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

05-09-2011
09:50 PM

92 Views

Regards,

Konstantin

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