PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
pcbarrier.c
Go to the documentation of this file.
1
18
#include "
common.h
"
19
20
#define A(m,n) BLKADDR(A, PLASMA_Complex32_t, m, n)
21
22
/***************************************************************************/
25
void
plasma_pcbarrier_tl2pnl_quark
(
PLASMA_desc
A
,
PLASMA_sequence
*sequence,
PLASMA_request
*request)
26
{
27
int
m, n;
28
plasma_context_t
*
plasma
;
29
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
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
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(0, n),
INOUT
|
GATHERV
,
47
sizeof
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(0, n),
INOUT
,
54
0);
55
}
56
}
57
58
/***************************************************************************/
61
void
plasma_pcbarrier_pnl2tl_quark
(
PLASMA_desc
A
,
PLASMA_sequence
*sequence,
PLASMA_request
*request)
62
{
63
int
m, n;
64
plasma_context_t
*
plasma
;
65
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
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
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(0, n),
INPUT
,
83
sizeof
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(m, n),
INOUT
,
84
0);
85
}
86
}
87
}
88
89
/***************************************************************************/
92
void
plasma_pcbarrier_tl2row_quark
(
PLASMA_desc
A
,
PLASMA_sequence
*sequence,
PLASMA_request
*request)
93
{
94
int
m, n;
95
plasma_context_t
*
plasma
;
96
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
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
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(m, 0),
INOUT
|
GATHERV
,
114
sizeof
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(m, 0),
INOUT
,
121
0);
122
}
123
}
124
125
/***************************************************************************/
128
void
plasma_pcbarrier_row2tl_quark
(
PLASMA_desc
A
,
PLASMA_sequence
*sequence,
PLASMA_request
*request)
129
{
130
int
m, n;
131
plasma_context_t
*
plasma
;
132
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
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
(
PLASMA_Complex32_t
)*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
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(m, 0),
INPUT
,
150
sizeof
(
PLASMA_Complex32_t
)*A.
mb
*A.
nb
, A(m, n),
INOUT
,
151
0);
152
}
153
}
154
}
155
plasma_2.4.5
compute
pcbarrier.c
Generated on Mon Jul 9 2012 12:44:54 for PLASMA by
1.8.1