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 
41 #define CG_MAX_INT32 0x7FFFFFFF
42 #ifdef _WIN32
43 # define CG_LONG_T __int64
44 #ifdef _MSC_VER
45 # ifdef CG_BUILD_64BIT
46 # define stat _stat32i64
47 # endif
48 #endif
49 #else
50 # define CG_LONG_T long
51 #endif
52 
53 #if CG_BUILD_HDF5
54 
55 /* ----------------------------------------------------------------
56  * convert between HDF5 and ADF ids
57  * ---------------------------------------------------------------- */
58 
59 #define to_ADF_ID(ID,ADF_ID) memcpy(&(ADF_ID),&(ID),sizeof(hid_t))
60 #define to_HDF_ID(ADF_ID,ID) memcpy(&(ID),&(ADF_ID),sizeof(hid_t))
61 
62 /* Determine if hdf5 has multi-dataset read/write capabilities */
63 
64 #define HDF5_HAVE_MULTI_DATASETS 0
65 
66 /* Determine if hdf5 has collective metadata APIs */
67 
68 #define HDF5_HAVE_COLL_METADATA 0
69 
70 /* Determine if hdf5 H5Pset_file_space_strategy */
71 
72 #define HDF5_HAVE_FILE_SPACE_STRATEGY 0
73 
74 #endif
75 
76 #define CG_HAVE_STAT64_STRUCT 0
77 
78 #if CG_BUILD_LEGACY
79 # define CG_SIZEOF_SIZE 32
80 # define CG_SIZE_DATATYPE "I4"
81 # define cgerr_t int
82 # define cgint_t int
83 # define cgsize_t int
84 # define cgid_t double
85 #else
86 # if CG_BUILD_64BIT
87 # define CG_SIZEOF_SIZE 64
88 # define CG_SIZE_DATATYPE "I8"
90 # else
91 # define CG_SIZEOF_SIZE 32
92 # define CG_SIZE_DATATYPE "I4"
93  typedef int cgsize_t;
94 # endif
95  typedef int cgerr_t;
96  typedef int cgint_t;
97  typedef double cgid_t;
98 #endif
99 
100 /* Define an int type that is interoperabable with Fortran's INTEGER */
101 #define FORTRAN_DEFAULT_INTEGER_C_INT64_T 0
102 #if FORTRAN_DEFAULT_INTEGER_C_INT64_T == 1
103  typedef CG_LONG_T cgint_f;
104 #else
105  typedef int cgint_f;
106 #endif
107 
108 
110 typedef unsigned CG_LONG_T cgulong_t;
111 
112 #endif
unsigned CG_LONG_T cgulong_t
Definition: cgnstypes.h:110
double cgid_t
Definition: cgnstypes.h:97
#define CG_LONG_T
Definition: cgnstypes.h:50
CG_LONG_T cgsize_t
Definition: cgnstypes.h:89
int cgint_f
Definition: cgnstypes.h:105
CG_LONG_T cglong_t
Definition: cgnstypes.h:109
int cgint_t
Definition: cgnstypes.h:96
int cgerr_t
Definition: cgnstypes.h:95