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
pdbarrier.c
Go to the documentation of this file.
1 
18 #include "common.h"
19 
20 #define A(m,n) BLKADDR(A, double, m, n)
21 
22 /***************************************************************************/
26 {
27  int m, n;
30 
31  plasma = plasma_context_self();
32  if (sequence->status != PLASMA_SUCCESS)
33  return;
34  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
35 
36  for (n = 0; n < A.nt; n++)
37  {
38  /* Protection from previous GATHERV */
39  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
40  sizeof(double)*A.mb*A.nb, A(0, n), INOUT,
41  0);
42 
43  for (m = 0; m < A.mt; m++)
44  {
45  QUARK_Insert_Task(plasma->quark, CORE_foo2_quark, &task_flags,
46  sizeof(double)*A.mb*A.nb, A(0, n), INOUT | GATHERV,
47  sizeof(double)*A.mb*A.nb, A(m, n), INOUT,
48  0);
49  }
50 
51  /* Protection to next GATHERV */
52  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
53  sizeof(double)*A.mb*A.nb, A(0, n), INOUT,
54  0);
55  }
56 }
57 
58 /***************************************************************************/
62 {
63  int m, n;
66 
67  plasma = plasma_context_self();
68  if (sequence->status != PLASMA_SUCCESS)
69  return;
70  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
71 
72  for (n = 0; n < A.nt; n++)
73  {
74  /* Protection from previous GATHERV */
75  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
76  sizeof(double)*A.mb*A.nb, A(0, n), INOUT,
77  0);
78 
79  for (m = 0; m < A.mt; m++)
80  {
81  QUARK_Insert_Task(plasma->quark, CORE_foo2_quark, &task_flags,
82  sizeof(double)*A.mb*A.nb, A(0, n), INPUT,
83  sizeof(double)*A.mb*A.nb, A(m, n), INOUT,
84  0);
85  }
86  }
87 }
88 
89 /***************************************************************************/
93 {
94  int m, n;
97 
98  plasma = plasma_context_self();
99  if (sequence->status != PLASMA_SUCCESS)
100  return;
101  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
102 
103  for (m = 0; m < A.mt; m++)
104  {
105  /* Protection from previous GATHERV */
106  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
107  sizeof(double)*A.mb*A.nb, A(m, 0), INOUT,
108  0);
109 
110  for (n = 0; n < A.nt; n++)
111  {
112  QUARK_Insert_Task(plasma->quark, CORE_foo2_quark, &task_flags,
113  sizeof(double)*A.mb*A.nb, A(m, 0), INOUT | GATHERV,
114  sizeof(double)*A.mb*A.nb, A(m, n), INOUT,
115  0);
116  }
117 
118  /* Protection to next GATHERV */
119  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
120  sizeof(double)*A.mb*A.nb, A(m, 0), INOUT,
121  0);
122  }
123 }
124 
125 /***************************************************************************/
129 {
130  int m, n;
133 
134  plasma = plasma_context_self();
135  if (sequence->status != PLASMA_SUCCESS)
136  return;
137  QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
138 
139  for (m = 0; m < A.mt; m++)
140  {
141  /* Protection from previous GATHERV */
142  QUARK_Insert_Task(plasma->quark, CORE_foo_quark, &task_flags,
143  sizeof(double)*A.mb*A.nb, A(m, 0), INOUT,
144  0);
145 
146  for (n = 0; n < A.nt; n++)
147  {
148  QUARK_Insert_Task(plasma->quark, CORE_foo2_quark, &task_flags,
149  sizeof(double)*A.mb*A.nb, A(m, 0), INPUT,
150  sizeof(double)*A.mb*A.nb, A(m, n), INOUT,
151  0);
152  }
153  }
154 }
155