Guest User

Untitled

a guest
Apr 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. extern "C" void zgemm_(char*, char*, int*, int*, int*, cdouble*, cdouble*, int*, cdouble*, int*, cdouble*, cdouble*, int*, int*);
  2. void multiply(cdouble* AtimesB, cdouble* A, cdouble* B, int msize)
  3. {
  4. int LWORK = msize, INFO=0;
  5. char N = 'N';
  6. cdouble alpha(1,0);
  7. cdouble betax(0,0);
  8. set_zero(AtimesB,cdouble(0,0),msize*msize);
  9. zgemm_(&N, &N, &msize, &msize, &msize, &alpha, A, &msize, B, &msize, &betax, AtimesB, &msize,&INFO);
  10. if(INFO != 0)
  11. {
  12. cout << "Complex matrix product: Error at zgemm. INFO: " << INFO<< endl;
  13. exit(1);
  14. }
  15. }
Add Comment
Please, Sign In to add comment