Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
amesos_UFconfig.h
Go to the documentation of this file.
1 /* ========================================================================== */
2 /* === UFconfig.h =========================================================== */
3 /* ========================================================================== */
4 
5 /* Configuration file for SuiteSparse: a Suite of Sparse matrix packages
6  * (AMD, COLAMD, CCOLAMD, CAMD, CHOLMOD, UMFPACK, CXSparse, and others).
7  *
8  * UFconfig.h provides the definition of the long integer. On most systems,
9  * a C program can be compiled in LP64 mode, in which long's and pointers are
10  * both 64-bits, and int's are 32-bits. Windows 64, however, uses the LLP64
11  * model, in which int's and long's are 32-bits, and long long's and pointers
12  * are 64-bits.
13  *
14  * SuiteSparse packages that include long integer versions are
15  * intended for the LP64 mode. However, as a workaround for Windows 64
16  * (and perhaps other systems), the long integer can be redefined.
17  *
18  * If _WIN64 is defined, then the __int64 type is used instead of long.
19  *
20  * The long integer can also be defined at compile time. For example, this
21  * could be added to UFconfig.mk:
22  *
23  * CFLAGS = -O -D'UF_long=long long' -D'UF_long_max=9223372036854775801' \
24  * -D'UF_long_id="%lld"'
25  *
26  * This file defines UF_long as either long (on all but _WIN64) or
27  * __int64 on Windows 64. The intent is that a UF_long is always a 64-bit
28  * integer in a 64-bit code. ptrdiff_t might be a better choice than long;
29  * it is always the same size as a pointer.
30  *
31  * This file also defines the SUITESPARSE_VERSION and related definitions.
32  *
33  * Copyright (c) 2007, University of Florida. No licensing restrictions
34  * apply to this file or to the UFconfig directory. Author: Timothy A. Davis.
35  */
36 
37 #ifndef _UFCONFIG_H
38 #define _UFCONFIG_H
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 #include <limits.h>
45 
46 /* ========================================================================== */
47 /* === UF_long ============================================================== */
48 /* ========================================================================== */
49 
50 #ifndef UF_long
51 
52 #ifdef _WIN64
53 
54 #define UF_long __int64
55 #define UF_long_max _I64_MAX
56 #define UF_long_id "%I64d"
57 
58 #else
59 
60 #define UF_long long
61 #define UF_long_max LONG_MAX
62 #define UF_long_id "%ld"
63 
64 #endif
65 #endif
66 
67 /* ========================================================================== */
68 /* === SuiteSparse version ================================================== */
69 /* ========================================================================== */
70 
71 /* SuiteSparse is not a package itself, but a collection of packages, some of
72  * which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD,
73  * COLAMD, CAMD, and CCOLAMD, etc). A version number is provided here for the
74  * collection itself. The versions of packages within each version of
75  * SuiteSparse are meant to work together. Combining one packge from one
76  * version of SuiteSparse, with another package from another version of
77  * SuiteSparse, may or may not work.
78  *
79  * SuiteSparse Version 3.0.0 contains the following packages:
80  *
81  * AMD version 2.2.0
82  * CAMD version 2.2.0
83  * COLAMD version 2.7.0
84  * CCOLAMD version 2.7.0
85  * CHOLMOD version 1.5.0
86  * CSparse version 2.2.0
87  * CXSparse version 2.2.0
88  * KLU version 1.0.0
89  * BTF version 1.0.0
90  * LDL version 2.0.0
91  * UFconfig version number is the same as SuiteSparse
92  * UMFPACK version 5.1.0
93  * RBio version 1.1.0
94  * UFcollection version 1.1.0
95  *
96  * Other package dependencies:
97  * BLAS required by CHOLMOD and UMFPACK
98  * LAPACK required by CHOLMOD
99  * METIS 4.0.1 required by CHOLMOD (optional) and KLU (optional)
100  */
101 
102 #define SUITESPARSE_DATE "May 31, 2007"
103 #define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))
104 #define SUITESPARSE_MAIN_VERSION 3
105 #define SUITESPARSE_SUB_VERSION 0
106 #define SUITESPARSE_SUBSUB_VERSION 0
107 #define SUITESPARSE_VERSION \
108  SUITESPARSE_VER_CODE(SUITESPARSE_MAIN_VERSION,SUITESPARSE_SUB_VERSION)
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 #endif