PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pclaset.c
Go to the documentation of this file.
1 
15 #include "common.h"
16 
17 #define A(m,n) BLKADDR(A, PLASMA_Complex32_t, m, n)
18 /***************************************************************************/
24  PLASMA_desc A,
25  PLASMA_sequence *sequence, PLASMA_request *request)
26 {
29 
30  int i, j;
31  int ldai, ldaj;
32  int tempim;
33  int tempjm, tempjn;
34  int minmn = min(A.mt, A.nt);
35 
36  plasma = plasma_context_self();
37  if (sequence->status != PLASMA_SUCCESS)
38  return;
39 
40  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
41 
42  if (uplo == PlasmaLower) {
43  for (j = 0; j < minmn; j++){
44  tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
45  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
46  ldaj = BLKLDD(A, j);
48  plasma->quark, &task_flags,
49  PlasmaLower, tempjm, tempjn, alpha, beta,
50  A(j, j), ldaj);
51 
52  for (i = j+1; i < A.mt; i++){
53  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
54  ldai = BLKLDD(A, i);
56  plasma->quark, &task_flags,
57  PlasmaUpperLower, tempim, tempjn, alpha, alpha,
58  A(i, j), ldai);
59  }
60  }
61  }
62  else if (uplo == PlasmaUpper) {
63  for (j = 1; j < A.nt; j++){
64  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
65  for (i = 0; i < min(j, A.mt); i++){
66  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
67  ldai = BLKLDD(A, i);
69  plasma->quark, &task_flags,
70  PlasmaUpperLower, tempim, tempjn, alpha, alpha,
71  A(i, j), ldai);
72  }
73  }
74  for (j = 0; j < minmn; j++){
75  tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
76  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
77  ldaj = BLKLDD(A, j);
79  plasma->quark, &task_flags,
80  PlasmaUpper, tempjm, tempjn, alpha, beta,
81  A(j, j), ldaj);
82  }
83  }
84  else {
85  for (i = 0; i < A.mt; i++){
86  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
87  ldai = BLKLDD(A, i);
88  for (j = 0; j < A.nt; j++){
89  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
91  plasma->quark, &task_flags,
92  PlasmaUpperLower, tempim, tempjn, alpha, alpha,
93  A(i, j), ldai);
94  }
95  }
96  for (j = 0; j < minmn; j++){
97  tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
98  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
99  ldaj = BLKLDD(A, j);
101  plasma->quark, &task_flags,
102  PlasmaUpperLower, tempjm, tempjn, alpha, beta,
103  A(j, j), ldaj);
104  }
105  }
106 }