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

Is there sparse matrix-dense vector multiplication routine with matrix stored in int and vector in double..?

kirankumarm
Beginner
163 Views
Hi All,
I want to use sparse matrix-dense vector multiplication. Matrix is stored in CSR(compressed sparse row) format.

My matrix is of datatype int and
vector is of datatype double.

I searched for routines and found mkl_dcsrmv, mkl_dcsrgemv but both need to have same data type(double).

Is there any other way so that I can use matrix in int and vector in double and perform sparse matrix-dense vector multiplication using routines..?

Regards,
M.Kiran Kumar.
0 Kudos
1 Reply
Gennady_F_Intel
Moderator
163 Views
Kiran, you right. No such m-v routines in MKL ( only for single and double precision).
for your case, you can try to explicity convert int -> double
say:

int val;

(double)val;

or

static_cast(number);

but, it wiil take an additional time ...
--Gennady
0 Kudos
Reply