int P_dormqr( const char *side, const char *trans, int M, int N, int K, double *A, int LDA, double *T, double *B, int LDB ) { PLASMA_enum s, t; int info; if (*side == 'L') { s = PlasmaLeft; } else { s = PlasmaRight; } if (*trans == 'T') { t = PlasmaTrans; } else { t = PlasmaNoTrans; } #if CHECK_VERSION_BEQ(2,4,5) info = PLASMA_dormqr(s, t, M, N, K, A, LDA, T, B, LDB); #else PLASMA_desc *descT; int NB, IB; int MT, NT; /* Get autotuned or set tile size; T matrix allocated with R */ PLASMA_Alloc_Workspace_dgeqrf(1, 1, &descT); PLASMA_Get(PLASMA_TILE_SIZE, &NB); PLASMA_Get(PLASMA_INNER_BLOCK_SIZE, &IB); PLASMA_Dealloc_Handle_Tile(&descT); MT = (M%NB==0) ? (M/NB) : (M/NB+1); NT = (N%NB==0) ? (N/NB) : (N/NB+1); // possibly allocate space for descT in R and keep it in qr object instead info = PLASMA_Desc_Create(&descT, T, PlasmaComplexDouble, IB, NB, IB*NB, MT*IB, NT*NB, 0, 0, MT*IB, NT*NB); info = PLASMA_dormqr(s, t, M, N, K, A, LDA, descT, B, LDB); PLASMA_Desc_Destroy(&descT); #endif return(info); }
void PLASMA_DORMQR(PLASMA_enum *side, PLASMA_enum *trans, int *M, int *N, int *K, double *A, int *LDA, double **T, double *B, int *LDB, int *INFO) { *INFO = PLASMA_dormqr(*side, *trans, *M, *N, *K, A, *LDA, *T, B, *LDB); }