PLASMA  2.6.0
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Functions Variables Groups
plasmatypes.h
1 
17 #ifndef _PLASMATYPES_H_
18 #define _PLASMATYPES_H_
19 
23 #define PLASMA_VERSION_MAJOR 2
24 #define PLASMA_VERSION_MINOR 6
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 PlasmaDistUniform 201
102 #define PlasmaDistSymmetric 202
103 #define PlasmaDistNormal 203
104 
105 #define PlasmaHermGeev 241
106 #define PlasmaHermPoev 242
107 #define PlasmaNonsymPosv 243
108 #define PlasmaSymPosv 244
109 
110 #define PlasmaNoPacking 291
111 #define PlasmaPackSubdiag 292
112 #define PlasmaPackSupdiag 293
113 #define PlasmaPackColumn 294
114 #define PlasmaPackRow 295
115 #define PlasmaPackLowerBand 296
116 #define PlasmaPackUpeprBand 297
117 #define PlasmaPackAll 298
118 
119 #define PlasmaNoVec 301
120 #define PlasmaVec 302
121 #define PlasmaIvec 303
122 #define PlasmaAllVec 304
123 
124 #define PlasmaForward 391
125 #define PlasmaBackward 392
126 
127 #define PlasmaColumnwise 401
128 #define PlasmaRowwise 402
129 
130 #define PlasmaW 501
131 #define PlasmaA2 502
132 
138 enum matrix_type_e {
139  PlasmaMatrixRandom = 0,
140  PlasmaMatrixHadamard = 1,
141  PlasmaMatrixHouse = 2,
142  PlasmaMatrixParter = 3,
143  PlasmaMatrixRis = 4,
144  PlasmaMatrixKms = 5,
145  PlasmaMatrixToeppen = 6, /* Unavailable */
146  PlasmaMatrixCondex = 7,
147  PlasmaMatrixMoler = 8,
148  PlasmaMatrixCircul = 9,
149  PlasmaMatrixRandcorr = 10, /* Unavailable */
150  PlasmaMatrixPoisson = 11, /* Unavailable */
151  PlasmaMatrixHankel = 12,
152  PlasmaMatrixJordbloc = 13, /* Unavailable */
153  PlasmaMatrixCompan = 14,
154  PlasmaMatrixPei = 15, /* Unavailable */
155  PlasmaMatrixRandcolu = 16, /* Unavailable */
156  PlasmaMatrixSprandn = 17, /* Unavailable */
157  PlasmaMatrixRiemann = 18,
158  PlasmaMatrixCompar = 19, /* Unavailable */
159  PlasmaMatrixTridiag = 20, /* Unavailable */
160  PlasmaMatrixChebspec = 21, /* Unavailable */
161  PlasmaMatrixLehmer = 22,
162  PlasmaMatrixToeppd = 23,
163  PlasmaMatrixMinij = 24,
164  PlasmaMatrixRandsvd = 25, /* Unavailable */
165  PlasmaMatrixForsythe = 26, /* Unavailable */
166  PlasmaMatrixFiedler = 27,
167  PlasmaMatrixDorr = 28,
168  PlasmaMatrixDemmel = 29,
169  PlasmaMatrixChebvand = 30,
170  PlasmaMatrixInvhess = 31,
171  PlasmaMatrixProlate = 32, /* Unavailable */
172  PlasmaMatrixFrank = 33, /* Unavailable */
173  PlasmaMatrixCauchy = 34,
174  PlasmaMatrixHilb = 35,
175  PlasmaMatrixLotkin = 36,
176  PlasmaMatrixKahan = 37, /* Unavailable */
177  PlasmaMatrixOrthog = 38,
178  PlasmaMatrixWilkinson = 39,
179  PlasmaMatrixFoster = 40,
180  PlasmaMatrixWright = 41,
181  PlasmaMatrixLangou = 42
182 };
183 
187 #define PLASMA_HAS_COMPLEX_H 1
188 
189 #if defined(_WIN32)
190 # include <float.h>
191 # if defined(__INTEL_COMPILER)
192  /* Fix name conflict within the cabs prototype (_Complex) that
193  * conflicts with a C99 keyword. */
194  #define _Complex __ConflictingComplex
195  #include <math.h>
196  #undef _Complex
197  #undef complex
198  typedef float _Complex PLASMA_Complex32_t;
199  typedef double _Complex PLASMA_Complex64_t;
200 # else
201  /* Use MS VC complex class */
202  #include <complex>
203  typedef std::complex<float> PLASMA_Complex32_t;
204  typedef std::complex<double> PLASMA_Complex64_t;
205  /* For LAPACKE lapacke.h force usage of Windows C++ Complex types */
206  #define LAPACK_COMPLEX_CUSTOM
207  #define lapack_complex_float std::complex<float>
208  #define lapack_complex_double std::complex<double>
209  #undef PLASMA_HAS_COMPLEX_H
210 # endif
211 # define isnan _isnan
212 # define isinf !_finite
213 
214 #else /* defined(_WIN32) */
215 
216  typedef float _Complex PLASMA_Complex32_t;
217  typedef double _Complex PLASMA_Complex64_t;
218 
219 #endif /* defined(_WIN32) */
220 
221 /* Sun doesn't ship the complex.h header. Sun Studio doesn't have it and older GCC compilers don't have it either. */
222 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(sun) || defined(__sun)
223 #undef PLASMA_HAS_COMPLEX_H
224 #endif
225 
226 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
227 #define PLASMA_DEPRECATED __attribute__((__deprecated__))
228 #else
229 #define PLASMA_DEPRECATED
230 #endif /* __GNUC__ */
231 
232 #ifdef PLASMA_HAS_COMPLEX_H
233 #include <complex.h>
234 
235 #else
236 
237 #ifdef __cplusplus
238 extern "C" {
239 #endif
240 
241 /* These declarations will not clash with what C++ provides because the names in C++ are name-mangled. */
242 #if !defined(_WIN32)
243 extern double cabs(PLASMA_Complex64_t z);
244 extern PLASMA_Complex64_t conj(PLASMA_Complex64_t z);
245 #endif
246 extern float cabsf(PLASMA_Complex32_t z);
247 extern double cimag(PLASMA_Complex64_t z);
248 extern double creal(PLASMA_Complex64_t z);
249 
250 #ifdef __cplusplus
251 }
252 #endif
253 #endif /* defined(PLASMA_HAS_COMPLEX_H) */
254 
255 #endif /* _PLASMATYPES_H_ */
256