- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I using zgesvd on a 16x16 complex matrix.
#define N = 16
MKL_Complex16 vt[N*N];
char jobu = 'A';
char jobvt = 'A';
int m = N;
int n = N;
int ldR = N;
double s;
MKL_Complex16 u[N*N];
int ldu = N;
MKL_Complex16 vt[N*N];
int ldvt = N;
int lwork = 2048;
MKL_Complex16 *work;
work = new MKL_Complex16[2048];
MKL_Complex16 R[N*N];
double rwork[100];
int iwork[100];
int info;
zgesvd(&jobu, &jobvt, &m, &n, R, &ldR, s, u, &ldu, vt, &ldvt, work, &lwork, rwork, &info);
When I compare the result to Matlab the 2 columns of vt are the same as the Matlab output and 2 rows of u are the same as the Matlab output. Also, I only get the first 2 eigenvalues correct from Intel MKL.
Am I calling zgesvd correctly?
I am using C++ in Visual Studio 2005.
Thanks,
Pavel
#define N = 16
MKL_Complex16 vt[N*N];
char jobu = 'A';
char jobvt = 'A';
int m = N;
int n = N;
int ldR = N;
double s
MKL_Complex16 u[N*N];
int ldu = N;
MKL_Complex16 vt[N*N];
int ldvt = N;
int lwork = 2048;
MKL_Complex16 *work;
work = new MKL_Complex16[2048];
MKL_Complex16 R[N*N];
double rwork[100];
int iwork[100];
int info;
zgesvd(&jobu, &jobvt, &m, &n, R, &ldR, s, u, &ldu, vt, &ldvt, work, &lwork, rwork, &info);
When I compare the result to Matlab the 2 columns of vt are the same as the Matlab output and 2 rows of u are the same as the Matlab output. Also, I only get the first 2 eigenvalues correct from Intel MKL.
Am I calling zgesvd correctly?
I am using C++ in Visual Studio 2005.
Thanks,
Pavel
Link Copied
0 Replies

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