HiCMA
Hierarchical Computations on Manycore Architectures
pzgytlr.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  *
27  * file pzplrnt.c
28  *
29  * MORSE auxiliary routines
30  * MORSE is a software package provided by Univ. of Tennessee,
31  * Univ. of California Berkeley and Univ. of Colorado Denver
32  *
33  * version 2.5.0
34  * comment This file has been automatically generated
35  * from Plasma 2.5.0 for MORSE 1.0.0
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 "hicma_runtime_z.h"
45 extern int store_only_diagonal_tiles;
46 
47 /***************************************************************************/
51  MORSE_enum uplo,
52  MORSE_desc_t *AUV,
53  MORSE_desc_t *AD,
54  MORSE_desc_t *Ark,
55  unsigned long long int seed,
56  int maxrank, double tol,
57  int compress_diag,
58  MORSE_desc_t *Dense,
59  MORSE_sequence_t *sequence, MORSE_request_t *request )
60 {
61  MORSE_desc_t *A = AUV; // FIXME
62  MORSE_context_t *morse;
63  MORSE_option_t options;
64 
65  int m, n;
66  int tempmm, tempnn;
67 
68  morse = morse_context_self();
69  if (sequence->status != MORSE_SUCCESS)
70  return;
71  RUNTIME_options_init(&options, morse, sequence, request);
72 
73  for (m = 0; m < A->mt; m++) {
74  tempmm = m == A->mt-1 ? A->m-m*A->mb : A->mb;
75  int tempmmD = m == AD->mt-1 ? AD->m-m*AD->mb : AD->mb;
76  int ldamUV = BLKLDD(AUV, m);
77  int ldamD = BLKLDD(AD, m);
78 
79  //for (n = 0; n < A->mt; n++) {
80  // tempnn = n == A->mt-1 ? A->m-n*A->mb : A->mb;
81  for (n = 0; n < A->nt; n++) { //I hope this change does not break anything
82  if(0 && A->nt == 1) { //FIXME for B in TRSM
83  tempnn = A->nb;
84  } else {
85  tempnn = n == A->mt-1 ? A->m-n*A->mb : A->mb;
86  }
87 
88  // if(m<n)
89  // continue;
90  if(uplo == MorseLower && m < n)
91  continue;
92  else
93  if(uplo == MorseUpper && m > n)
94  continue;
95  //printf("Tile (%d,%d) ldam=%d A->m=%d A->n=%d A->mb=%d A->nb=%d\n ", m, n, ldam, A->m, A->n, A->mb, A->nb);
96 
97  int call_diag = 0;
98  int AD_icol;
100  if(m == n) {
101  call_diag = 1;
102  AD_icol = 0;
103  } else {
104  }
105  } else {
106  call_diag = 0; //FIXME call_diag must 1 when AD is full matrix and used
107  AD_icol = n;
108  }
109  if(0 && AUV->nt == 1){
110  call_diag = 0; //FIXME added for B in TRSM
111  }
112  if(call_diag == 1) {
113  //printf("diag %d,%d\n", m, n);
115  &options,
116  tempmmD, tempmmD,
117  AUV,
118  AD, m, AD_icol,
119  Ark,
120  m, n,
121  ldamD, 0, 0,
122  A->m, m*A->mb, n*A->mb, seed,
123  maxrank, tol,
124  compress_diag,
125  Dense
126  );
127  } else {
128  //printf("off %d,%d\n", m, n);
130  &options,
131  tempmmD, tempnn,
132  AUV,
133  Ark,
134  m, n,
135  ldamD, ldamUV, ldamUV,
136  A->m, m*A->mb, n*A->mb, seed,
137  maxrank, tol,
138  compress_diag,
139  Dense
140  );
141  }
142  }
143  }
144  RUNTIME_options_finalize(&options, morse);
145  //MORSE_TASK_dataflush_all(); removed in newer chameleon
146 
147 
148 }
#define AUV(m, n)
Definition: pzgemm.c:60
#define A(m, n)
Definition: pzgemm.c:56
void HICMA_TASK_zgytlr(const MORSE_option_t *options, int m, int n, const MORSE_desc_t *AUV, const MORSE_desc_t *Ark, int Am, int An, int lda, int ldu, int ldv, int bigM, int m0, int n0, unsigned long long int seed, int maxrank, double tol, int compress_diag, const MORSE_desc_t *Dense)
void HICMA_TASK_zgytlr_diag(const MORSE_option_t *options, int m, int n, const MORSE_desc_t *AUV, const MORSE_desc_t *AD, int ADm, int ADn, const MORSE_desc_t *Ark, int Am, int An, int lda, int ldu, int ldv, int bigM, int m0, int n0, unsigned long long int seed, int maxrank, double tol, int compress_diag, const MORSE_desc_t *Dense)
int store_only_diagonal_tiles
int uplo[2]
void hicma_pzgytlr(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, unsigned long long int seed, int maxrank, double tol, int compress_diag, MORSE_desc_t *Dense, MORSE_sequence_t *sequence, MORSE_request_t *request)
Definition: pzgytlr.c:50