SURFEX v8.1
General documentation of Surfex
privpub.h
Go to the documentation of this file.
1 
2 /* privpub.h */
3 
4 #ifndef _PRIVPUB_H_
5 #define _PRIVPUB_H_
6 
7 #include <stdio.h>
8 #include <string.h>
9 #include <errno.h>
10 #include <signal.h>
11 #include <unistd.h>
12 #include <sys/types.h>
13 
14 #if !defined(IO_BUFSIZE_DEFAULT)
15 /* The default I/O-buffer size = 4MBytes (unless overridden through ioassign) */
16 #define IO_BUFSIZE_DEFAULT 4194304
17 #endif
18 
19 #define NIL "(nil)"
20 
21 #define PERROR(msg) \
22 fprintf(stderr,"%s: %s (in %s:%d) : errno#%d\n",msg?msg:NIL,strerror(errno),__FILE__, __LINE__,errno)
23 
24 #if defined(VPP5000) || defined(VPP)
25 /* Fujitsu VPP doesn't have snprintf, so we created one in file ifsaux/support/endian.c */
26 /* For ODB/SQL compiler the same code sits in odb/compiler/odb98.c */
27 extern int snprintf(char *str, size_t size, const char *format, ...);
28 #endif
29 
30 #if defined(NO_TRUNC) || defined(VPP) || defined(SV2)
31 /* For systems without trunc() -function [an extension of ANSI-C, but usually available] */
32 #define trunc(x) ((x) - fmod((x),1))
33 #else
34 #if !defined(__cplusplus)
35  extern double trunc(double d);
36 #endif
37 #endif
38 
39 #define PRIVATE static
40 #define PUBLIC
41 
42 /* fprintf even if "fp" was NULL */
43 extern int ODB_fprintf(FILE *fp, const char *format, ...);
44 
45 /* Fortran90 compatible NINT-function */
46 
47 #define F90nint(x) ( ((x) > 0) ? (int)((x) + 0.5) : (int)((x) - 0.5) )
48 
49 /* Pi related stuff */
50 
51 #define pi ((double)3.14159265358979323844e0)
52 #define half_pi (pi / 2)
53 #define two_pi (2 * pi)
54 #define four_pi (4 * pi)
55 #define pi_over_180 (pi/180)
56 #define recip_pi_over_180 (180/pi)
57 
58 /* Radians to degrees & degrees to radians (formerly in odb.h) */
59 
60 #define R2D(x) ( (180/pi) * ( ((x) > pi) ? ((x) - 2*pi) : (x) ) )
61 #define D2R(x) ( (pi/180) * ( ((x) > 180) ? ((x) - 360) : (x) ) )
62 
63 /* Radius of the Earth both in meters and kilometres (formerly in odb.h) */
64 
65 #define R_Earth ((double)6371000e0)
66 #define R_Earth_km ((double)6371e0)
67 
68 /* Some common things ... */
69 
70 #undef MIN
71 #define MIN(a,b) ( ((a) < (b)) ? (a) : (b) )
72 
73 #undef MAX
74 #define MAX(a,b) ( ((a) > (b)) ? (a) : (b) )
75 
76 #undef ABS
77 #define ABS(x) ( ((x) >= 0) ? (x) : -(x) )
78 
79 #undef RNDUP_DIV
80 #define RNDUP_DIV(i,n) (( (i) + (n) - 1 ) / (n))
81 
82 #undef RNDUP
83 #define RNDUP(i,n) ( RNDUP_DIV(i,n) * (n))
84 
85 #define STRLEN(x) (((const char *)(x)) ? (int)strlen(x) : (int)0)
86 
87 #define _POOLNO "$pool#"
88 #define _NPOOLS "$npools#"
89 #define _NTABLES "$ntables#"
90 #define _UNIQNUM "$uniq#"
91 #define _ROWNUM "$row#"
92 #define _COLNUM "$col#"
93 #define _NROWS "$nrows#"
94 #define _NCOLS "$ncols#"
95 
96 #define IS_BSNUM(s) ((s) && *(s) == '\\' && STRLEN(s) >= 2 && isdigit((s)[1]))
97 #define IS_HASH(s) ((s) && *(s) == '#')
98 #define IS_DOLLAR(s) ((s) && *(s) == '$')
99 #define IS_TABLE(s) ((s) && (s)[0] == '@')
100 
101 #define IS_POOLNO(s) ((s) && (((s)[0] == '$' && (s)[1] == '#')|| strequ(s,_POOLNO)))
102 #define IS_(sym,s) strequ(s,_##sym)
103 #define IS_USDHASH(s) ((s) && (s)[0] == '$' && (s)[STRLEN(s)-1] == '#')
104 #define IS_USDDOTHASH(s) (IS_USDHASH(s) && strchr(s,'.') && (strchr(s,'.') == strrchr(s,'.')))
105 
106 static const char ODB_OFFSET_CHAR[] = "#";
107 #define GET_OFFSET(s) ((!(s) || IS_DOLLAR(s) || IS_HASH(s) || IS_USDHASH(s)) ? NULL : strrchr(s,*ODB_OFFSET_CHAR))
108 
109 /* Timers */
110 
111 extern double util_cputime_();
112 extern double util_walltime_();
113 
114 #ifdef RS6K
115 extern void xl__trbk_();
116 #else
117 #define xl__trbk_()
118 #endif
119 
120 extern void abor1fl_(const char *filename, const int *linenum,
121  const char *s,
122  int filenamelen, int slen);
123 extern void abor1_(const char *s, int slen);
124 
125 #define ABOR1(txt) { \
126  const char *t = (txt); \
127  xl__trbk_(); t ? abor1_(t, strlen(t)) : abor1_("",0); }
128 
129 #define ABOR1FL(txt) { \
130  const char *t = (txt); \
131  int linenum=__LINE__; \
132  t ? abor1fl_(__FILE__, &linenum, t, sizeof(__FILE__)-1, strlen(t)) \
133  : abor1fl_(__FILE__, &linenum, "", sizeof(__FILE__)-1, 0); \
134  _exit(1); /* Should never end up here */ }
135 
136 #define RAISE(x) { \
137  xl__trbk_(); \
138  if ((x) == SIGABRT) { \
139  const char *txt = "*** Fatal error; aborting (SIGABRT) ..."; \
140  ABOR1FL(txt); \
141  _exit(1); /* Should never end up here */ \
142  } \
143  else raise(x); \
144 }
145 
146 /* No. of bits for "int" */
147 #define MAXBITS 32
148 
149 /* No. of bits per 1-byte */
150 #define BITS_PER_BYTE 8
151 
152 #ifndef O_LOCK_DONE
153 #define O_LOCK_DONE
154 
155 /* OpenMP/ODB lock type */
156 /* Keep consistent with "ifsaux/include/drhook.h" */
157 /* Be ALSO consistent with OML_LOCK_KIND in ifsaux/module/oml_mod.F90 */
158 
159 typedef long long int o_lock_t; /* i.e. 64-bit integer */
160 
161 #define INIT_LOCKID_WITH_NAME(mylock, lockname) \
162  coml_init_lockid_with_name_(mylock, lockname, strlen(lockname))
163 
164 extern void coml_set_debug_(const int *konoff, int *kret);
165 extern void coml_init_lock_();
166 extern void coml_init_lockid_(o_lock_t *mylock);
167 extern void coml_init_lockid_with_name_(o_lock_t *mylock, const char *name, int name_len);
168 extern void coml_set_lock_();
169 extern void coml_set_lockid_(o_lock_t *mylock);
170 extern void coml_unset_lock_();
171 extern void coml_unset_lockid_(o_lock_t *mylock);
172 extern void coml_test_lock_(int *is_set);
173 extern void coml_test_lockid_(int *is_set, o_lock_t *mylock);
174 extern void coml_in_parallel_(int *is_parallel_region);
175 
176 #endif /* #ifndef O_LOCK_DONE */
177 
178 /* OpenMP-stuff */
179 
180 /* My thread-id [1 .. $OMP_NUM_THREADS] as in ifsaux/module/oml_mod.F90 */
181 extern int
182 get_thread_id_(); /* From "ifsaux/utilities/get_thread_id.F90" */
183 
184 /* Static number of threads allocated i.e. $OMP_NUM_THREADS */
185 extern int
186 get_max_threads_(); /* From "ifsaux/utilities/get_max_threads.F90" */
187 
188 /* The current number of threads allocated <= $OMP_NUM_THREADS */
189 extern int
190 get_num_threads_(); /* From "ifsaux/utilities/get_num_threads.F90" */
191 
192 #define DEF_IT int it = get_thread_id_()
193 #define IT (it-1)
194 #define DEF_INUMT int inumt = get_max_threads_()
195 
196 /* 0 (zero) Celsius in Kelvin */
197 
198 #define ZERO_POINT ((double)273.15e0)
199 
200 /* Aggregate function flags */
201 
202 #define ODB_AGGR_NONE 0x0000000
203 
204 #define ODB_AGGRMASK_DISTINCT 0x0100000
205 #define ODB_AGGRMASK_BOOLEAN 0x1000000
206 
207 #define ODB_AGGR_COUNT 0x0000001
208 #define ODB_AGGR_COUNT_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_COUNT)
209 
210 #define ODB_AGGR_BCOUNT (ODB_AGGRMASK_BOOLEAN | ODB_AGGR_COUNT)
211 #define ODB_AGGR_BCOUNT_DISTINCT (ODB_AGGRMASK_BOOLEAN | ODB_AGGR_COUNT_DISTINCT)
212 
213 #define ODB_AGGR_MIN 0x0000002
214 #define ODB_AGGR_MAX 0x0000004
215 
216 #define ODB_AGGR_SUM 0x0000008
217 #define ODB_AGGR_SUM_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_SUM)
218 
219 #define ODB_AGGR_AVG 0x0000010
220 #define ODB_AGGR_AVG_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_AVG)
221 
222 #define ODB_AGGR_STDEV 0x0000020
223 #define ODB_AGGR_STDEV_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_STDEV)
224 
225 #define ODB_AGGR_RMS 0x0000040
226 #define ODB_AGGR_RMS_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_RMS)
227 
228 #define ODB_AGGR_DOTP 0x0000080
229 #define ODB_AGGR_DOTP_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_DOTP)
230 
231 #define ODB_AGGR_NORM 0x0000100
232 #define ODB_AGGR_NORM_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_NORM)
233 
234 #define ODB_AGGR_VAR 0x0000200
235 #define ODB_AGGR_VAR_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_VAR)
236 
237 #define ODB_AGGR_COVAR 0x0000400
238 #define ODB_AGGR_CORR 0x0000800
239 
240 #define ODB_AGGR_LINREGR_A 0x0001000
241 #define ODB_AGGR_LINREGR_B 0x0002000
242 
243 #define ODB_AGGR_MEDIAN 0x0010000
244 #define ODB_AGGR_MEDIAN_DISTINCT (ODB_AGGRMASK_DISTINCT | ODB_AGGR_MEDIAN)
245 
246 #define ODB_AGGR_MINLOC 0x0020000
247 #define ODB_AGGR_MAXLOC 0x0040000
248 
249 #define ODB_AGGR_DENSITY 0x0080000
250 
251 #define ODB_tag_delim ";"
252 
253 
254 #ifdef __cplusplus
255 typedef bool Bool;
256 #else
257 typedef _Bool Bool;
258 #endif
259 
260 /* char : Normally occupies 1 byte */
261 
262 typedef unsigned int boolean;
263 
264 typedef boolean Boolean;
265 
266 typedef unsigned char byte;
267 typedef byte byte1;
268 #if !defined(RS6K)
269 typedef unsigned char uchar;
270 #endif
271 typedef char integer1;
272 typedef unsigned char uinteger1;
273 
274 /* short : Normally occupies 2 bytes */
275 
276 typedef short integer2;
277 #if !defined(RS6K) && !defined(LINUX) && !defined(HPPA) && !defined(VPP) && !defined(SUN4) && !defined(NECSX) && !defined(SV2)
278 typedef unsigned short int ushort;
279 #endif
280 typedef unsigned short uinteger2;
281 
282 /* int : Normally occupies 4 bytes */
283 
284 /* typedef unsigned int uint; (defined via system include files) */
285 typedef int integer4;
286 typedef unsigned int uinteger4;
287 
288 /* typedef unsigned long ulong; (defined via system include files) */
289 
290 /* long long: A non-standard way to access 8 byte integer(s) */
291 
292 typedef long long int longlong;
293 typedef long long int ll_t;
294 typedef unsigned long long int ulonglong;
295 typedef unsigned long long int u_ll_t;
296 typedef long long int integer8;
297 typedef unsigned long long int uinteger8;
298 
299 /* float : 32-bit flp (normally IEEE-754), 4 bytes */
300 
301 typedef float real4;
302 
303 /* double : 64-bit flp (normally IEEE-754), 8 bytes */
304 
305 typedef double real8;
306 
307 /* Formula alias double : For use by SELECT-expressions (29-Jun-2006/SS) */
308 
309 typedef double Formula;
310 
311 /* Supported data types */
312 /* Moved here from odb.h on 7-Jan-2004/SS */
313 
314 typedef int number;
315 typedef int pk1int;
316 typedef int pk2int;
317 typedef int pk3int;
318 typedef int pk4int;
319 typedef int pk5int;
320 typedef int pk9int;
321 
322 typedef pk1int linkoffset_t; /* also follows packing#1 */
323 typedef pk1int linklen_t; /* also follows packing#1 */
324 
325 /*
326  typedef unsigned int Bitfield;
327  typedef unsigned int hex4;
328 
329  We can't have (at least the above) unsigned ints since the following
330  substitution for unsigned int u and double d gets incorrect on RS6K,
331  when d < 0 [... the IBM-s.o.b. RS6K sets the result to zero !!]
332 
333  u = d ;
334 
335  what appears to be working is, but very weird is:
336  u = (int)d;
337 
338  but we don't want to use this cast-operator, since its introduction
339  would add even more confusion
340 
341  ==> lets make Bitfield and hex4 signed ints (29-May-2002/SS)
342 
343 */
344 
345 typedef int Bitfield;
346 typedef int hex4;
347 
348 typedef hex4 bufr;
349 typedef hex4 grib;
350 
352 
353 /* These inherit corresponding packing method */
354 
355 typedef pk1int yyyymmdd;
356 typedef pk1int hhmmss;
357 
358 typedef double pk2real;
359 typedef double pk3real;
360 typedef double pk4real;
361 typedef double pk5real;
362 typedef double pk9real;
363 typedef pk3real string;
364 /* typedef double string; */
365 
366 typedef double pk11real;
367 typedef double pk12real;
368 typedef double pk13real;
369 typedef double pk14real;
370 typedef double pk15real;
371 typedef double pk16real;
372 typedef double pk17real;
373 typedef double pk18real;
374 typedef double pk19real;
375 
376 typedef double pk21real;
377 typedef double pk22real;
378 typedef double pk23real;
379 typedef double pk24real;
380 typedef double pk25real;
381 typedef double pk26real;
382 typedef double pk27real;
383 typedef double pk28real;
384 typedef double pk29real;
385 
386 typedef double pk31real;
387 typedef double pk32real;
388 typedef double pk33real;
389 typedef double pk34real;
390 typedef double pk35real;
391 typedef double pk36real;
392 typedef double pk37real;
393 typedef double pk38real;
394 typedef double pk39real;
395 
396 typedef real8 real;
397 
398 /* S2D-business */
399 
400 #define S2D "S2D_"
401 #define S2DLEN (sizeof(S2D)-1) /* i.e. strlen(S2D) */
402 
403 #define S2Dlc "s2d_"
404 #define S2DlcLEN (sizeof(S2Dlc)-1) /* i.e. strlen(S2Dlc) */
405 
406 #define S2D_all_blanks (0x2020202020202020ull)
407 
408 typedef union {
409  double dval;
411  uint ival[2];
412  char str[9];
413  char *saddr;
414 } S2D_Union;
415 
416 typedef struct {
417  uint ival[2];
418 } S2D_Type;
419 
420 #define MASK_0 0U /* 0 */
421 #define MASK_1 1U /* 1 */
422 #define MASK_2 3U /* 11 */
423 #define MASK_3 7U /* 111 */
424 #define MASK_4 15U /* 1111 */
425 #define MASK_5 31U /* 11111 */
426 #define MASK_6 63U /* 111111 */
427 #define MASK_7 127U /* 1111111 */
428 #define MASK_8 255U /* 11111111 */
429 #define MASK_9 511U /* 111111111 */
430 #define MASK_10 1023U /* 1111111111 */
431 #define MASK_11 2047U /* 11111111111 */
432 #define MASK_12 4095U /* 111111111111 */
433 #define MASK_13 8191U /* 1111111111111 */
434 #define MASK_14 16383U /* 11111111111111 */
435 #define MASK_15 32767U /* 111111111111111 */
436 #define MASK_16 65535U /* 1111111111111111 */
437 #define MASK_17 131071U /* 11111111111111111 */
438 #define MASK_18 262143U /* 111111111111111111 */
439 #define MASK_19 524287U /* 1111111111111111111 */
440 #define MASK_20 1048575U /* 11111111111111111111 */
441 #define MASK_21 2097151U /* 111111111111111111111 */
442 #define MASK_22 4194303U /* 1111111111111111111111 */
443 #define MASK_23 8388607U /* 11111111111111111111111 */
444 #define MASK_24 16777215U /* 111111111111111111111111 */
445 #define MASK_25 33554431U /* 1111111111111111111111111 */
446 #define MASK_26 67108863U /* 11111111111111111111111111 */
447 #define MASK_27 134217727U /* 111111111111111111111111111 */
448 #define MASK_28 268435455U /* 1111111111111111111111111111 */
449 #define MASK_29 536870911U /* 11111111111111111111111111111 */
450 #define MASK_30 1073741823U /* 111111111111111111111111111111 */
451 #define MASK_31 2147483647U /* 1111111111111111111111111111111 */
452 #define MASK_32 4294967295U /* 11111111111111111111111111111111 */
453 
454 #define MASK(n) MASK_##n
455 
456 #define IOR(x,y) ((x) | (y))
457 #define IAND(x,y) ((x) & (y))
458 
459 #define ISHFTL(x,n) ((x) << (n))
460 #define ISHFTR(x,n) ((x) >> (n))
461 
462 #define GET_BITS(x, pos, len) IAND(ISHFTR((int)(x), pos), MASK(len))
463 
464 #define PUT_BITS(to, x, pos, len) \
465  to = IOR(IAND(to, ~(ISHFTL(MASK(len), pos))), \
466  IAND((int)(x), ISHFTL(MASK(len), pos)))
467 
468 #define BYTESIZE(x) (x##len * sizeof(*x))
469 #define BYTESIZE2(x,elemsize) (x##len * (elemsize))
470 
471 typedef struct {
472 #ifdef LITTLE
473  unsigned int pmethod:8; /* Value 0 .. 255 ;
474  0 means not packed;
475  1,2,3,5,9,11-19,21-29 methods implemented
476  255 means not really packed, but PCMA-header exists for MDI's */
477 
478  unsigned int signbit:1; /* signed = 1, unsigned = 0 */
479 
480  unsigned int byte_swappable:1; /* byte swapping applicable = 1, N/A i.e. raw data = 0 */
481 
482  unsigned int precision_bits:6; /* power of 2 for length of data; range = [0..63] bits */
483 
484  unsigned int base_type:2; /* other = 0, int = 1, flp = 2, complex flp = 3
485  notes:
486  - if other, look for other_type
487  - precion_bits used for length as 2^precision_bits
488  - if int, check also signed/unsigned part
489  */
490 
491  unsigned int other_type:14; /* used when base_type == 0 ; currently defined
492  undefined = 00 000 000 000 000 = 0 = 0x0
493  Bitfield = 00 000 000 000 001 = 1 = 0x1
494  (note: also precision_bits must be 5 i.e. 2^5 == 32;
495  preferably unsigned)
496  string = 00 000 000 000 010 = 2 = 0x2
497  (note: alias to char(8);
498  also precision_bits should be 3 i.e. 2^3 == 8 bytes;
499  byte_swappable must be == 0 i.e. raw)
500  yyyymmdd = 00 000 000 000 100 = 4 = 0x4
501  (note: preferably unsigned)
502  hhmmss = 00 000 000 001 000 = 8 = 0x8
503  (note: preferably unsigned)
504  linkoffset_t = 00 000 000 010 000 = 16 = 0x10
505  (note: preferably unsigned)
506  linklen_t = 00 000 000 100 000 = 32 = 0x20
507  (note: preferably unsigned)
508  bufr-data = 00 000 001 000 000 = 64 = 0x40
509  (note: also byte_swappable must be == 0 i.e. raw;
510  also precision_bits must be 5 i.e. 2^5 == 32)
511  grib-data = 00 000 010 000 000 = 128 = 0x80
512  (note: also byte_swappable must be == 0 i.e. raw;
513  also precision_bits must be 5 i.e. 2^5 == 32)
514  blob = 00 000 100 000 000 = 256 = 0x100
515  (note: precision_bits used for length; up to 2^16 bytes; enough ?;
516  byte_swappable must be == 0 i.e. raw)
517  long blob = 00 001 000 000 000 = 512 = 0x200
518  (note: precision_bits used for length; up to 2^31 bytes; enough ?;
519  byte_swappable must be == 0 i.e. raw)
520  char = 00 010 000 000 000 = 1024 = 0x400
521  (note: precision_bits used for length;
522  byte_swappable must be == 0 i.e. raw)
523  varchar = 00 100 000 000 000 = 2048 = 0x800
524  (note: precision_bits used for maximum length;
525  byte_swappable must be == 0 i.e. raw)
526  reserved_1 = 01 000 000 000 000 = 4096 = 0x1000
527  reserved_2 = 10 000 000 000 000 = 8192 = 0x2000
528  */
529 #else /* Big endian */
530  unsigned int other_type:14;
531  unsigned int base_type:2;
532  unsigned int precision_bits:6;
533  unsigned int byte_swappable:1;
534  unsigned int signbit:1;
535  unsigned int pmethod:8;
536 #endif
537 } odb_types_t;
538 
539 PUBLIC uint get_dtnum(const char *dt);
540 PUBLIC int get_dtsize(const char *dt);
541 
542 #define EXTRACT_PMETHOD(x) GET_BITS(x,0,8)
543 #define EXTRACT_DATATYPE(x) GET_BITS(x,8,24)
544 #define EXTRACT_SIGNBIT(x) GET_BITS(x,8,1)
545 #define EXTRACT_SWAPPABLE(x) GET_BITS(x,9,1)
546 #define EXTRACT_PRECISION(x) GET_BITS(x,10,6)
547 #define EXTRACT_BASETYPE(x) GET_BITS(x,16,2)
548 #define EXTRACT_OTHERTYPE(x) GET_BITS(x,18,14)
549 
550 /* The following is a product of ../tools/typebits.c -program output */
551 
552 /* signbit=0, byte_swappable=0, precision_bits=0, base_type=0, other_type=0x0 (0) */
553 #define DATATYPE_UNDEF 0x0 /* (0 dec) undef */
554 
555 /* signbit=0, byte_swappable=0, precision_bits=0, base_type=1, other_type=0x0 (0) */
556 #define DATATYPE_BIT 0x100 /* (256 dec) bit : 1 bits, 0 bytes */
557 
558 /* signbit=1, byte_swappable=1, precision_bits=3, base_type=1, other_type=0x0 (0) */
559 #define DATATYPE_INT1 0x10f /* (271 dec) char : 8 bits, 1 bytes */
560 
561 /* signbit=1, byte_swappable=1, precision_bits=4, base_type=1, other_type=0x0 (0) */
562 #define DATATYPE_INT2 0x113 /* (275 dec) short : 16 bits, 2 bytes */
563 
564 /* signbit=1, byte_swappable=1, precision_bits=5, base_type=1, other_type=0x0 (0) */
565 #define DATATYPE_INT4 0x117 /* (279 dec) int : 32 bits, 4 bytes */
566 
567 /* signbit=1, byte_swappable=1, precision_bits=6, base_type=1, other_type=0x0 (0) */
568 #define DATATYPE_INT8 0x11b /* (283 dec) long long : 64 bits, 8 bytes */
569 
570 /* signbit=0, byte_swappable=1, precision_bits=3, base_type=1, other_type=0x0 (0) */
571 #define DATATYPE_UINT1 0x10e /* (270 dec) uchar : 8 bits, 1 bytes */
572 
573 /* signbit=0, byte_swappable=1, precision_bits=4, base_type=1, other_type=0x0 (0) */
574 #define DATATYPE_UINT2 0x112 /* (274 dec) ushort : 16 bits, 2 bytes */
575 
576 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=1, other_type=0x0 (0) */
577 #define DATATYPE_UINT4 0x116 /* (278 dec) uint : 32 bits, 4 bytes */
578 
579 /* signbit=0, byte_swappable=1, precision_bits=6, base_type=1, other_type=0x0 (0) */
580 #define DATATYPE_UINT8 0x11a /* (282 dec) ulonglong : 64 bits, 8 bytes */
581 
582 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=2, other_type=0x0 (0) */
583 #define DATATYPE_REAL4 0x216 /* (534 dec) float : 32 bits, 4 bytes */
584 
585 /* signbit=0, byte_swappable=1, precision_bits=6, base_type=2, other_type=0x0 (0) */
586 #define DATATYPE_REAL8 0x21a /* (538 dec) double : 64 bits, 8 bytes */
587 
588 /* signbit=0, byte_swappable=1, precision_bits=7, base_type=2, other_type=0x0 (0) */
589 #define DATATYPE_REAL16 0x21e /* (542 dec) long double : 128 bits, 16 bytes */
590 
591 /* signbit=0, byte_swappable=1, precision_bits=6, base_type=3, other_type=0x0 (0) */
592 #define DATATYPE_CMPLX4 0x31a /* (794 dec) complex4 : 64 bits, 8 bytes */
593 
594 /* signbit=0, byte_swappable=1, precision_bits=7, base_type=3, other_type=0x0 (0) */
595 #define DATATYPE_CMPLX8 0x31e /* (798 dec) complex8 : 128 bits, 16 bytes */
596 
597 /* signbit=0, byte_swappable=1, precision_bits=8, base_type=3, other_type=0x0 (0) */
598 #define DATATYPE_CMPLX16 0x322 /* (802 dec) complex16 : 256 bits, 32 bytes */
599 
600 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x1 (1) */
601 #define DATATYPE_BITFIELD 0x416 /* (1046 dec) Bitfield : 32 bits, 4 bytes */
602 
603 /* signbit=0, byte_swappable=0, precision_bits=6, base_type=0, other_type=0x2 (2) */
604 #define DATATYPE_STRING 0x818 /* (2072 dec) string : 64 bits, 8 bytes */
605 
606 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x4 (4) */
607 #define DATATYPE_YYYYMMDD 0x1016 /* (4118 dec) yyyymmdd : 32 bits, 4 bytes */
608 
609 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x8 (8) */
610 #define DATATYPE_HHMMSS 0x2016 /* (8214 dec) hhmmss : 32 bits, 4 bytes */
611 
612 /* signbit=1, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x10 (16) */
613 #define DATATYPE_LINKOFFSET 0x4017 /* (16407 dec) linkoffset_t : 32 bits, 4 bytes */
614 
615 /* signbit=1, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x20 (32) */
616 #define DATATYPE_LINKLEN 0x8017 /* (32791 dec) linklen_t : 32 bits, 4 bytes */
617 
618 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x40 (64) */
619 #define DATATYPE_BUFR 0x10016 /* (65558 dec) bufr : 32 bits, 4 bytes */
620 
621 /* signbit=0, byte_swappable=1, precision_bits=5, base_type=0, other_type=0x80 (128) */
622 #define DATATYPE_GRIB 0x20016 /* (131094 dec) grib : 32 bits, 4 bytes */
623 
624 /* signbit=0, byte_swappable=0, precision_bits=19, base_type=0, other_type=0x100 (256) */
625 #define DATATYPE_BLOB 0x4004c /* (262220 dec) blob64kB : 65536 bytes */
626 
627 /* signbit=0, byte_swappable=0, precision_bits=34, base_type=0, other_type=0x200 (512) */
628 #define DATATYPE_LONGBLOB 0x80088 /* (524424 dec) blob2GB : 2147483648 bytes */
629 
630 /* signbit=0, byte_swappable=0, precision_bits=11, base_type=0, other_type=0x400 (1024) */
631 #define DATATYPE_CHAR 0x10002c /* (1048620 dec) char(1:255) : 256 bytes */
632 
633 /* signbit=0, byte_swappable=0, precision_bits=11, base_type=0, other_type=0x800 (2048) */
634 #define DATATYPE_VARCHAR 0x20002c /* (2097196 dec) varchar(1:255) : 256 bytes */
635 
636 #endif
double pk16real
Definition: privpub.h:371
static long size
Definition: bytes_io.c:262
long long int longlong
Definition: privpub.h:292
unsigned int pmethod
Definition: privpub.h:473
void xl__trbk_()
int get_num_threads_()
PUBLIC int get_dtsize(const char *dt)
int hex4
Definition: privpub.h:346
unsigned int precision_bits
Definition: privpub.h:482
pk1int hhmmss
Definition: privpub.h:356
double real8
Definition: privpub.h:305
void coml_set_debug_(const int *konoff, int *kret)
double pk31real
Definition: privpub.h:386
pk3real string
Definition: privpub.h:363
double pk22real
Definition: privpub.h:377
void coml_unset_lock_()
double util_cputime_()
Definition: drhook.c:5064
unsigned int base_type
Definition: privpub.h:484
long long int o_lock_t
Definition: drhook.h:50
byte byte1
Definition: privpub.h:267
int pk5int
Definition: privpub.h:319
boolean Boolean
Definition: privpub.h:264
int pk3int
Definition: privpub.h:317
unsigned short int ushort
Definition: privpub.h:278
double pk21real
Definition: privpub.h:376
double pk13real
Definition: privpub.h:368
void coml_set_lockid_(o_lock_t *mylock)
int get_thread_id_()
long long int integer8
Definition: privpub.h:296
quick &counting sorts only inumt inumt name
pk1int yyyymmdd
Definition: privpub.h:355
char integer1
Definition: privpub.h:271
double pk3real
Definition: privpub.h:359
unsigned long long int u_ll_t
Definition: privpub.h:295
void coml_init_lockid_with_name_(o_lock_t *mylock, const char *name, int name_len)
double pk26real
Definition: privpub.h:381
long long int ll_t
Definition: privpub.h:293
double pk9real
Definition: privpub.h:362
void abor1fl_(const char *filename, const int *linenum, const char *s, int filenamelen, int slen)
unsigned char uinteger1
Definition: privpub.h:272
integer4 integer
Definition: privpub.h:351
double pk4real
Definition: privpub.h:360
FILE * fp
Definition: opfla_perfmon.c:24
double pk27real
Definition: privpub.h:382
float real4
Definition: privpub.h:301
double pk5real
Definition: privpub.h:361
pk1int linkoffset_t
Definition: privpub.h:322
double pk37real
Definition: privpub.h:392
int Bitfield
Definition: privpub.h:345
unsigned char byte
Definition: privpub.h:266
double Formula
Definition: privpub.h:309
short integer2
Definition: privpub.h:276
double pk28real
Definition: privpub.h:383
double pk2real
Definition: privpub.h:358
void coml_test_lockid_(int *is_set, o_lock_t *mylock)
double pk18real
Definition: privpub.h:373
double pk34real
Definition: privpub.h:389
void coml_unset_lockid_(o_lock_t *mylock)
pk1int linklen_t
Definition: privpub.h:323
double pk17real
Definition: privpub.h:372
hex4 grib
Definition: privpub.h:349
void coml_test_lock_(int *is_set)
double pk39real
Definition: privpub.h:394
unsigned int byte_swappable
Definition: privpub.h:480
double pk25real
Definition: privpub.h:380
void coml_in_parallel_(int *is_parallel_region)
int ODB_fprintf(FILE *fp, const char *format,...)
double dval
Definition: privpub.h:409
double pk33real
Definition: privpub.h:388
bool Bool
Definition: privpub.h:255
unsigned int boolean
Definition: privpub.h:262
PUBLIC uint get_dtnum(const char *dt)
void coml_init_lock_()
unsigned int uinteger4
Definition: privpub.h:286
double pk32real
Definition: privpub.h:387
double pk19real
Definition: privpub.h:374
double pk14real
Definition: privpub.h:369
int snprintf(char *str, size_t size, const char *format,...)
Definition: endian.c:108
double pk15real
Definition: privpub.h:370
int pk4int
Definition: privpub.h:318
double pk12real
Definition: privpub.h:367
double pk36real
Definition: privpub.h:391
void coml_init_lockid_(o_lock_t *mylock)
double pk24real
Definition: privpub.h:379
double pk23real
Definition: privpub.h:378
unsigned short uinteger2
Definition: privpub.h:280
unsigned long long int uinteger8
Definition: privpub.h:297
unsigned long long int ulonglong
Definition: privpub.h:294
hex4 bufr
Definition: privpub.h:348
double trunc(double d)
int pk2int
Definition: privpub.h:316
int number
Definition: privpub.h:314
int pk9int
Definition: privpub.h:320
static const char ODB_OFFSET_CHAR[]
Definition: privpub.h:106
void coml_set_lock_()
unsigned int signbit
Definition: privpub.h:478
int integer4
Definition: privpub.h:285
u_ll_t llu
Definition: privpub.h:410
int get_max_threads_()
double pk11real
Definition: privpub.h:366
unsigned int other_type
Definition: privpub.h:491
char * saddr
Definition: privpub.h:413
void abor1_(const char *s, int slen)
double pk38real
Definition: privpub.h:393
double pk29real
Definition: privpub.h:384
unsigned char uchar
Definition: privpub.h:269
int pk1int
Definition: privpub.h:315
real8 real
Definition: privpub.h:396
long long int o_lock_t
Definition: privpub.h:159
double util_walltime_()
Definition: drhook.c:5040
double pk35real
Definition: privpub.h:390