HiCMA
Hierarchical Computations on Manycore Architectures
zpotrf.c
Go to the documentation of this file.
1 
17 /*
18  * @copyright (c) 2009-2014 The University of Tennessee and The University
19  * of Tennessee Research Foundation.
20  * All rights reserved.
21  * @copyright (c) 2012-2014 Inria. All rights reserved.
22  * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
23  *
24  */
25 /*
26  * file zpotrf.c
27  *
28  * MORSE computational routines
29  * MORSE is a software package provided by Univ. of Tennessee,
30  * Univ. of California Berkeley and Univ. of Colorado Denver
31  *
32  * version 2.5.0
33  * comment This file has been automatically generated
34  * from Plasma 2.5.0 for MORSE 1.0.0
35  * author Jakub Kurzak
36  * author Mathieu Faverge
37  * author Emmanuel Agullo
38  * author Cedric Castagnede
39  * date 2010-11-15
40  *
41  */
42 #include "morse.h"
43 #include "control/common.h"
44 #include "control/hicma_common.h"
45 
46 /***************************************************************************/
79 int HICMA_zpotrf_Tile(MORSE_enum uplo,
80  MORSE_desc_t *AUV,
81  MORSE_desc_t *AD,
82  MORSE_desc_t *Ark,
83  int rk, int maxrk, double acc
84  )
85 {
86  MORSE_context_t *morse;
87  MORSE_sequence_t *sequence = NULL;
88  MORSE_request_t request = MORSE_REQUEST_INITIALIZER;
89  int status;
90 
91  morse = morse_context_self();
92  if (morse == NULL) {
93  morse_fatal_error("HICMA_zpotrf_Tile", "MORSE not initialized");
94  return MORSE_ERR_NOT_INITIALIZED;
95  }
96  morse_sequence_create(morse, &sequence);
98  AUV, AD, Ark,
99  rk, maxrk, acc,
100  sequence, &request
101  );
102  MORSE_Desc_Flush( AD, sequence );
103  MORSE_Desc_Flush( AUV, sequence );
104  MORSE_Desc_Flush( Ark, sequence );
105  morse_sequence_wait(morse, sequence);
106  /*RUNTIME_desc_getoncpu(AD);*/
107  /*RUNTIME_desc_getoncpu(AUV);*/
108  /*RUNTIME_desc_getoncpu(Ark);*/
109 
110  status = sequence->status;
111  morse_sequence_destroy(morse, sequence);
112  return status;
113 }
114 /***************************************************************************/
133  MORSE_desc_t *AUV,
134  MORSE_desc_t *AD,
135  MORSE_desc_t *Ark,
136  int rk, int maxrk, double acc,
137  MORSE_sequence_t *sequence, MORSE_request_t *request
138  )
139 {
140  MORSE_context_t *morse;
141 
142  morse = morse_context_self();
143  if (morse == NULL) {
144  morse_fatal_error("HICMA_zpotrf_Tile_Async", "MORSE not initialized");
145  return MORSE_ERR_NOT_INITIALIZED;
146  }
147  if (sequence == NULL) {
148  morse_fatal_error("HICMA_zpotrf_Tile_Async", "NULL sequence");
149  return MORSE_ERR_UNALLOCATED;
150  }
151  if (request == NULL) {
152  morse_fatal_error("HICMA_zpotrf_Tile_Async", "NULL request");
153  return MORSE_ERR_UNALLOCATED;
154  }
155  /* Check sequence status */
156  if (sequence->status == MORSE_SUCCESS)
157  request->status = MORSE_SUCCESS;
158  else
159  return morse_request_fail(sequence, request, MORSE_ERR_SEQUENCE_FLUSHED);
160 
161  /* Check descriptors for correctness */
162  if (
163  (morse_desc_check(AUV) != MORSE_SUCCESS)
164  || (morse_desc_check(AD) != MORSE_SUCCESS)
165  || (morse_desc_check(Ark) != MORSE_SUCCESS)
166  ){
167  morse_error("HICMA_zpotrf_Tile_Async", "invalid descriptor");
168  return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
169  }
170  /* Check input arguments */
171  if (AD->nb != AD->mb) {
172  morse_error("HICMA_zpotrf_Tile_Async", "only square tiles supported");
173  return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
174  }
175  if (uplo != MorseUpper && uplo != MorseLower) {
176  morse_error("HICMA_zpotrf_Tile_Async", "illegal value of uplo");
177  return morse_request_fail(sequence, request, -1);
178  }
179  /* Quick return */
180 /*
181  if (chameleon_max(N, 0) == 0)
182  return MORSE_SUCCESS;
183 */
184 
185  hicma_pzpotrf(uplo, AUV, AD, Ark, sequence, request,
186  rk, maxrk, acc
187  );
188 
189  return MORSE_SUCCESS;
190 }
#define AUV(m, n)
Definition: pzgemm.c:60
int HICMA_zpotrf_Tile_Async(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, int rk, int maxrk, double acc, MORSE_sequence_t *sequence, MORSE_request_t *request)
Definition: zpotrf.c:132
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)
Definition: pzpotrf.c:62
int HICMA_zpotrf_Tile(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, int rk, int maxrk, double acc)
Definition: zpotrf.c:79
int uplo[2]