30 #include "../include/diag.h" 86 double *
A,
int LDA,
int diag_thick)
90 MORSE_context_t *morse;
91 MORSE_sequence_t *sequence = NULL;
92 MORSE_request_t request = MORSE_REQUEST_INITIALIZER;
93 MORSE_desc_t descAl, descAt;
95 morse = morse_context_self();
97 morse_fatal_error(
"MORSE_diag_dpotrf",
"MORSE not initialized");
98 return MORSE_ERR_NOT_INITIALIZED;
101 if ((uplo != MorseUpper) && (uplo != MorseLower)) {
102 morse_error(
"MORSE_diag_dpotrf",
"illegal value of uplo");
106 morse_error(
"MORSE_diag_dpotrf",
"illegal value of N");
109 if (LDA < chameleon_max(1, N)) {
110 morse_error(
"MORSE_diag_dpotrf",
"illegal value of LDA");
114 if (chameleon_max(N, 0) == 0)
115 return MORSE_SUCCESS;
118 status = morse_tune(MORSE_FUNC_DPOSV, N, N, 0);
119 if (status != MORSE_SUCCESS) {
120 morse_error(
"MORSE_diag_dpotrf",
"morse_tune() failed");
127 morse_sequence_create( morse, &sequence );
130 morse_dlap2tile( morse, &descAl, &descAt, MorseDescInout, uplo,
131 A, NB, NB, LDA, N, N, N, sequence, &request );
137 morse_dtile2lap( morse, &descAl, &descAt,
138 MorseDescInout, uplo, sequence, &request );
140 morse_sequence_wait( morse, sequence );
143 morse_dtile2lap_cleanup( morse, &descAl, &descAt );
145 status = sequence->status;
146 morse_sequence_destroy( morse, sequence );
200 MORSE_context_t *morse;
201 MORSE_sequence_t *sequence = NULL;
202 MORSE_request_t request = MORSE_REQUEST_INITIALIZER;
205 morse = morse_context_self();
207 morse_fatal_error(
"MORSE_dpotrf_Tile",
"MORSE not initialized");
208 return MORSE_ERR_NOT_INITIALIZED;
210 morse_sequence_create(morse, &sequence);
212 MORSE_Desc_Flush( A, sequence );
213 morse_sequence_wait(morse, sequence);
216 status = sequence->status;
217 morse_sequence_destroy(morse, sequence);
251 MORSE_sequence_t *sequence, MORSE_request_t *request)
253 MORSE_context_t *morse;
255 morse = morse_context_self();
257 morse_fatal_error(
"MORSE_dpotrf_Tile_Async",
"MORSE not initialized");
258 return MORSE_ERR_NOT_INITIALIZED;
260 if (sequence == NULL) {
261 morse_fatal_error(
"MORSE_dpotrf_Tile_Async",
"NULL sequence");
262 return MORSE_ERR_UNALLOCATED;
264 if (request == NULL) {
265 morse_fatal_error(
"MORSE_dpotrf_Tile_Async",
"NULL request");
266 return MORSE_ERR_UNALLOCATED;
269 if (sequence->status == MORSE_SUCCESS)
270 request->status = MORSE_SUCCESS;
272 return morse_request_fail(sequence, request, MORSE_ERR_SEQUENCE_FLUSHED);
275 if (morse_desc_check(A) != MORSE_SUCCESS) {
276 morse_error(
"MORSE_dpotrf_Tile_Async",
"invalid descriptor");
277 return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
280 if (A->nb != A->mb) {
281 morse_error(
"MORSE_dpotrf_Tile_Async",
"only square tiles supported");
282 return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
284 if (uplo != MorseUpper && uplo != MorseLower) {
285 morse_error(
"MORSE_dpotrf_Tile_Async",
"illegal value of uplo");
286 return morse_request_fail(sequence, request, -1);
295 return MORSE_SUCCESS;
int MORSE_dpotrf_diag_Tile(MORSE_enum uplo, MORSE_desc_t *A, int diag_thick)
int MORSE_dpotrf_diag_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, int diag_thick, MORSE_sequence_t *sequence, MORSE_request_t *request)
void morse_pdpotrf_diag(MORSE_enum uplo, MORSE_desc_t *A, int diag_thick, MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_dpotrf_diag(MORSE_enum uplo, int N, double *A, int LDA, int diag_thick)