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
core_zgetrip.c
Go to the documentation of this file.
1
21
#include <stdlib.h>
22
#include "
common.h
"
23
#include "
quark.h
"
24
50
#if defined(PLASMA_HAVE_WEAK)
51
#pragma weak CORE_zgetrip = PCORE_zgetrip
52
#define CORE_zgetrip PCORE_zgetrip
53
#endif
54
void
CORE_zgetrip
(
int
m,
int
n,
PLASMA_Complex64_t
*
A
,
PLASMA_Complex64_t
*
W
) {
55
PLASMA_Complex64_t
t;
56
int
i, j;
57
58
if
( m != n ) {
59
/* rectangular transposition (use workspace) */
60
for
(i=0; i<m; i++) {
61
for
(j=0; j<n; j++) {
62
W[j+i*n] = A[i+j*m];
63
}
64
}
65
memcpy(A, W, m*n*
sizeof
(
PLASMA_Complex64_t
));
66
}
67
else
{
68
/* square transposition (swap pairwise) */
69
for
(i=0; i<m; i++) {
70
for
(j=i+1; j<n; j++) {
71
t = A[j+i*n];
72
A[j+i*n] = A[i+j*m];
73
A[i+j*m] = t;
74
}
75
}
76
}
77
}
78
79
/***************************************************************************/
82
void
QUARK_CORE_zgetrip
(
Quark
*quark,
Quark_Task_Flags
*task_flags,
83
int
m,
int
n,
PLASMA_Complex64_t
*
A
,
int
szeA)
84
{
85
DAG_CORE_GETRIP
;
86
QUARK_Insert_Task
(quark,
CORE_zgetrip_quark
, task_flags,
87
sizeof
(
int
), &m,
VALUE
,
88
sizeof
(
int
), &n,
VALUE
,
89
sizeof
(
PLASMA_Complex64_t
)*szeA, A,
INOUT
,
90
sizeof
(
PLASMA_Complex64_t
)*szeA, NULL,
SCRATCH
,
91
0);
92
}
93
94
/***************************************************************************/
97
#if defined(PLASMA_HAVE_WEAK)
98
#pragma weak CORE_zgetrip_quark = PCORE_zgetrip_quark
99
#define CORE_zgetrip_quark PCORE_zgetrip_quark
100
#endif
101
void
CORE_zgetrip_quark
(
Quark
*quark)
102
{
103
int
m;
104
int
n;
105
PLASMA_Complex64_t
*
A
;
106
PLASMA_Complex64_t
*
W
;
107
108
quark_unpack_args_4
(quark, m, n, A, W);
109
CORE_zgetrip
(m, n, A, W);
110
}
111
112
/***************************************************************************/
115
void
QUARK_CORE_zgetrip_f1
(
Quark
*quark,
Quark_Task_Flags
*task_flags,
116
int
m,
int
n,
117
PLASMA_Complex64_t
*
A
,
int
szeA,
118
PLASMA_Complex64_t
*fake,
int
szeF,
int
paramF)
119
{
120
DAG_CORE_GETRIP
;
121
QUARK_Insert_Task
(
122
quark,
CORE_zgetrip_f1_quark
, task_flags,
123
sizeof
(
int
), &m,
VALUE
,
124
sizeof
(
int
), &n,
VALUE
,
125
sizeof
(
PLASMA_Complex64_t
)*szeA, A,
INOUT
,
126
sizeof
(
PLASMA_Complex64_t
)*szeA, NULL,
SCRATCH
,
127
sizeof
(
PLASMA_Complex64_t
)*szeF, fake, paramF,
128
0);
129
}
130
131
/***************************************************************************/
134
#if defined(PLASMA_HAVE_WEAK)
135
#pragma weak CORE_zgetrip_f1_quark = PCORE_zgetrip_f1_quark
136
#define CORE_zgetrip_f1_quark PCORE_zgetrip_f1_quark
137
#endif
138
void
CORE_zgetrip_f1_quark
(
Quark
*quark)
139
{
140
int
m;
141
int
n;
142
PLASMA_Complex64_t
*
A
;
143
PLASMA_Complex64_t
*
W
;
144
PLASMA_Complex64_t
*fake;
145
146
quark_unpack_args_5
(quark, m, n, A, W, fake);
147
CORE_zgetrip
(m, n, A, W);
148
}
149
150
/***************************************************************************/
153
void
QUARK_CORE_zgetrip_f2
(
Quark
*quark,
Quark_Task_Flags
*task_flags,
154
int
m,
int
n,
155
PLASMA_Complex64_t
*
A
,
int
szeA,
156
PLASMA_Complex64_t
*fake1,
int
szeF1,
int
paramF1,
157
PLASMA_Complex64_t
*fake2,
int
szeF2,
int
paramF2)
158
{
159
DAG_CORE_GETRIP
;
160
QUARK_Insert_Task
(
161
quark,
CORE_zgetrip_f2_quark
, task_flags,
162
sizeof
(
int
), &m,
VALUE
,
163
sizeof
(
int
), &n,
VALUE
,
164
sizeof
(
PLASMA_Complex64_t
)*szeA, A,
INOUT
,
165
sizeof
(
PLASMA_Complex64_t
)*szeA, NULL,
SCRATCH
,
166
sizeof
(
PLASMA_Complex64_t
)*szeF1, fake1, paramF1,
167
sizeof
(
PLASMA_Complex64_t
)*szeF2, fake2, paramF2,
168
0);
169
}
170
171
/***************************************************************************/
174
#if defined(PLASMA_HAVE_WEAK)
175
#pragma weak CORE_zgetrip_f2_quark = PCORE_zgetrip_f2_quark
176
#define CORE_zgetrip_f2_quark PCORE_zgetrip_f2_quark
177
#endif
178
void
CORE_zgetrip_f2_quark
(
Quark
*quark)
179
{
180
int
m;
181
int
n;
182
PLASMA_Complex64_t
*
A
;
183
PLASMA_Complex64_t
*
W
;
184
PLASMA_Complex64_t
*fake1;
185
PLASMA_Complex64_t
*fake2;
186
187
quark_unpack_args_6
(quark, m, n, A, W, fake1, fake2);
188
CORE_zgetrip
(m, n, A, W);
189
}
plasma_2.4.5
core_blas
core_zgetrip.c
Generated on Mon Jul 9 2012 12:45:01 for PLASMA by
1.8.1