PLASMA 2.8.0 PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures

- Main Page
- Modules
- Data Types List

plasmatypes.h
1
17 #ifndef _PLASMATYPES_H_
18 #define _PLASMATYPES_H_
19
23 #define PLASMA_VERSION_MAJOR 2
24 #define PLASMA_VERSION_MINOR 8
25 #define PLASMA_VERSION_MICRO 0
26
30 #define PLASMA_SUCCESS 0
31 #define PLASMA_ERR_NOT_INITIALIZED -101
32 #define PLASMA_ERR_REINITIALIZED -102
33 #define PLASMA_ERR_NOT_SUPPORTED -103
34 #define PLASMA_ERR_ILLEGAL_VALUE -104
35 #define PLASMA_ERR_NOT_FOUND -105
36 #define PLASMA_ERR_OUT_OF_RESOURCES -106
37 #define PLASMA_ERR_INTERNAL_LIMIT -107
38 #define PLASMA_ERR_UNALLOCATED -108
39 #define PLASMA_ERR_FILESYSTEM -109
40 #define PLASMA_ERR_UNEXPECTED -110
41 #define PLASMA_ERR_SEQUENCE_FLUSHED -111
42
46 typedef int PLASMA_enum;
47 typedef int PLASMA_bool;
48 typedef long PLASMA_index;
49 typedef long PLASMA_size;
50 typedef double PLASMA_Double_t;
51
55 #define PlasmaByte 0
56 #define PlasmaInteger 1
57 #define PlasmaRealFloat 2
58 #define PlasmaRealDouble 3
59 #define PlasmaComplexFloat 4
60 #define PlasmaComplexDouble 5
61
71 #define PlasmaRM 101
72 #define PlasmaCM 102
73 #define PlasmaCCRB 103
74 #define PlasmaCRRB 104
75 #define PlasmaRCRB 105
76 #define PlasmaRRRB 106
77
78 #define PlasmaNoTrans 111
79 #define PlasmaTrans 112
80 #define PlasmaConjTrans 113
81
82 #define PlasmaUpper 121
83 #define PlasmaLower 122
84 #define PlasmaUpperLower 123
85
86 #define PlasmaNonUnit 131
87 #define PlasmaUnit 132
88
89 #define PlasmaLeft 141
90 #define PlasmaRight 142
91
92 #define PlasmaOneNorm 171
93 #define PlasmaRealOneNorm 172
94 #define PlasmaTwoNorm 173
95 #define PlasmaFrobeniusNorm 174
96 #define PlasmaInfNorm 175
97 #define PlasmaRealInfNorm 176
98 #define PlasmaMaxNorm 177
99 #define PlasmaRealMaxNorm 178
100
101 #define PlasmaIncreasingOrder 181
102 #define PlasmaDecreasingOrder 182
103
104 #define PlasmaDistUniform 201
105 #define PlasmaDistSymmetric 202
106 #define PlasmaDistNormal 203
107
108 /* PLASMA_symmetry_type */
109 #define PlasmaGeneral 231
110 #define PlasmaSymmetric 232
111 #define PlasmaHermitian 233
112 #define PlasmaTriangular 234
113 #define PlasmaLowerTriangular 235
114 #define PlasmaUpperTriangular 236
115 #define PlasmaLowerSymmetric 237
116 #define PlasmaUpperSymmetric 238
117 #define PlasmaLowerHermitian 239
118 #define PlasmaUpperHermitian 240
119 #define PlasmaSymetricBandLowerStored 241
120 #define PlasmaSymetricBandUpperStored 242
121 #define PlasmaBand 243
122 #define PlasmaUpperHessenberg 244
123
124 /* Not found in CLapack - used by zlatms in libtmg */
125 #define PlasmaHermGeev 246
126 #define PlasmaHermPoev 247
127 #define PlasmaNonsymPosv 248
128 #define PlasmaSymPosv 249
129
130 #define PlasmaNoPacking 291
131 #define PlasmaPackSubdiag 292
132 #define PlasmaPackSupdiag 293
133 #define PlasmaPackColumn 294
134 #define PlasmaPackRow 295
135 #define PlasmaPackLowerBand 296
136 #define PlasmaPackUpeprBand 297
137 #define PlasmaPackAll 298
138
139 #define PlasmaNoVec 301
140 #define PlasmaVec 302
141 #define PlasmaIvec 303
142 #define PlasmaAllVec 304
143
144 #define PlasmaForward 391
145 #define PlasmaBackward 392
146
147 #define PlasmaColumnwise 401
148 #define PlasmaRowwise 402
149
150 #define PlasmaW 501
151 #define PlasmaA2 502
152
153 #define PlasmaLaed3Update1 0x01
154 #define PlasmaLaed3Update2 0x10
155 #define PlasmaLaed3UpdateAll 0x11
156
157
163 enum matrix_type_e {
164 PlasmaMatrixRandom = 0,
165 PlasmaMatrixHadamard = 1,
166 PlasmaMatrixHouse = 2,
167 PlasmaMatrixParter = 3,
168 PlasmaMatrixRis = 4,
169 PlasmaMatrixKms = 5,
170 PlasmaMatrixToeppen = 6, /* Unavailable */
171 PlasmaMatrixCondex = 7,
172 PlasmaMatrixMoler = 8,
173 PlasmaMatrixCircul = 9,
174 PlasmaMatrixRandcorr = 10, /* Unavailable */
175 PlasmaMatrixPoisson = 11, /* Unavailable */
176 PlasmaMatrixHankel = 12,
177 PlasmaMatrixJordbloc = 13, /* Unavailable */
178 PlasmaMatrixCompan = 14,
179 PlasmaMatrixPei = 15, /* Unavailable */
180 PlasmaMatrixRandcolu = 16, /* Unavailable */
181 PlasmaMatrixSprandn = 17, /* Unavailable */
182 PlasmaMatrixRiemann = 18,
183 PlasmaMatrixCompar = 19, /* Unavailable */
184 PlasmaMatrixTridiag = 20, /* Unavailable */
185 PlasmaMatrixChebspec = 21, /* Unavailable */
186 PlasmaMatrixLehmer = 22,
187 PlasmaMatrixToeppd = 23,
188 PlasmaMatrixMinij = 24,
189 PlasmaMatrixRandsvd = 25, /* Unavailable */
190 PlasmaMatrixForsythe = 26, /* Unavailable */
191 PlasmaMatrixFiedler = 27,
192 PlasmaMatrixDorr = 28,
193 PlasmaMatrixDemmel = 29,
194 PlasmaMatrixChebvand = 30,
195 PlasmaMatrixInvhess = 31,
196 PlasmaMatrixProlate = 32, /* Unavailable */
197 PlasmaMatrixFrank = 33, /* Unavailable */
198 PlasmaMatrixCauchy = 34,
199 PlasmaMatrixHilb = 35,
200 PlasmaMatrixLotkin = 36,
201 PlasmaMatrixKahan = 37, /* Unavailable */
202 PlasmaMatrixOrthog = 38,
203 PlasmaMatrixWilkinson = 39,
204 PlasmaMatrixFoster = 40,
205 PlasmaMatrixWright = 41,
206 PlasmaMatrixLangou = 42
207 };
208
212 #define PLASMA_HAS_COMPLEX_H 1
213
214 #if defined(_WIN32)
215 # include <float.h>
216 # if defined(__INTEL_COMPILER)
217 /* Fix name conflict within the cabs prototype (_Complex) that
218 * conflicts with a C99 keyword. */
219 #define _Complex __ConflictingComplex
220 #include <math.h>
221 #undef _Complex
222 #undef complex
223 typedef float _Complex PLASMA_Complex32_t;
224 typedef double _Complex PLASMA_Complex64_t;
225 # else
226 /* Use MS VC complex class */
227 #include <complex>
228 typedef std::complex<float> PLASMA_Complex32_t;
229 typedef std::complex<double> PLASMA_Complex64_t;
230 /* For LAPACKE lapacke.h force usage of Windows C++ Complex types */
231 #define LAPACK_COMPLEX_CUSTOM
232 #define lapack_complex_float std::complex<float>
233 #define lapack_complex_double std::complex<double>
234 #undef PLASMA_HAS_COMPLEX_H
235 # endif
236 # define isnan _isnan
237 # define isinf !_finite
238
239 #else /* defined(_WIN32) */
240
241 typedef float _Complex PLASMA_Complex32_t;
242 typedef double _Complex PLASMA_Complex64_t;
243
244 #endif /* defined(_WIN32) */
245
246 /* Sun doesn't ship the complex.h header. Sun Studio doesn't have it and older GCC compilers don't have it either. */
247 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(sun) || defined(__sun)
248 #undef PLASMA_HAS_COMPLEX_H
249 #endif
250
251 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
252 #define PLASMA_DEPRECATED __attribute__((__deprecated__))
253 #else
254 #define PLASMA_DEPRECATED
255 #endif /* __GNUC__ */
256
257 #ifdef PLASMA_HAS_COMPLEX_H
258 #include <complex.h>
259
260 #else
261
262 #ifdef __cplusplus
263 extern "C" {
264 #endif
265
266 /* These declarations will not clash with what C++ provides because the names in C++ are name-mangled. */
267 #if !defined(_WIN32)
268 extern double cabs(PLASMA_Complex64_t z);
269 extern PLASMA_Complex64_t conj(PLASMA_Complex64_t z);
270 #endif
271 extern float cabsf(PLASMA_Complex32_t z);
272 extern double cimag(PLASMA_Complex64_t z);
273 extern double creal(PLASMA_Complex64_t z);
274
275 #ifdef __cplusplus
276 }
277 #endif
278 #endif /* defined(PLASMA_HAS_COMPLEX_H) */
279
280 #endif /* _PLASMATYPES_H_ */
281