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
pzplghe.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
/***************************************************************************/
21
void
plasma_pzplghe
(
plasma_context_t
*
plasma
)
22
{
23
double
bump;
24
PLASMA_desc
A
;
25
unsigned
long
long
int
seed;
26
PLASMA_sequence
*sequence;
27
PLASMA_request
*request;
28
29
int
m, n;
30
int
next_m;
31
int
next_n;
32
int
ldam;
33
int
tempmm, tempnn;
34
35
plasma_unpack_args_5
(bump, A, seed, sequence, request);
36
if
(sequence->
status
!=
PLASMA_SUCCESS
)
37
return
;
38
39
n = 0;
40
m =
PLASMA_RANK
;
41
while
(m >= A.
mt
) {
42
n++;
43
m = m - A.
mt
;
44
}
45
46
while
( n < A.
nt
) {
47
next_n = n;
48
next_m = m;
49
50
next_m +=
PLASMA_SIZE
;
51
while
( next_m >= A.
mt
&& next_n < A.
nt
) {
52
next_n++;
53
next_m = next_m - A.
mt
;
54
}
55
56
tempmm = m == A.
mt
-1 ? A.
m
-m*A.
mb
: A.
mb
;
57
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
58
ldam =
BLKLDD
(A, m);
59
60
CORE_zplghe
(
61
bump, tempmm, tempnn,
A
(m, n), ldam,
62
A.
m
, m*A.
mb
, n*A.
nb
, seed );
63
64
m = next_m;
65
n = next_n;
66
}
67
}
68
69
/***************************************************************************/
72
void
plasma_pzplghe_quark
(
double
bump,
PLASMA_desc
A
,
unsigned
long
long
int
seed,
73
PLASMA_sequence
*sequence,
PLASMA_request
*request )
74
{
75
plasma_context_t
*
plasma
;
76
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
77
78
int
m, n;
79
int
ldam;
80
int
tempmm, tempnn;
81
82
plasma =
plasma_context_self
();
83
if
(sequence->
status
!=
PLASMA_SUCCESS
)
84
return
;
85
QUARK_Task_Flag_Set
(&task_flags,
TASK_SEQUENCE
, (intptr_t)sequence->
quark_sequence
);
86
87
for
(m = 0; m < A.
mt
; m++) {
88
tempmm = m == A.
mt
-1 ? A.
m
-m*A.
mb
: A.
mb
;
89
ldam =
BLKLDD
(A, m);
90
91
for
(n = 0; n < A.
nt
; n++) {
92
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
93
94
QUARK_CORE_zplghe
(
95
plasma->
quark
, &task_flags,
96
bump, tempmm, tempnn, A(m, n), ldam,
97
A.
m
, m*A.
mb
, n*A.
nb
, seed );
98
99
}
100
}
101
}
plasma_2.4.5
compute
pzplghe.c
Generated on Mon Jul 9 2012 12:44:56 for PLASMA by
1.8.1