32 #include "../include/diag.h" 34 #define A(m,n) A, m, n 39 MORSE_sequence_t *sequence, MORSE_request_t *request)
41 MORSE_context_t *morse;
42 MORSE_option_t options;
46 int tempkm, tempmm, tempnn;
49 double zone = (double) 1.0;
50 double mzone = (double)-1.0;
52 morse = morse_context_self();
53 if (sequence->status != MORSE_SUCCESS)
55 RUNTIME_options_init(&options, morse, sequence, request);
57 RUNTIME_options_ws_alloc( &options, 0, ws_host );
62 if (uplo == MorseLower) {
63 for (k = 0; k < A->mt; k++) {
64 RUNTIME_iteration_push(morse, k);
66 tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
69 options.priority = 2*A->mt - 2*k;
72 MorseLower, tempkm, A->mb,
73 A(k, k), ldak, A->nb*k);
75 for (m = k+1; m < A->mt && m < k+diag_thick; m++) {
76 tempmm = m == A->mt-1 ? A->m-m*A->mb : A->mb;
79 options.priority = 2*A->mt - 2*k - m;
82 MorseRight, MorseLower, MorseTrans, MorseNonUnit,
87 RUNTIME_data_flush( sequence,
A(k, k) );
89 for (n = k+1; n < A->nt && n < k+diag_thick; n++) {
90 tempnn = n == A->nt-1 ? A->n-n*A->nb : A->nb;
93 options.priority = 2*A->mt - 2*k - n;
96 MorseLower, MorseNoTrans,
101 for (m = n+1; m < A->mt && m < n+diag_thick; m++) {
102 tempmm = m == A->mt-1 ? A->m - m*A->mb : A->mb;
105 options.priority = 2*A->mt - 2*k - n - m;
108 MorseNoTrans, MorseTrans,
109 tempmm, tempnn, A->mb, A->mb,
110 mzone, A(m, k), ldam,
112 zone,
A(m, n), ldam);
114 RUNTIME_data_flush( sequence,
A(n, k) );
116 RUNTIME_iteration_pop(morse);
123 for (k = 0; k < A->nt; k++) {
124 RUNTIME_iteration_push(morse, k);
126 tempkm = k == A->nt-1 ? A->n-k*A->nb : A->nb;
129 options.priority = 2*A->nt - 2*k;
134 A(k, k), ldak, A->nb*k);
136 for (n = k+1; n < A->nt; n++) {
137 tempnn = n == A->nt-1 ? A->n - n*A->nb : A->nb;
139 options.priority = 2*A->nt - 2*k - n;
142 MorseLeft, MorseUpper, MorseTrans, MorseNonUnit,
143 A->mb, tempnn, A->mb,
147 RUNTIME_data_flush( sequence,
A(k, k) );
149 for (m = k+1; m < A->mt; m++) {
150 tempmm = m == A->mt-1 ? A->m - m*A->mb : A->mb;
153 options.priority = 2*A->nt - 2*k - m;
156 MorseUpper, MorseTrans,
157 tempmm, A->mb, A->mb,
161 for (n = m+1; n < A->nt; n++) {
162 tempnn = n == A->nt-1 ? A->n-n*A->nb : A->nb;
164 options.priority = 2*A->nt - 2*k - n - m;
167 MorseTrans, MorseNoTrans,
168 tempmm, tempnn, A->mb, A->mb,
169 mzone, A(k, m), ldak,
171 zone,
A(m, n), ldam);
173 RUNTIME_data_flush( sequence,
A(k, m) );
176 RUNTIME_iteration_pop(morse);
180 RUNTIME_options_ws_free(&options);
181 RUNTIME_options_finalize(&options, morse);
void morse_pdpotrf_diag(MORSE_enum uplo, MORSE_desc_t *A, int diag_thick, MORSE_sequence_t *sequence, MORSE_request_t *request)