Community
cancel
Showing results for 
Search instead for 
Did you mean: 
rockydut
Beginner
110 Views

mkl_dcsradd problems

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
110 Views

Reply