MISR Toolkit  1.5.1
hntdefs.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at *
10  * http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have *
11  * access to either file, you may request a copy from help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id: hntdefs.h 5584 2011-04-13 18:25:06Z bmribler $ */
15 
16 /*+ hnt.h
17  *** This file contains all the number-type definitions for HDF
18  + */
19 
20 #ifndef _HNT_H
21 #define _HNT_H
22 
23 /* masks for types */
24 #define DFNT_HDF 0x00000000 /* standard HDF format */
25 #define DFNT_NATIVE 0x00001000 /* native format */
26 #define DFNT_CUSTOM 0x00002000 /* custom format */
27 #define DFNT_LITEND 0x00004000 /* Little Endian format */
28 #define DFNT_MASK 0x00000fff /* format mask */
29 
30 /* type info codes */
31 
32 #define DFNT_NONE 0 /* indicates that number type not set */
33 #define DFNT_QUERY 0 /* use this code to find the current type */
34 #define DFNT_VERSION 1 /* current version of NT info */
35 
36 #define DFNT_FLOAT32 5
37 #define DFNT_FLOAT 5 /* For backward compat; don't use */
38 #define DFNT_FLOAT64 6
39 #define DFNT_DOUBLE 6 /* For backward compat; don't use */
40 #define DFNT_FLOAT128 7 /* No current plans for support */
41 
42 #define DFNT_INT8 20
43 #define DFNT_UINT8 21
44 
45 #define DFNT_INT16 22
46 #define DFNT_UINT16 23
47 #define DFNT_INT32 24
48 #define DFNT_UINT32 25
49 #define DFNT_INT64 26
50 #define DFNT_UINT64 27
51 #define DFNT_INT128 28 /* No current plans for support */
52 #define DFNT_UINT128 30 /* No current plans for support */
53 
54 #define DFNT_UCHAR8 3 /* 3 chosen for backward compatibility */
55 #define DFNT_UCHAR 3 /* uchar=uchar8 for backward combatibility */
56 #define DFNT_CHAR8 4 /* 4 chosen for backward compatibility */
57 #define DFNT_CHAR 4 /* char=char8 for backward combatibility */
58 #define DFNT_CHAR16 42 /* No current plans for support */
59 #define DFNT_UCHAR16 43 /* No current plans for support */
60 
61 /* Type info codes for Native Mode datasets */
62 #define DFNT_NFLOAT32 (DFNT_NATIVE | DFNT_FLOAT32)
63 #define DFNT_NFLOAT64 (DFNT_NATIVE | DFNT_FLOAT64)
64 #define DFNT_NFLOAT128 (DFNT_NATIVE | DFNT_FLOAT128) /* Unsupported */
65 
66 #define DFNT_NINT8 (DFNT_NATIVE | DFNT_INT8)
67 #define DFNT_NUINT8 (DFNT_NATIVE | DFNT_UINT8)
68 #define DFNT_NINT16 (DFNT_NATIVE | DFNT_INT16)
69 #define DFNT_NUINT16 (DFNT_NATIVE | DFNT_UINT16)
70 #define DFNT_NINT32 (DFNT_NATIVE | DFNT_INT32)
71 #define DFNT_NUINT32 (DFNT_NATIVE | DFNT_UINT32)
72 #define DFNT_NINT64 (DFNT_NATIVE | DFNT_INT64)
73 #define DFNT_NUINT64 (DFNT_NATIVE | DFNT_UINT64)
74 #define DFNT_NINT128 (DFNT_NATIVE | DFNT_INT128) /* Unsupported */
75 #define DFNT_NUINT128 (DFNT_NATIVE | DFNT_UINT128) /* Unsupported */
76 
77 #define DFNT_NCHAR8 (DFNT_NATIVE | DFNT_CHAR8)
78 #define DFNT_NCHAR (DFNT_NATIVE | DFNT_CHAR8) /* backward compat */
79 #define DFNT_NUCHAR8 (DFNT_NATIVE | DFNT_UCHAR8)
80 #define DFNT_NUCHAR (DFNT_NATIVE | DFNT_UCHAR8) /* backward compat */
81 #define DFNT_NCHAR16 (DFNT_NATIVE | DFNT_CHAR16) /* Unsupported */
82 #define DFNT_NUCHAR16 (DFNT_NATIVE | DFNT_UCHAR16) /* Unsupported */
83 
84 /* Type info codes for Little Endian data */
85 #define DFNT_LFLOAT32 (DFNT_LITEND | DFNT_FLOAT32)
86 #define DFNT_LFLOAT64 (DFNT_LITEND | DFNT_FLOAT64)
87 #define DFNT_LFLOAT128 (DFNT_LITEND | DFNT_FLOAT128) /* Unsupported */
88 
89 #define DFNT_LINT8 (DFNT_LITEND | DFNT_INT8)
90 #define DFNT_LUINT8 (DFNT_LITEND | DFNT_UINT8)
91 #define DFNT_LINT16 (DFNT_LITEND | DFNT_INT16)
92 #define DFNT_LUINT16 (DFNT_LITEND | DFNT_UINT16)
93 #define DFNT_LINT32 (DFNT_LITEND | DFNT_INT32)
94 #define DFNT_LUINT32 (DFNT_LITEND | DFNT_UINT32)
95 #define DFNT_LINT64 (DFNT_LITEND | DFNT_INT64)
96 #define DFNT_LUINT64 (DFNT_LITEND | DFNT_UINT64)
97 #define DFNT_LINT128 (DFNT_LITEND | DFNT_INT128) /* Unsupported */
98 #define DFNT_LUINT128 (DFNT_LITEND | DFNT_UINT128) /* Unsupported */
99 
100 #define DFNT_LCHAR8 (DFNT_LITEND | DFNT_CHAR8)
101 #define DFNT_LCHAR (DFNT_LITEND | DFNT_CHAR8) /* backward compat */
102 #define DFNT_LUCHAR8 (DFNT_LITEND | DFNT_UCHAR8)
103 #define DFNT_LUCHAR (DFNT_LITEND | DFNT_UCHAR8) /* backward compat */
104 #define DFNT_LCHAR16 (DFNT_LITEND | DFNT_CHAR16) /* Unsupported */
105 #define DFNT_LUCHAR16 (DFNT_LITEND | DFNT_UCHAR16) /* Unsupported */
106 
107 /* class info codes for int */
108 #define DFNTI_MBO 1 /* Motorola byte order 2's compl */
109 #define DFNTI_VBO 2 /* Vax byte order 2's compl */
110 #define DFNTI_IBO 4 /* Intel byte order 2's compl */
111 
112 /* class info codes for float */
113 #define DFNTF_NONE 0 /* indicates subclass is not set */
114 #define DFNTF_HDFDEFAULT 1 /* hdf default float format is ieee */
115 #define DFNTF_IEEE 1 /* IEEE format */
116 #define DFNTF_VAX 2 /* Vax format */
117 #define DFNTF_CRAY 3 /* Cray format */
118 #define DFNTF_PC 4 /* PC floats - flipped IEEE */
119 #define DFNTF_CONVEX 5 /* CONVEX native format */
120 #define DFNTF_VP 6 /* Fujitsu VP native format */
121 #define DFNTF_CRAYMPP 7 /* Cray MPP format */
122 
123 /* class info codes for char */
124 #define DFNTC_BYTE 0 /* bitwise/numeric field */
125 #define DFNTC_ASCII 1 /* ASCII */
126 #define DFNTC_EBCDIC 5 /* EBCDIC */
127 
128 /* array order */
129 #define DFO_FORTRAN 1 /* column major order */
130 #define DFO_C 2 /* row major order */
131 
132 /*******************************************************************/
133 /* Sizes of number types */
134 /*******************************************************************/
135 
136 /* first the standard sizes of number types */
137 
138 # define SIZE_FLOAT32 4
139 # define SIZE_FLOAT64 8
140 # define SIZE_FLOAT128 16 /* No current plans for support */
141 
142 # define SIZE_INT8 1
143 # define SIZE_UINT8 1
144 # define SIZE_INT16 2
145 # define SIZE_UINT16 2
146 # define SIZE_INT32 4
147 # define SIZE_UINT32 4
148 # define SIZE_INT64 8
149 # define SIZE_UINT64 8
150 # define SIZE_INT128 16 /* No current plans for support */
151 # define SIZE_UINT128 16 /* No current plans for support */
152 
153 # define SIZE_CHAR8 1
154 # define SIZE_CHAR 1 /* For backward compat char8 == char */
155 # define SIZE_UCHAR8 1
156 # define SIZE_UCHAR 1 /* For backward compat uchar8 == uchar */
157 # define SIZE_CHAR16 2 /* No current plans for support */
158 # define SIZE_UCHAR16 2 /* No current plans for support */
159 
160 /* then the native sizes of number types */
161 
162 /* Unusual number sizes */
163 /* Cray (UNICOS) native number sizes:
164  Char = 8 bits, unsigned
165  Short=64 int=64 long=64 float=64 double=64 bits
166  Long double=128 bits
167  Char pointers = 64 bits
168  Int pointers = 64 bits
169 */
170 /* T3D/T3E (CRAYMPP) native number sizes:
171  Char = 8 bits, unsigned
172  Short=32 int=64 long=64 float=32 double=64 bits
173  Long double=64 bits
174  Char pointers = 64 bits
175  Int pointers = 64 bits
176  Big endian, IEEE floating point
177 */
178 /* IA64 (IA64) native number sizes:
179  Char = 8 bits, signed
180  Short=16 int=32 long=64 float=32 double=64 bits
181  Long double=64 bits
182  Char pointers = 64 bits
183  Int pointers = 64 bits
184  Little endian, IEEE floating point
185 */
186 
187 #if !defined(UNICOS)
188 # define SIZE_NFLOAT32 4
189 # define SIZE_NFLOAT64 8
190 # define SIZE_NFLOAT128 16 /* No current plans for support */
191 
192 # define SIZE_NINT8 1
193 # define SIZE_NUINT8 1
194 #if defined(CRAYMPP)
195 # define SIZE_NINT16 4
196 # define SIZE_NUINT16 4
197 #else
198 # define SIZE_NINT16 2
199 # define SIZE_NUINT16 2
200 #endif
201 # define SIZE_NINT32 4
202 # define SIZE_NUINT32 4
203 # define SIZE_NINT64 8
204 # define SIZE_NUINT64 8
205 # define SIZE_NINT128 16 /* No current plans for support */
206 # define SIZE_NUINT128 16 /* No current plans for support */
207 
208 # define SIZE_NCHAR8 1
209 # define SIZE_NCHAR 1 /* For backward compat char8 == char */
210 # define SIZE_NUCHAR8 1
211 # define SIZE_NUCHAR 1 /* For backward compat uchar8 == uchar */
212 #if defined(CRAYMPP)
213 # define SIZE_NCHAR16 4 /* No current plans for support */
214 # define SIZE_NUCHAR16 4 /* No current plans for support */
215 #else
216 # define SIZE_NCHAR16 2 /* No current plans for support */
217 # define SIZE_NUCHAR16 2 /* No current plans for support */
218 #endif
219 #else /* !!!!!! SOMEBODY NEEDS TO CHECK THESE !!!!! */
220 # define SIZE_NFLOAT32 8
221 # define SIZE_NFLOAT64 8
222 # define SIZE_NFLOAT128 16 /* No current plans for support */
223 
224 # define SIZE_NINT8 1
225 # define SIZE_NUINT8 1
226 # define SIZE_NINT16 8
227 # define SIZE_NUINT16 8
228 # define SIZE_NINT32 8
229 # define SIZE_NUINT32 8
230 # define SIZE_NINT64 8
231 # define SIZE_NUINT64 8
232 # define SIZE_NINT128 16 /* No current plans for support */
233 # define SIZE_NUINT128 16 /* No current plans for support */
234 # define SIZE_NCHAR8 1
235 # define SIZE_NCHAR 1
236 # define SIZE_NCHAR 1 /* For backward compat char8 == char */
237 # define SIZE_NUCHAR8 1
238 # define SIZE_NUCHAR 1 /* For backward compat uchar8 == uchar */
239 # define SIZE_NCHAR16 2 /* No current plans for support */
240 # define SIZE_NUCHAR16 2 /* No current plans for support */
241 #endif /* UNICOS */
242 
243 /* then the sizes of little-endian number types */
244 # define SIZE_LFLOAT32 4
245 # define SIZE_LFLOAT64 8
246 # define SIZE_LFLOAT128 16 /* No current plans for support */
247 
248 # define SIZE_LINT8 1
249 # define SIZE_LUINT8 1
250 # define SIZE_LINT16 2
251 # define SIZE_LUINT16 2
252 # define SIZE_LINT32 4
253 # define SIZE_LUINT32 4
254 # define SIZE_LINT64 8
255 # define SIZE_LUINT64 8
256 # define SIZE_LINT128 16 /* No current plans for support */
257 # define SIZE_LUINT128 16 /* No current plans for support */
258 
259 # define SIZE_LCHAR8 1
260 # define SIZE_LCHAR 1 /* For backward compat char8 == char */
261 # define SIZE_LUCHAR8 1
262 # define SIZE_LUCHAR 1 /* For backward compat uchar8 == uchar */
263 # define SIZE_LCHAR16 2 /* No current plans for support */
264 # define SIZE_LUCHAR16 2 /* No current plans for support */
265 
266  /* sizes of different number types */
267 # define MACHINE_I8_SIZE 1
268 # define MACHINE_I16_SIZE 2
269 # define MACHINE_I32_SIZE 4
270 # define MACHINE_F32_SIZE 4
271 # define MACHINE_F64_SIZE 8
272 
273  /* maximum size of the atomic data types */
274 # define MAX_NT_SIZE 16
275 #endif /* _HNT_H */
276 

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52