cgnstypes.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------------------- *
2  * CGNS - CFD General Notation System (http://www.cgns.org) *
3  * CGNS/MLL - Mid-Level Library header file *
4  * Please see cgnsconfig.h file for this local installation configuration *
5  * ------------------------------------------------------------------------- */
6 
7 /* ------------------------------------------------------------------------- *
8 
9  This software is provided 'as-is', without any express or implied warranty.
10  In no event will the authors be held liable for any damages arising from
11  the use of this software.
12 
13  Permission is granted to anyone to use this software for any purpose,
14  including commercial applications, and to alter it and redistribute it
15  freely, subject to the following restrictions:
16 
17  1. The origin of this software must not be misrepresented; you must not
18  claim that you wrote the original software. If you use this software
19  in a product, an acknowledgment in the product documentation would be
20  appreciated but is not required.
21 
22  2. Altered source versions must be plainly marked as such, and must not
23  be misrepresented as being the original software.
24 
25  3. This notice may not be removed or altered from any source distribution.
26 
27  * ------------------------------------------------------------------------- */
28 
29 #ifndef CGNSTYPES_H
30 #define CGNSTYPES_H
31 
32 #include "vtk_cgns_mangle.h"
33 
34 #define CG_BUILD_HDF5 1
35 #define CG_BUILD_LEGACY 0
36 #define CG_BUILD_64BIT 1
37 #define CG_BUILD_SCOPE 1
38 #define CG_BUILD_BASESCOPE 0
39 #define CG_BUILD_PARALLEL 0
40 #define CG_BUILD_COMPLEX_C99_EXT 0
41 
42 #define CG_MAX_INT32 0x7FFFFFFF
43 
44 #include <stdint.h> /* For C9x types */
45 #include <inttypes.h> /* C99/POSIX.1 header for uint64_t, PRIu64 */
46 #define CG_LONG_T int64_t
47 #define CG_U_LONG_T uint64_t
48 
49 #if CG_BUILD_HDF5
50 
51 /* ----------------------------------------------------------------
52  * convert between HDF5 and ADF ids
53  * ---------------------------------------------------------------- */
54 
55 #define to_ADF_ID(ID,ADF_ID) memcpy(&(ADF_ID),&(ID),sizeof(hid_t))
56 #define to_HDF_ID(ADF_ID,ID) memcpy(&(ID),&(ADF_ID),sizeof(hid_t))
57 
58 /* Determine if hdf5 has multi-dataset read/write capabilities */
59 
60 #define HDF5_HAVE_MULTI_DATASETS 0
61 
62 /* Determine if hdf5 has collective metadata APIs */
63 
64 #define HDF5_HAVE_COLL_METADATA 0
65 
66 /* Determine if hdf5 H5Pset_file_space_strategy */
67 
68 #define HDF5_HAVE_FILE_SPACE_STRATEGY 0
69 
70 #endif
71 
72 #define CG_HAVE_STAT64_STRUCT 0
73 
74 #if CG_BUILD_LEGACY
75 #include <limits.h>
76 # define CG_SIZEOF_SIZE 32
77 # define CG_SIZE_DATATYPE "I4"
78 # define cgerr_t int
79 # define cgint_t int
80 # define cgsize_t int
81 # define cgid_t double
82 # define PRIdCGSIZE "d"
83 # define CG_SIZE_MAX INT_MAX
84 #else
85 # if CG_BUILD_64BIT
86 # define CG_SIZEOF_SIZE 64
87 # define CG_SIZE_DATATYPE "I8"
88 # define PRIdCGSIZE PRId64
89  typedef int64_t cgsize_t;
90 # define CG_SIZE_MAX INT64_MAX
91 # else
92 # define CG_SIZEOF_SIZE 32
93 # define CG_SIZE_DATATYPE "I4"
94 # define PRIdCGSIZE PRId32
95  typedef int32_t cgsize_t;
96 # define CG_SIZE_MAX INT32_MAX
97 # endif
98  typedef int cgerr_t;
99  typedef int cgint_t;
100  typedef double cgid_t;
101 #endif
102 
103 /* Define an int type that is interoperabable with Fortran's INTEGER */
104 #define FORTRAN_DEFAULT_INTEGER_C_INT64_T 0
105 #if FORTRAN_DEFAULT_INTEGER_C_INT64_T == 1
106  typedef CG_LONG_T cgint_f;
107 #else
108  typedef int cgint_f;
109 #endif
110 
111 
114 
115 #endif
#define CG_U_LONG_T
Definition: cgnstypes.h:47
double cgid_t
Definition: cgnstypes.h:100
#define CG_LONG_T
Definition: cgnstypes.h:46
int cgint_f
Definition: cgnstypes.h:108
CG_LONG_T cglong_t
Definition: cgnstypes.h:112
int cgint_t
Definition: cgnstypes.h:99
int64_t cgsize_t
Definition: cgnstypes.h:89
CG_U_LONG_T cgulong_t
Definition: cgnstypes.h:113
int cgerr_t
Definition: cgnstypes.h:98