45 #include "hicma_common.h" 46 #include "control/common.h" 48 #include "coreblas/lapacke.h" 66 MORSE_sequence_t *sequence, MORSE_request_t *request,
67 int rk,
int maxrk,
double acc)
69 MORSE_context_t *morse;
70 MORSE_option_t options;
76 double zone = (double) 1.0;
77 double mzone = (double)-1.0;
79 morse = morse_context_self();
80 if (sequence->status != MORSE_SUCCESS)
82 RUNTIME_options_init(&options, morse, sequence, request);
98 2 * AD->mb * 2 * maxrk
102 + (2*maxrk) * (2*maxrk)
106 #ifdef HCORE_GEMM_USE_ORGQR
113 int info = LAPACKE_dgesvd_work( LAPACK_COL_MAJOR,
'A',
'A',
118 NULL, 2*maxrk, &work_query, lwork );
119 lwork = (int)work_query;
122 ws_worker += (2*maxrk);
125 ws_worker *=
sizeof(double);
127 RUNTIME_options_ws_alloc( &options, ws_worker, ws_host );
133 if (
uplo == MorseLower) {
134 for (k = 0; k < AD->mt; k++) {
135 RUNTIME_iteration_push(morse, k);
137 int tempkmd = k == AD->mt-1 ? AD->m-k*AD->mb : AD->mb;
138 int ldakd = BLKLDD(AD, k);
141 options.priority = 5;
143 printf(
"POTRF\t|tempkmd:%d k:%d ldakd:%d\n", tempkmd, k, ldakd);
154 MorseLower, tempkmd, AD->mb,
155 AD, k, ADicol, ldakd, 0);
157 for (m = k+1; m < AD->mt; m++) {
158 int ldamuv = BLKLDD(
AUV, m);
161 options.priority = 4;
163 printf(
"TRSM\t|m:%d k:%d ldakd:%d ldamuv:%d\n", m, k, ldakd, ldamuv);
174 MorseLeft, MorseLower, MorseNoTrans, MorseNonUnit,
184 RUNTIME_data_flush( sequence,
AUV, k, k);
186 for (n = k+1; n < AD->mt; n++) {
187 int tempnnd = n == AD->mt-1 ? AD->m-n*AD->mb : AD->mb;
188 int ldand = BLKLDD(AD, n);
189 int ldanuv = BLKLDD(
AUV, n);
198 options.priority = 3;
201 MorseLower, MorseNoTrans,
212 for (m = n+1; m < AD->mt; m++) {
213 int tempmmuv = m ==
AUV->mt-1 ?
AUV->m - m*
AUV->mb :
AUV->mb;
214 int ldamuv = BLKLDD(
AUV, m);
217 options.priority = 2;
219 printf(
"GEMM\t|A(%d,%d)=A(%d,%d)-A(%d,%d)*A(%d,%d) ldamuv:%d tempmmuv:%d\n",
220 m,n,m,n,m,k,n,k,ldamuv, tempmmuv);
224 MorseNoTrans, MorseTrans,
227 mzone,
AUV, Ark, m, k, ldamuv,
228 AUV, Ark, n, k, ldamuv,
229 zone,
AUV, Ark, m, n, ldamuv,
233 RUNTIME_data_flush( sequence,
AUV, n, k);
235 RUNTIME_iteration_pop(morse);
247 RUNTIME_options_ws_free(&options);
248 RUNTIME_options_finalize(&options, morse);
int store_only_diagonal_tiles
void HICMA_TASK_zpotrf(const MORSE_option_t *options, MORSE_enum uplo, int n, int nb, const MORSE_desc_t *A, int Am, int An, int lda, int iinfo)
void hicma_pzpotrf(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, MORSE_sequence_t *sequence, MORSE_request_t *request, int rk, int maxrk, double acc)
void HICMA_TASK_zgemm(const MORSE_option_t *options, MORSE_enum transA, int transB, int m, int n, double alpha, const MORSE_desc_t *AUV, const MORSE_desc_t *Ark, int Am, int An, int lda, const MORSE_desc_t *BUV, const MORSE_desc_t *Brk, int Bm, int Bn, int ldb, double beta, const MORSE_desc_t *CUV, const MORSE_desc_t *Crk, int Cm, int Cn, int ldc, int rk, int maxrk, double acc)
void HICMA_TASK_zsyrk(const MORSE_option_t *options, MORSE_enum uplo, MORSE_enum trans, int n, int nb, double alpha, const MORSE_desc_t *AUV, int ldauv, const MORSE_desc_t *Ark, int Am, int An, double beta, const MORSE_desc_t *CD, int ldcd, int Cm, int Cn)
int HICMA_get_use_fast_hcore_zgemm()
void HICMA_TASK_ztrsm(const MORSE_option_t *options, MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag, int m, double alpha, const MORSE_desc_t *A, int Am, int An, int lda, const MORSE_desc_t *BUV, int Bm, int Bn, int ldb, const MORSE_desc_t *Brk)