20 #ifndef SELDON_FILE_SELDONHEADER_HXX
37 #ifdef SELDON_WITH_COMPILED_LIBRARY
38 #define SELDON_EXTERN extern
44 #ifdef SELDON_WITH_CBLAS
45 #define SELDON_WITH_BLAS
52 enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
53 enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113};
54 enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
55 enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
56 enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
59 #ifdef SELDON_WITH_BLAS
62 #include "computation/interfaces/cblas.h"
70 #ifdef SELDON_DEBUG_LEVEL_4
71 #ifndef SELDON_DEBUG_LEVEL_3
72 #define SELDON_DEBUG_LEVEL_3
76 #ifdef SELDON_DEBUG_LEVEL_3
77 #ifndef SELDON_CHECK_BOUNDS
78 #define SELDON_CHECK_BOUNDS
80 #ifndef SELDON_DEBUG_LEVEL_2
81 #define SELDON_DEBUG_LEVEL_2
85 #ifdef SELDON_DEBUG_LEVEL_2
86 #ifndef SELDON_CHECK_DIMENSIONS
87 #define SELDON_CHECK_DIMENSIONS
89 #ifndef SELDON_DEBUG_LEVEL_1
90 #define SELDON_DEBUG_LEVEL_1
94 #ifdef SELDON_DEBUG_LEVEL_1
95 #ifndef SELDON_LAPACK_CHECK_INFO
96 #define SELDON_LAPACK_CHECK_INFO
98 #ifndef SELDON_CHECK_MEMORY
99 #define SELDON_CHECK_MEMORY
101 #ifndef SELDON_CHECK_IO
102 #define SELDON_CHECK_IO
104 #ifndef SELDON_DEBUG_LEVEL_0
105 #define SELDON_DEBUG_LEVEL_0
109 #ifdef SELDON_DEBUG_LEVEL_0
110 #ifndef SELDON_DEBUG_LEVEL_1
111 #ifndef SELDON_WITHOUT_THROW
112 #define SELDON_WITHOUT_THROW
124 catch(Seldon::Error& Err) \
129 catch (std::exception& Err) \
131 std::cout << "C++ exception: " << Err.what() << std::endl; \
134 catch (std::string& str) \
136 std::cout << str << std::endl; \
139 catch (const char* str) \
141 std::cout << str << std::endl; \
146 std::cout << "Unknown exception..." << std::endl; \
153 #define ERR(x) std::cout << "Hermes - " #x << std::endl
157 #define DISP(x) std::cout << #x ": " << x << std::endl
161 #define DISPLAY(x) std::cout << #x ": " << x << std::endl
165 #define Vect_Full VectFull
166 #define Vect_Sparse VectSparse
175 #include "share/Errors.hxx"
176 #include "share/Common.hxx"
179 #ifndef SELDON_DEFAULT_ALLOCATOR
180 #define SELDON_DEFAULT_ALLOCATOR NewAlloc
183 #include "share/Allocator.hxx"
184 #include "share/DefaultAllocator.hxx"
187 #include "share/Storage.hxx"
189 #include "share/MatrixFlag.hxx"
192 #include "share/Properties.hxx"
200 template <
class T,
class Allocator>
204 template <
class T,
class Storage =
VectFull,
205 class Allocator =
typename
206 SeldonDefaultAllocator<Storage, T>::allocator >
210 template <
class T,
class Allocator>
214 template <
class T,
class Allocator>
218 template <
class T,
class Allocator>
222 template <
class T,
class Prop =
General,
224 class Allocator =
typename
225 SeldonDefaultAllocator<Storage, T>::allocator >
229 template <
class T,
class Prop,
class Allocator>
233 template <
class T,
class Prop,
class Allocator>
237 template <
class T,
class Prop,
class Allocator>
241 template <
class T,
class Prop,
class Allocator>
245 template <
class T,
class Prop,
class Allocator>
249 template <
class T,
class Prop,
class Allocator>
253 template <
class T,
class Prop,
class Allocator>
257 template <
class T,
class Prop,
class Allocator>
261 template <
class T,
class Prop,
class Allocator>
265 template <
class T,
class Prop,
class Allocator>
269 template <
class T,
class Prop,
class Allocator>
273 template <
class T,
class Prop,
class Allocator>
277 template <
class T,
class Prop,
class Allocator>
281 template <
class T,
class Prop,
class Allocator>
285 template <
class T,
class Prop,
class Allocator>
289 template <
class T,
class Prop,
class Allocator>
293 template <
class T,
int N,
class Allocator
298 template <
class T,
class Allocator
303 template <
class T,
class Allocator
311 const int ARRAY_MINRANK = 3;
312 const int ARRAY_MAXRANK = 9;
314 #include "array/Array3D.hxx"
315 #include "array/Array4D.hxx"
316 #include "array/Array.hxx"
317 #include "matrix/Matrix_Base.hxx"
318 #include "matrix/Matrix_Pointers.hxx"
319 #include "matrix/Matrix_Triangular.hxx"
320 #include "matrix/Matrix_Symmetric.hxx"
321 #include "matrix/Matrix_Hermitian.hxx"
322 #include "matrix_sparse/Matrix_Sparse.hxx"
323 #include "matrix_sparse/Matrix_SymSparse.hxx"
324 #include "matrix/Matrix_SymPacked.hxx"
325 #include "matrix/Matrix_HermPacked.hxx"
326 #include "matrix/Matrix_TriangPacked.hxx"
327 #include "vector/Vector.hxx"
328 #include "vector/SparseVector.hxx"
329 #include "vector/Functions_Arrays.hxx"
330 #include "matrix/Functions.hxx"
331 #include "matrix_sparse/IOMatrixMarket.hxx"
332 #include "matrix_sparse/Matrix_Conversions.hxx"
333 #include "computation/basic_functions/Functions_Vector.hxx"
334 #include "computation/basic_functions/Functions_MatVect.hxx"
335 #include "computation/basic_functions/Functions_Matrix.hxx"
336 #include "computation/basic_functions/Functions_Base.hxx"
338 #include "matrix/SubMatrix_Base.hxx"
339 #include "matrix/SubMatrix.hxx"
342 #ifdef SELDON_WITH_BLAS
344 #include "computation/interfaces/Blas_1.hxx"
345 #include "computation/interfaces/Blas_2.hxx"
346 #include "computation/interfaces/Blas_3.hxx"
351 #ifdef SELDON_WITH_LAPACK
353 #undef LAPACK_INTEGER
354 #define LAPACK_INTEGER int
356 #define LAPACK_REAL float
357 #undef LAPACK_DOUBLEREAL
358 #define LAPACK_DOUBLEREAL double
359 #undef LAPACK_COMPLEX
360 #define LAPACK_COMPLEX void
361 #undef LAPACK_DOUBLECOMPLEX
362 #define LAPACK_DOUBLECOMPLEX void
363 #undef LAPACK_LOGICAL
364 #define LAPACK_LOGICAL int
366 #define LAPACK_L_FP int*
368 #define LAPACK_FTNLEN int*
371 #include "computation/interfaces/clapack.h"
373 #ifdef SELDON_LAPACK_CHECK_INFO
374 #ifndef SELDON_CHECK_INFO
375 #define SELDON_CHECK_INFO(f, lf) info.Check(f, lf)
378 #ifndef SELDON_CHECK_INFO
379 #define SELDON_CHECK_INFO(f, lf)
383 #include "computation/interfaces/Lapack_LinearEquations.hxx"
384 #include "computation/interfaces/Lapack_LeastSquares.hxx"
385 #include "computation/interfaces/Lapack_Eigenvalues.hxx"
387 #endif // SELDON_WITH_LAPACK.
389 #ifdef SELDON_WITH_MKL
390 #include "computation/interfaces/Mkl_Sparse.hxx"
396 typedef Array3D<int> IArr3D;
397 typedef Vector<int, VectFull> IVect;
398 typedef Vector<float, VectFull> SVect;
399 typedef Vector<double, VectFull> DVect;
400 typedef Vector<complex<float>, VectFull> CVect;
401 typedef Vector<complex<double>, VectFull> ZVect;
403 typedef Matrix<int, General, ColMajor> IGCMat;
404 typedef Matrix<float, General, ColMajor> SGCMat;
405 typedef Matrix<double, General, ColMajor> DGCMat;
406 typedef Matrix<complex<float>, General, ColMajor> CGCMat;
407 typedef Matrix<complex<double>, General, ColMajor> ZGCMat;
409 typedef Matrix<int, General, RowMajor> IGRMat;
410 typedef Matrix<float, General, RowMajor> SGRMat;
411 typedef Matrix<double, General, RowMajor> DGRMat;
412 typedef Matrix<complex<float>, General, RowMajor> CGRMat;
413 typedef Matrix<complex<double>, General, RowMajor> ZGRMat;
415 typedef Matrix<int, General, RowSparse> IGRSMat;
416 typedef Matrix<float, General, RowSparse> SGRSMat;
417 typedef Matrix<double, General, RowSparse> DGRSMat;
418 typedef Matrix<complex<float>, General, RowSparse> CGRSMat;
419 typedef Matrix<complex<double>, General, RowSparse> ZGRSMat;
421 typedef Matrix<int, General, ColSparse> IGCSMat;
422 typedef Matrix<float, General, ColSparse> SGCSMat;
423 typedef Matrix<double, General, ColSparse> DGCSMat;
424 typedef Matrix<complex<float>, General, ColSparse> CGCSMat;
425 typedef Matrix<complex<double>, General, ColSparse> ZGCSMat;
428 template <
class T,
class Storage,
class Allocator>
436 template <
class T,
class Prop,
class Storage,
class Allocator>
445 #include "vector/TinyVector.hxx"
446 #include "matrix/TinyMatrix.hxx"
448 #define SELDON_FILE_SELDONHEADER_HXX