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

mkl_dcsradd problems

rockydut
Beginner
393 Views

I want to use the mkl_dcsradd function to translate the sparse matrix. However, it can not get the right results. I don't know what's the error in my codes.

Here's my codes:

////////////////////
int info;

int request=0, sort = 0;

char trans='T';

double beta = 1;

int nzmax =15;

SparseMatrix A(n, m); //A stroed as the CSR format.

A(0,0)=1; //set the matrix value
......
SparseMatri B(m,n); //B stored as the CSR format.
B(0,0) = 2;; //set the matrix value
......

double*c=new double[nzmax];

int*jc=new int[nzmax], *ic=new int[A._m+1];

mkl_dcsradd(trans, request, sort, A._m, A._n, A._a, A._ja, A._ia, beta, B._a, B._ja, B._ia, c, jc, ic, nzmax, info);

//////////

0 Kudos
1 Reply
utab
Beginner
393 Views
0 Kudos
Reply