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
plasma.h
Go to the documentation of this file.
1
14
#ifndef _PLASMA_H_
15
#define _PLASMA_H_
16
17
#define PLASMA_VERSION_MAJOR 2
18
#define PLASMA_VERSION_MINOR 4
19
#define PLASMA_VERSION_MICRO 5
20
21
/* CBLAS requires for scalar arguments to be passed by address rather than by value */
22
#ifndef CBLAS_SADDR
23
#define CBLAS_SADDR &
24
#endif
25
29
#define PlasmaByte 0
30
#define PlasmaInteger 1
31
#define PlasmaRealFloat 2
32
#define PlasmaRealDouble 3
33
#define PlasmaComplexFloat 4
34
#define PlasmaComplexDouble 5
35
39
typedef
int
PLASMA_enum
;
40
typedef
int
PLASMA_bool
;
41
typedef
long
PLASMA_index
;
42
typedef
long
PLASMA_size
;
43
47
#define PLASMA_HAS_COMPLEX_H 1
48
49
#if defined(_WIN32)
50
# include <float.h>
51
# if defined(__INTEL_COMPILER)
52
/* Fix name conflict within the cabs prototype (_Complex) that
53
* conflicts with a C99 keyword. */
54
#define _Complex __ConflictingComplex
55
#include <math.h>
56
#undef _Complex
57
#undef complex
58
typedef
float
_Complex
PLASMA_Complex32_t
;
59
typedef
double
_Complex
PLASMA_Complex64_t
;
60
# else
61
/* Use MS VC complex class */
62
#include <complex>
63
typedef
std::complex<float>
PLASMA_Complex32_t
;
64
typedef
std::complex<double>
PLASMA_Complex64_t
;
65
/* For LAPACKE lapacke.h force usage of Windows C++ Complex types */
66
#define LAPACK_COMPLEX_CUSTOM
67
#define lapack_complex_float std::complex<float>
68
#define lapack_complex_double std::complex<double>
69
#undef PLASMA_HAS_COMPLEX_H
70
# endif
71
# define isnan _isnan
72
# define isinf !_finite
73
74
#else
/* _WIN32 */
75
76
typedef
float
_Complex
PLASMA_Complex32_t
;
77
typedef
double
_Complex
PLASMA_Complex64_t
;
78
79
#endif
80
81
/* Sun doesn't ship the complex.h header. Sun Studio doesn't have it and older GCC compilers don't have it either. */
82
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(sun) || defined(__sun)
83
#undef PLASMA_HAS_COMPLEX_H
84
#endif
85
86
#ifdef PLASMA_HAS_COMPLEX_H
87
#include <complex.h>
88
#else
89
90
#ifdef __cplusplus
91
extern
"C"
{
92
#endif
93
94
/* These declarations will not clash with what C++ provides because the names in C++ are name-mangled. */
95
#if !defined(_WIN32)
96
extern
double
cabs
(
PLASMA_Complex64_t
z);
97
extern
PLASMA_Complex64_t
conj
(
PLASMA_Complex64_t
z);
98
#endif
99
extern
float
cabsf
(
PLASMA_Complex32_t
z);
100
extern
double
cimag
(
PLASMA_Complex64_t
z);
101
extern
double
creal
(
PLASMA_Complex64_t
z);
102
103
#ifdef __cplusplus
104
}
105
#endif
106
107
#endif
108
109
#include <
quark.h
>
110
129
typedef
struct
plasma_desc_t
{
130
void
*
mat
;
// pointer to the beginning of the matrix
131
size_t
A21
;
// pointer to the beginning of the matrix A21
132
size_t
A12
;
// pointer to the beginning of the matrix A12
133
size_t
A22
;
// pointer to the beginning of the matrix A22
134
PLASMA_enum
dtyp
;
// precision of the matrix
135
int
mb
;
// number of rows in a tile
136
int
nb
;
// number of columns in a tile
137
int
bsiz
;
// size in elements including padding
138
int
lm
;
// number of rows of the entire matrix
139
int
ln
;
// number of columns of the entire matrix
140
int
lm1
;
// number of tile rows of the A11 matrix - derived parameter
141
int
ln1
;
// number of tile columns of the A11 matrix - derived parameter
142
int
lmt
;
// number of tile rows of the entire matrix - derived parameter
143
int
lnt
;
// number of tile columns of the entire matrix - derived parameter
144
int
i
;
// row index to the beginning of the submatrix
145
int
j
;
// column index to the beginning of the submatrix
146
int
m
;
// number of rows of the submatrix
147
int
n
;
// number of columns of the submatrix
148
int
mt
;
// number of tile rows of the submatrix - derived parameter
149
int
nt
;
// number of tile columns of the submatrix - derived parameter
150
}
PLASMA_desc
;
151
155
typedef
struct
plasma_request_t
{
156
PLASMA_enum
status
;
// PLASMA_SUCCESS or appropriate error code
157
}
PLASMA_request
;
158
159
#define PLASMA_REQUEST_INITIALIZER {PLASMA_SUCCESS}
160
165
typedef
struct
plasma_sequence_t
{
166
Quark_Sequence
*
quark_sequence
;
// QUARK sequence associated with PLASMA sequence
167
PLASMA_bool
status
;
// PLASMA_SUCCESS or appropriate error code
168
PLASMA_request
*
request
;
// failed request
169
}
PLASMA_sequence
;
170
180
#define PlasmaCM 101
181
#define PlasmaRM 102
182
#define PlasmaCCRB 103
183
#define PlasmaCRRB 104
184
#define PlasmaRCRB 105
185
#define PlasmaRRRB 106
186
187
#define PlasmaNoTrans 111
188
#define PlasmaTrans 112
189
#define PlasmaConjTrans 113
190
191
#define PlasmaUpper 121
192
#define PlasmaLower 122
193
#define PlasmaUpperLower 123
194
195
#define PlasmaNonUnit 131
196
#define PlasmaUnit 132
197
198
#define PlasmaLeft 141
199
#define PlasmaRight 142
200
201
#define PlasmaOneNorm 171
202
#define PlasmaRealOneNorm 172
203
#define PlasmaTwoNorm 173
204
#define PlasmaFrobeniusNorm 174
205
#define PlasmaInfNorm 175
206
#define PlasmaRealInfNorm 176
207
#define PlasmaMaxNorm 177
208
#define PlasmaRealMaxNorm 178
209
210
#define PlasmaDistUniform 201
211
#define PlasmaDistSymmetric 202
212
#define PlasmaDistNormal 203
213
214
#define PlasmaHermGeev 241
215
#define PlasmaHermPoev 242
216
#define PlasmaNonsymPosv 243
217
#define PlasmaSymPosv 244
218
219
#define PlasmaNoPacking 291
220
#define PlasmaPackSubdiag 292
221
#define PlasmaPackSupdiag 293
222
#define PlasmaPackColumn 294
223
#define PlasmaPackRow 295
224
#define PlasmaPackLowerBand 296
225
#define PlasmaPackUpeprBand 297
226
#define PlasmaPackAll 298
227
228
#define PlasmaNoVec 301
229
#define PlasmaVec 302
230
231
#define PlasmaForward 391
232
#define PlasmaBackward 392
233
234
#define PlasmaColumnwise 401
235
#define PlasmaRowwise 402
236
#define PlasmaTrd 1001
237
#define PlasmaBrd 1002
238
239
#define PlasmaW 501
240
#define PlasmaA2 502
241
242
#define plasma_const_neg(const) (((const-1)^0x01)+1)
243
247
#define PLASMA_FALSE 0
248
#define PLASMA_TRUE 1
249
253
#define PLASMA_WARNINGS 1
254
#define PLASMA_ERRORS 2
255
#define PLASMA_AUTOTUNING 3
256
#define PLASMA_DAG 4
257
261
#define PLASMA_CONCURRENCY 1
262
#define PLASMA_TILE_SIZE 2
263
#define PLASMA_INNER_BLOCK_SIZE 3
264
#define PLASMA_SCHEDULING_MODE 4
265
#define PLASMA_HOUSEHOLDER_MODE 5
266
#define PLASMA_HOUSEHOLDER_SIZE 6
267
#define PLASMA_TRANSLATION_MODE 7
268
269
#define PLASMA_STATIC_SCHEDULING 1
270
#define PLASMA_DYNAMIC_SCHEDULING 2
271
272
#define PLASMA_FLAT_HOUSEHOLDER 1
273
#define PLASMA_TREE_HOUSEHOLDER 2
274
275
#define PLASMA_INPLACE 1
276
#define PLASMA_OUTOFPLACE 2
277
281
#define PLASMA_SUCCESS 0
282
#define PLASMA_ERR_NOT_INITIALIZED -101
283
#define PLASMA_ERR_REINITIALIZED -102
284
#define PLASMA_ERR_NOT_SUPPORTED -103
285
#define PLASMA_ERR_ILLEGAL_VALUE -104
286
#define PLASMA_ERR_NOT_FOUND -105
287
#define PLASMA_ERR_OUT_OF_RESOURCES -106
288
#define PLASMA_ERR_INTERNAL_LIMIT -107
289
#define PLASMA_ERR_UNALLOCATED -108
290
#define PLASMA_ERR_FILESYSTEM -109
291
#define PLASMA_ERR_UNEXPECTED -110
292
#define PLASMA_ERR_SEQUENCE_FLUSHED -111
293
297
#include <
plasma_z.h
>
298
#include <
plasma_d.h
>
299
#include <
plasma_c.h
>
300
#include <
plasma_s.h
>
301
#include <
plasma_zc.h
>
302
#include <
plasma_ds.h
>
303
304
#ifdef __cplusplus
305
extern
"C"
{
306
#endif
307
311
int
PLASMA_Version
(
int
*ver_major,
int
*ver_minor,
int
*ver_micro);
312
int
PLASMA_Enable
(
PLASMA_enum
lever);
313
int
PLASMA_Disable
(
PLASMA_enum
lever);
314
int
PLASMA_Set
(
PLASMA_enum
param,
int
value);
315
int
PLASMA_Get
(
PLASMA_enum
param,
int
*value);
316
int
PLASMA_Init
(
int
cores);
317
int
PLASMA_Init_Affinity
(
int
cores,
int
*bindtab);
318
int
PLASMA_Finalize
();
319
int
PLASMA_Desc_Create
(
PLASMA_desc
**desc,
void
*mat,
PLASMA_enum
dtyp,
int
mb,
int
nb,
int
bsiz,
int
lm,
int
ln,
int
i,
int
j,
int
m,
int
n);
320
int
PLASMA_Desc_Destroy
(
PLASMA_desc
**desc);
321
int
PLASMA_Lapack_to_Tile
(
void
*Af77,
int
LDA,
PLASMA_desc
*
A
);
322
int
PLASMA_Tile_to_Lapack
(
PLASMA_desc
*A,
void
*Af77,
int
LDA);
323
327
int
PLASMA_Dealloc_Handle
(
void
**handle);
328
int
PLASMA_Dealloc_Handle_Tile
(
PLASMA_desc
**desc);
329
333
int
PLASMA_Sequence_Create
(
PLASMA_sequence
**sequence);
334
int
PLASMA_Sequence_Destroy
(
PLASMA_sequence
*sequence);
335
int
PLASMA_Sequence_Wait
(
PLASMA_sequence
*sequence);
336
int
PLASMA_Sequence_Flush
(
PLASMA_sequence
*sequence,
PLASMA_request
*request);
337
338
#ifdef __cplusplus
339
}
340
#endif
341
342
#endif
plasma_2.4.5
include
plasma.h
Generated on Mon Jul 9 2012 12:45:02 for PLASMA by
1.8.1