Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

using MKL in place of CSparse library

meinyahanhoongmail_c
1,273 조회수
Hi,
I've been working on a code where I want to implement MKL instead of CSparse library. Just for the reference, CSparse function routines can be seen on " http://www.cise.ufl.edu/research/sparse/CSparse/ ". I am finding trouble in handling the cs_multiply and cs_add functions. Also, the CSparse library has defines a structure " cs* " for storing and using sparse matrices, but for using MKL functions, one has to pass all the details manually every time. Please suggest some way to proceed ahead.
Also, which function of MKL can be used to multiply 2 sparse matrices? The function I found in MKL for solving C=A*B (A,B,C all are matrices) are for one sparse matrix and the rest are dense matrices.

Please look through this and help me out.

Thanks,
Regards..... :)
0 포인트
5 응답
ArturGuzik
소중한 기여자 I
1,273 조회수
Also, which function of MKL can be used to multiply 2 sparse matrices? The function I found in MKL for solving C=A*B (A,B,C all are matrices) are for one sparse matrix and the rest are dense matrices.


Hi,

(1) this link should help you. It demonstrates most of the things you'll need to call MKL from C#. In case of any problems, post some a bit more detailed info.
(2) sparse matrices -> see mkl_?csrmultcsr and this thread for details.

A.
0 포인트
meinyahanhoongmail_c
1,273 조회수
Quoting - ArturGuzik
Also, which function of MKL can be used to multiply 2 sparse matrices? The function I found in MKL for solving C=A*B (A,B,C all are matrices) are for one sparse matrix and the rest are dense matrices.


Hi,

(1) this link should help you. It demonstrates most of the things you'll need to call MKL from C#. In case of any problems, post some a bit more detailed info.
(2) sparse matrices -> see mkl_?csrmultcsr and this thread for details.

A.

thnx for the quick response.
I am using mkl 10.0.011 and didn't find the mkl_?csrmultcsr and mkl_?csradd functions. In which version are these functions included?
Also, the my matrices are in csc format. What could be the suggestions for using these functions? Is there any function to convert csc to csr format?

thanx,
regards...
0 포인트
jaewonj
초보자
1,273 조회수

thnx for the quick response.
I am using mkl 10.0.011 and didn't find the mkl_?csrmultcsr and mkl_?csradd functions. In which version are these functions included?
Also, the my matrices are in csc format. What could be the suggestions for using these functions? Is there any function to convert csc to csr format?

thanx,
regards...

I believe ?csrmultcsr is new in 10.1. As for csc to csr, youprobably need to usecs_transpose.

or you could go to the following url, download Sparsity source codes, and look at sparse_fcvt.c.

http://www.cs.berkeley.edu/~ejim/sparsity/


0 포인트
ArturGuzik
소중한 기여자 I
1,273 조회수
Quoting - jaewonj

I believe ?csrmultcsr is new in 10.1. As for csc to csr, youprobably need to usecs_transpose.

or you could go to the following url, download Sparsity source codes, and look at sparse_fcvt.c.

http://www.cs.berkeley.edu/~ejim/sparsity/


That's true. It's from version 10.1. So your options are limited to (a) upgrade (b) get replacement code as pointed above.

A.
0 포인트
Gennady_F_Intel
중재자
1,273 조회수

Is there any function to convert csc to csr format?

thanx,
regards...

Just for information:
The newest MKL version 10.2(we are going to release very soon) will contains another extended list of conversion routines, including a new one for conversion CSR (3-array variation) <-> CSC (3-array variation).
--Gennady

0 포인트
응답