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
pclauum.c
Go to the documentation of this file.
1
17
#include "
common.h
"
18
19
#define A(m,n) BLKADDR(A, PLASMA_Complex32_t, m, n)
20
/***************************************************************************/
23
void
plasma_pclauum_quark
(
PLASMA_enum
uplo
,
PLASMA_desc
A
,
24
PLASMA_sequence
*sequence,
PLASMA_request
*request)
25
{
26
plasma_context_t
*
plasma
;
27
Quark_Task_Flags
task_flags =
Quark_Task_Flags_Initializer
;
28
29
int
k, m, n;
30
int
ldam;
31
int
tempkm, tempmm, tempnn;
32
33
PLASMA_Complex32_t
zone = (
PLASMA_Complex32_t
)1.0;
34
35
plasma =
plasma_context_self
();
36
if
(sequence->
status
!=
PLASMA_SUCCESS
)
37
return
;
38
QUARK_Task_Flag_Set
(&task_flags,
TASK_SEQUENCE
, (intptr_t)sequence->
quark_sequence
);
39
/*
40
* PlasmaLower
41
*/
42
if
(uplo ==
PlasmaLower
) {
43
for
(m = 0; m < A.
mt
; m++) {
44
tempmm = m == A.
mt
-1 ? A.
m
-m*A.
mb
: A.
mb
;
45
ldam =
BLKLDD
(A, m);
46
for
(n = 0; n < m; n++) {
47
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
48
QUARK_CORE_cherk
(
49
plasma->
quark
, &task_flags,
50
uplo,
PlasmaConjTrans
,
51
tempnn, tempmm, A.
mb
,
52
1.0, A(m, n), ldam,
53
1.0,
A
(n, n), A.
mb
);
54
55
for
(k = n+1; k < m; k++) {
56
tempkm = k == A.
mt
-1 ? A.
m
-k*A.
mb
: A.
mb
;
57
QUARK_CORE_cgemm
(
58
plasma->
quark
, &task_flags,
59
PlasmaConjTrans
,
PlasmaNoTrans
,
60
tempkm, tempnn, tempmm, A.
mb
,
61
zone, A(m, k), ldam,
62
A
(m, n), ldam,
63
zone,
A
(k, n), A.
mb
);
64
}
65
}
66
for
(n = 0; n < m; n++) {
67
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
68
QUARK_CORE_ctrmm
(
69
plasma->
quark
, &task_flags,
70
PlasmaLeft
, uplo,
PlasmaConjTrans
,
PlasmaNonUnit
,
71
tempmm, tempnn, A.
mb
,
72
zone, A(m, m), ldam,
73
A
(m, n), ldam);
74
}
75
QUARK_CORE_clauum
(
76
plasma->
quark
, &task_flags,
77
uplo,
78
tempmm,
79
A.
mb
, A(m, m), ldam);
80
}
81
}
82
/*
83
* PlasmaUpper
84
*/
85
else
{
86
for
(m = 0; m < A.
mt
; m++) {
87
tempmm = m == A.
mt
-1 ? A.
m
-m*A.
mb
: A.
mb
;
88
ldam =
BLKLDD
(A, m);
89
for
(n = 0; n < m; n++) {
90
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
91
QUARK_CORE_cherk
(
92
plasma->
quark
, &task_flags,
93
uplo,
PlasmaNoTrans
,
94
tempnn, tempmm, A.
mb
,
95
1.0, A(n, m), A.
mb
,
96
1.0, A(n, n), A.
mb
);
97
98
for
(k = n+1; k < m; k++){
99
tempkm = k == A.
mt
-1 ? A.
m
-k*A.
mb
: A.
mb
;
100
QUARK_CORE_cgemm
(
101
plasma->
quark
, &task_flags,
102
PlasmaNoTrans
,
PlasmaConjTrans
,
103
tempnn, tempkm, tempmm, A.
mb
,
104
zone, A(n, m), A.
mb
,
105
A(k, m), A.
mb
,
106
zone, A(n, k), A.
mb
);
107
}
108
}
109
for
(n = 0; n < m; n++) {
110
tempnn = n == A.
nt
-1 ? A.
n
-n*A.
nb
: A.
nb
;
111
QUARK_CORE_ctrmm
(
112
plasma->
quark
, &task_flags,
113
PlasmaRight
, uplo,
PlasmaConjTrans
,
PlasmaNonUnit
,
114
tempnn, tempmm, A.
mb
,
115
zone, A(m, m), ldam,
116
A
(n, m), A.
mb
);
117
}
118
QUARK_CORE_clauum
(
119
plasma->
quark
, &task_flags,
120
uplo,
121
tempmm,
122
A.
mb
, A(m, m), ldam);
123
}
124
}
125
}
plasma_2.4.5
compute
pclauum.c
Generated on Mon Jul 9 2012 12:44:55 for PLASMA by
1.8.1