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
pzlaset2.c
Go to the documentation of this file.
1 
15 #include "common.h"
16 
17 #define A(m,n) BLKADDR(A, PLASMA_Complex64_t, m, n)
18 /***************************************************************************/
23  PLASMA_desc A,
24  PLASMA_sequence *sequence, PLASMA_request *request)
25 {
28 
29  int i, j;
30  int ldai, ldaj;
31  int tempim;
32  int tempjm, tempjn;
33  int minmn = min(A.mt, A.nt);
34 
35  plasma = plasma_context_self();
36  if (sequence->status != PLASMA_SUCCESS)
37  return;
38 
39  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
40 
41  if (uplo == PlasmaLower) {
42  for (j = 0; j < minmn; j++){
43  tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
44  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
45  ldaj = BLKLDD(A, j);
47  plasma->quark, &task_flags,
48  PlasmaLower, tempjm, tempjn, alpha,
49  A(j, j), ldaj);
50 
51  for (i = j+1; i < A.mt; i++){
52  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
53  ldai = BLKLDD(A, i);
55  plasma->quark, &task_flags,
56  PlasmaUpperLower, tempim, tempjn, alpha,
57  A(i, j), ldai);
58  }
59  }
60  }
61  else if (uplo == PlasmaUpper) {
62  for (j = 1; j < A.nt; j++){
63  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
64  for (i = 0; i < min(j, A.mt); i++){
65  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
66  ldai = BLKLDD(A, i);
68  plasma->quark, &task_flags,
69  PlasmaUpperLower, tempim, tempjn, alpha,
70  A(i, j), ldai);
71  }
72  }
73  for (j = 0; j < minmn; j++){
74  tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
75  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
76  ldaj = BLKLDD(A, j);
78  plasma->quark, &task_flags,
79  PlasmaUpper, tempjm, tempjn, alpha,
80  A(j, j), ldaj);
81  }
82  }
83  else {
84  for (i = 0; i < A.mt; i++){
85  tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
86  ldai = BLKLDD(A, i);
87  for (j = 0; j < A.nt; j++){
88  tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
90  plasma->quark, &task_flags,
91  PlasmaUpperLower, tempim, tempjn, alpha,
92  A(i, j), ldai);
93  }
94  }
95  }
96 }