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 HDF5. The full HDF5 copyright notice, including * 7 * terms governing use, modification, and redistribution, is contained in * 8 * the COPYING file, which can be found at the root of the source code * 9 * distribution tree, or in https://www.hdfgroup.org/licenses. * 10 * If you do not have access to either file, you may request a copy from * 11 * help@hdfgroup.org. * 12 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 13 14 /* 15 * Programmer: Robb Matzke 16 * Monday, December 8, 1997 17 * 18 * Purpose: This file contains declarations which are visible only within 19 * the H5T package. Source files outside the H5T package should 20 * include H5Tprivate.h instead. 21 */ 22 #if !(defined H5T_FRIEND || defined H5T_MODULE) 23 #error "Do not include this file outside the H5T package!" 24 #endif 25 26 #ifndef H5Tpkg_H 27 #define H5Tpkg_H 28 29 /* 30 * Define this to enable debugging. 31 */ 32 #ifdef NDEBUG 33 #undef H5T_DEBUG 34 #endif 35 36 /* Get package's private header */ 37 #include "H5Tprivate.h" 38 39 /* Other private headers needed by this file */ 40 #include "H5Fprivate.h" /* Files */ 41 #include "H5FLprivate.h" /* Free Lists */ 42 #include "H5Oprivate.h" /* Object headers */ 43 #include "H5VLprivate.h" /* Virtual Object Layer */ 44 45 /* Other public headers needed by this file */ 46 #include "H5Spublic.h" /* Dataspace functions */ 47 48 /* Length of debugging name buffer */ 49 #define H5T_NAMELEN 32 50 51 /* Macro to ease detecting "complex" datatypes (i.e. those with base types or fields) */ 52 #define H5T_IS_COMPLEX(t) \ 53 ((t) == H5T_COMPOUND || (t) == H5T_ENUM || (t) == H5T_VLEN || (t) == H5T_ARRAY || (t) == H5T_REFERENCE) 54 55 /* Macro to ease detecting fixed "string" datatypes */ 56 #define H5T_IS_FIXED_STRING(dt) (H5T_STRING == (dt)->type) 57 58 /* Macro to ease detecting variable-length "string" datatypes */ 59 #define H5T_IS_VL_STRING(dt) (H5T_VLEN == (dt)->type && H5T_VLEN_STRING == (dt)->u.vlen.type) 60 61 /* Macro to ease detecting fixed or variable-length "string" datatypes */ 62 #define H5T_IS_STRING(dt) (H5T_IS_FIXED_STRING(dt) || H5T_IS_VL_STRING(dt)) 63 64 /* Macro to ease detecting atomic datatypes */ 65 #define H5T_IS_ATOMIC(dt) (!(H5T_IS_COMPLEX((dt)->type) || (dt)->type == H5T_OPAQUE)) 66 67 /* Macro to ease retrieving class of shared datatype */ 68 /* (Externally, a VL string is a string; internally, a VL string is a VL. Lie 69 * to the user if they have a VL string and tell them it's in the string 70 * class) 71 */ 72 #define H5T_GET_CLASS(shared, internal) \ 73 ((internal) ? (shared)->type : (H5T_IS_VL_STRING(shared) ? H5T_STRING : (shared)->type)) 74 75 /* 76 * Datatype encoding versions 77 */ 78 79 /* This is the version to create all datatypes which don't contain 80 * array datatypes (atomic types, compound datatypes without array fields, 81 * vlen sequences of objects which aren't arrays, etc.) or VAX byte-ordered 82 * objects. 83 */ 84 #define H5O_DTYPE_VERSION_1 1 85 86 /* This is the version to create all datatypes which contain H5T_ARRAY 87 * class objects (array definitely, potentially compound & vlen sequences also), 88 * but not VAX byte-ordered objects. 89 */ 90 #define H5O_DTYPE_VERSION_2 2 91 92 /* This is the version to create all datatypes which contain VAX byte-ordered 93 * objects (floating-point types, currently). 94 */ 95 /* This version also packs compound & enum field names without padding */ 96 /* This version also encodes the member offset of compound fields more efficiently */ 97 /* This version also encodes array types more efficiently */ 98 #define H5O_DTYPE_VERSION_3 3 99 100 /* This is the version that adds support for new reference types and prevents 101 * older versions of the library to attempt reading unknown types. 102 */ 103 #define H5O_DTYPE_VERSION_4 4 104 105 /* The latest version of the format. Look through the 'encode helper' routine 106 * and 'size' callback for places to change when updating this. */ 107 #define H5O_DTYPE_VERSION_LATEST H5O_DTYPE_VERSION_4 108 109 /* Flags for visiting datatype */ 110 #define H5T_VISIT_COMPLEX_FIRST 0x01 /* Visit complex datatype before visiting member/parent datatypes */ 111 #define H5T_VISIT_COMPLEX_LAST 0x02 /* Visit complex datatype after visiting member/parent datatypes */ 112 /* (setting both flags will mean visiting complex type twice) */ 113 #define H5T_VISIT_SIMPLE 0x04 /* Visit simple datatypes (at all) */ 114 /* (setting H5T_VISIT_SIMPLE and _not_ setting either H5T_VISIT_COMPLEX_FIRST or H5T_VISIT_COMPLEX_LAST will 115 * mean visiting _only_ "simple" "leafs" in the "tree" */ 116 /* (_not_ setting H5T_VISIT_SIMPLE and setting either H5T_VISIT_COMPLEX_FIRST or H5T_VISIT_COMPLEX_LAST will 117 * mean visiting all nodes _except_ "simple" "leafs" in the "tree" */ 118 119 /* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some 120 * incorrect conversions. */ 121 #if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) 122 #define H5T_CONV_INTERNAL_LLONG_LDOUBLE 1 123 #endif 124 125 /* Define an internal macro for converting unsigned long long to long double. SGI compilers give 126 * some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does 127 * not support unsigned long long. For FreeBSD(sleipnir), the last 2 bytes of mantissa are lost when 128 * compiler tries to do the conversion. For Cygwin, compiler doesn't do rounding correctly. 129 * Mac OS 10.4 gives some incorrect result. */ 130 #if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) 131 #define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1 132 #endif 133 134 /* Define an internal macro for converting long double to long long. SGI compilers give some incorrect 135 * conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates floating exception. 136 * The hard conversion on Windows .NET 2003 has a bug and gives wrong exception value. */ 137 #if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || (!H5_WANT_DATA_ACCURACY) 138 #define H5T_CONV_INTERNAL_LDOUBLE_LLONG 1 139 #endif 140 141 /* Define an internal macro for converting long double to unsigned long long. SGI compilers give some 142 * incorrect conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates 143 * floating exception. */ 144 #if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || (!H5_WANT_DATA_ACCURACY) 145 #define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 1 146 #else 147 #define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 0 148 #endif 149 150 /* Statistics about a conversion function */ 151 struct H5T_stats_t { 152 unsigned ncalls; /*num calls to conversion function */ 153 hsize_t nelmts; /*total data points converted */ 154 H5_timevals_t times; /*total time for conversion */ 155 }; 156 157 /* Library internal datatype conversion functions are... */ 158 typedef herr_t (*H5T_lib_conv_t)(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 159 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 160 161 /* Conversion callbacks (library internal ones don't need DXPL) */ 162 typedef struct H5T_conv_func_t { 163 hbool_t is_app; /* Whether conversion function is registered from application */ 164 union { 165 H5T_conv_t app_func; /* Application data conversion function */ 166 H5T_lib_conv_t lib_func; /* Library internal data conversion function */ 167 } u; 168 } H5T_conv_func_t; 169 170 /* The datatype conversion database */ 171 struct H5T_path_t { 172 char name[H5T_NAMELEN]; /*name for debugging only */ 173 H5T_t * src; /*source datatype */ 174 H5T_t * dst; /*destination datatype */ 175 H5T_conv_func_t conv; /* Conversion function */ 176 hbool_t is_hard; /*is it a hard function? */ 177 hbool_t is_noop; /*is it the noop conversion? */ 178 hbool_t are_compounds; /*are source and dest both compounds?*/ 179 H5T_stats_t stats; /*statistics for the conversion */ 180 H5T_cdata_t cdata; /*data for this function */ 181 }; 182 183 /* Reference function pointers */ 184 typedef herr_t (*H5T_ref_isnullfunc_t)(const H5VL_object_t *file, const void *src_buf, hbool_t *isnull); 185 typedef herr_t (*H5T_ref_setnullfunc_t)(H5VL_object_t *file, void *dst_buf, void *bg_buf); 186 typedef size_t (*H5T_ref_getsizefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, 187 H5VL_object_t *dst_file, hbool_t *dst_copy); 188 typedef herr_t (*H5T_ref_readfunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, 189 H5VL_object_t *dst_file, void *dst_buf, size_t dst_size); 190 typedef herr_t (*H5T_ref_writefunc_t)(H5VL_object_t *src_file, const void *src_buf, size_t src_size, 191 H5R_type_t src_type, H5VL_object_t *dst_file, void *dst_buf, 192 size_t dst_size, void *bg_buf); 193 194 typedef struct H5T_ref_class_t { 195 H5T_ref_isnullfunc_t isnull; /* check if reference value is NIL */ 196 H5T_ref_setnullfunc_t setnull; /* set a reference value to NIL */ 197 H5T_ref_getsizefunc_t getsize; /* get reference size (bytes) */ 198 H5T_ref_readfunc_t read; /* read reference into buffer */ 199 H5T_ref_writefunc_t write; /* write reference from buffer */ 200 } H5T_ref_class_t; 201 202 typedef struct H5T_atomic_t { 203 H5T_order_t order; /* byte order */ 204 size_t prec; /* precision in bits */ 205 size_t offset; /* bit position of lsb of value */ 206 H5T_pad_t lsb_pad; /* type of lsb padding */ 207 H5T_pad_t msb_pad; /* type of msb padding */ 208 union { 209 struct { 210 H5T_sign_t sign; /* type of integer sign */ 211 } i; /* integer; integer types */ 212 213 struct { 214 size_t sign; /* bit position of sign bit */ 215 size_t epos; /* position of lsb of exponent */ 216 size_t esize; /* size of exponent in bits */ 217 uint64_t ebias; /* exponent bias */ 218 size_t mpos; /* position of lsb of mantissa */ 219 size_t msize; /* size of mantissa */ 220 H5T_norm_t norm; /* normalization */ 221 H5T_pad_t pad; /* type of padding for internal bits */ 222 } f; /* floating-point types */ 223 224 struct { 225 H5T_cset_t cset; /* character set */ 226 H5T_str_t pad; /* space or null padding of extra bytes */ 227 } s; /* string types */ 228 229 struct { 230 H5R_type_t rtype; /* type of reference stored */ 231 unsigned version; /* version of encoded reference */ 232 hbool_t opaque; /* opaque reference type */ 233 H5T_loc_t loc; /* location of data in buffer */ 234 H5VL_object_t * file; /* file VOL pointer (if data is on disk) */ 235 const H5T_ref_class_t *cls; /* Pointer to ref class callbacks */ 236 } r; /* reference types */ 237 } u; 238 } H5T_atomic_t; 239 240 /* How members are sorted for compound or enum datatypes */ 241 typedef enum H5T_sort_t { 242 H5T_SORT_NONE = 0, /*not sorted */ 243 H5T_SORT_NAME = 1, /*sorted by member name */ 244 H5T_SORT_VALUE = 2 /*sorted by memb offset or enum value*/ 245 } H5T_sort_t; 246 247 /* A compound datatype member */ 248 typedef struct H5T_cmemb_t { 249 char * name; /*name of this member */ 250 size_t offset; /*offset from beginning of struct */ 251 size_t size; /*size of this member */ 252 struct H5T_t *type; /*type of this member */ 253 } H5T_cmemb_t; 254 255 /* A compound datatype */ 256 typedef struct H5T_compnd_t { 257 unsigned nalloc; /*num entries allocated in MEMB array*/ 258 unsigned nmembs; /*number of members defined in struct*/ 259 H5T_sort_t sorted; /*how are members sorted? */ 260 hbool_t packed; /*are members packed together? */ 261 H5T_cmemb_t *memb; /*array of struct members */ 262 size_t memb_size; /*total of all member sizes */ 263 } H5T_compnd_t; 264 265 /* An enumeration datatype */ 266 typedef struct H5T_enum_t { 267 unsigned nalloc; /*num entries allocated */ 268 unsigned nmembs; /*number of members defined in enum */ 269 H5T_sort_t sorted; /*how are members sorted? */ 270 void * value; /*array of values */ 271 char ** name; /*array of symbol names */ 272 } H5T_enum_t; 273 274 /* VL types */ 275 typedef enum { 276 H5T_VLEN_BADTYPE = -1, /* invalid VL Type */ 277 H5T_VLEN_SEQUENCE = 0, /* VL sequence */ 278 H5T_VLEN_STRING, /* VL string */ 279 H5T_VLEN_MAXTYPE /* highest type (Invalid as true type) */ 280 } H5T_vlen_type_t; 281 282 /* VL function pointers */ 283 typedef herr_t (*H5T_vlen_getlen_func_t)(H5VL_object_t *file, const void *vl_addr, size_t *len); 284 typedef void *(*H5T_vlen_getptr_func_t)(void *vl_addr); 285 typedef herr_t (*H5T_vlen_isnull_func_t)(const H5VL_object_t *file, void *vl_addr, hbool_t *isnull); 286 typedef herr_t (*H5T_vlen_setnull_func_t)(H5VL_object_t *file, void *_vl, void *_bg); 287 typedef herr_t (*H5T_vlen_read_func_t)(H5VL_object_t *file, void *_vl, void *buf, size_t len); 288 typedef herr_t (*H5T_vlen_write_func_t)(H5VL_object_t *file, const H5T_vlen_alloc_info_t *vl_alloc_info, 289 void *_vl, void *buf, void *_bg, size_t seq_len, size_t base_size); 290 typedef herr_t (*H5T_vlen_delete_func_t)(H5VL_object_t *file, const void *_vl); 291 292 /* VL datatype callbacks */ 293 typedef struct H5T_vlen_class_t { 294 H5T_vlen_getlen_func_t getlen; /* Function to get VL sequence size (in element units, not bytes) */ 295 H5T_vlen_getptr_func_t getptr; /* Function to get VL sequence pointer */ 296 H5T_vlen_isnull_func_t isnull; /* Function to check if VL value is NIL */ 297 H5T_vlen_setnull_func_t setnull; /* Function to set a VL value to NIL */ 298 H5T_vlen_read_func_t read; /* Function to read VL sequence into buffer */ 299 H5T_vlen_write_func_t write; /* Function to write VL sequence from buffer */ 300 H5T_vlen_delete_func_t del; /* Function to delete VL sequence */ 301 } H5T_vlen_class_t; 302 303 /* A VL datatype */ 304 typedef struct H5T_vlen_t { 305 H5T_vlen_type_t type; /* Type of VL data in buffer */ 306 H5T_loc_t loc; /* Location of VL data in buffer */ 307 H5T_cset_t cset; /* For VL string: character set */ 308 H5T_str_t pad; /* For VL string: space or null padding of 309 * extra bytes */ 310 H5VL_object_t * file; /* File object (if VL data is on disk) */ 311 const H5T_vlen_class_t *cls; /* Pointer to VL class callbacks */ 312 } H5T_vlen_t; 313 314 /* An opaque datatype */ 315 typedef struct H5T_opaque_t { 316 char *tag; /*short type description string */ 317 } H5T_opaque_t; 318 319 /* An array datatype */ 320 typedef struct H5T_array_t { 321 size_t nelem; /* total number of elements in array */ 322 unsigned ndims; /* member dimensionality */ 323 size_t dim[H5S_MAX_RANK]; /* size in each dimension */ 324 } H5T_array_t; 325 326 typedef enum H5T_state_t { 327 H5T_STATE_TRANSIENT, /*type is a modifiable, closable transient */ 328 H5T_STATE_RDONLY, /*transient, not modifiable, closable */ 329 H5T_STATE_IMMUTABLE, /*transient, not modifiable, not closable */ 330 H5T_STATE_NAMED, /*named constant, not open */ 331 H5T_STATE_OPEN /*named constant, open object header */ 332 } H5T_state_t; 333 334 /* This struct is shared between all occurrences of an open named type */ 335 typedef struct H5T_shared_t { 336 hsize_t fo_count; /* number of references to this file object */ 337 H5T_state_t state; /*current state of the type */ 338 H5T_class_t type; /*which class of type is this? */ 339 size_t size; /*total size of an instance of this type */ 340 unsigned version; /* Version of object header message to encode this object with */ 341 hbool_t 342 force_conv; /* Set if this type always needs to be converted and H5T__conv_noop cannot be called */ 343 struct H5T_t * parent; /*parent type for derived datatypes */ 344 H5VL_object_t *owned_vol_obj; /* Vol object owned by this type (free on close) */ 345 union { 346 H5T_atomic_t atomic; /* an atomic datatype */ 347 H5T_compnd_t compnd; /* a compound datatype (struct) */ 348 H5T_enum_t enumer; /* an enumeration type (enum) */ 349 H5T_vlen_t vlen; /* a variable-length datatype */ 350 H5T_opaque_t opaque; /* an opaque datatype */ 351 H5T_array_t array; /* an array datatype */ 352 } u; 353 } H5T_shared_t; 354 355 struct H5T_t { 356 H5O_shared_t sh_loc; /* Shared message info (must be first) */ 357 358 H5T_shared_t * shared; /* all other information */ 359 H5O_loc_t oloc; /* Object location, if the type is a named type */ 360 H5G_name_t path; /* group hier. path if the type is a named type */ 361 H5VL_object_t *vol_obj; /* pointer to VOL object when working with committed datatypes */ 362 }; 363 364 /* The master list of soft conversion functions */ 365 typedef struct H5T_soft_t { 366 char name[H5T_NAMELEN]; /*name for debugging only */ 367 H5T_class_t src; /*source datatype class */ 368 H5T_class_t dst; /*destination datatype class */ 369 H5T_conv_func_t conv; /*the conversion function */ 370 } H5T_soft_t; 371 372 /* Bit search direction */ 373 typedef enum H5T_sdir_t { 374 H5T_BIT_LSB, /*search lsb toward msb */ 375 H5T_BIT_MSB /*search msb toward lsb */ 376 } H5T_sdir_t; 377 378 /* Typedef for named datatype creation operation */ 379 typedef struct { 380 H5T_t *dt; /* Datatype to commit */ 381 hid_t tcpl_id; /* Named datatype creation property list */ 382 } H5T_obj_create_t; 383 384 /* Typedef for datatype iteration operations */ 385 typedef herr_t (*H5T_operator_t)(H5T_t *dt, void *op_data /*in,out*/); 386 387 /* Array of versions for Datatype */ 388 H5_DLLVAR const unsigned H5O_dtype_ver_bounds[H5F_LIBVER_NBOUNDS]; 389 390 /* 391 * Alignment information for native types. A value of N indicates that the 392 * data must be aligned on an address ADDR such that 0 == ADDR mod N. When 393 * N=1 no alignment is required; N=0 implies that alignment constraints were 394 * not calculated. These alignment info is only for H5Tget_native_type. 395 * These values are used for structure alignment. 396 */ 397 H5_DLLVAR size_t H5T_NATIVE_SCHAR_COMP_ALIGN_g; 398 H5_DLLVAR size_t H5T_NATIVE_SHORT_COMP_ALIGN_g; 399 H5_DLLVAR size_t H5T_NATIVE_INT_COMP_ALIGN_g; 400 H5_DLLVAR size_t H5T_NATIVE_LONG_COMP_ALIGN_g; 401 H5_DLLVAR size_t H5T_NATIVE_LLONG_COMP_ALIGN_g; 402 H5_DLLVAR size_t H5T_NATIVE_FLOAT_COMP_ALIGN_g; 403 H5_DLLVAR size_t H5T_NATIVE_DOUBLE_COMP_ALIGN_g; 404 #if H5_SIZEOF_LONG_DOUBLE != 0 405 H5_DLLVAR size_t H5T_NATIVE_LDOUBLE_COMP_ALIGN_g; 406 #endif 407 408 H5_DLLVAR size_t H5T_POINTER_COMP_ALIGN_g; 409 H5_DLLVAR size_t H5T_HVL_COMP_ALIGN_g; 410 H5_DLLVAR size_t H5T_HOBJREF_COMP_ALIGN_g; 411 H5_DLLVAR size_t H5T_HDSETREGREF_COMP_ALIGN_g; 412 H5_DLLVAR size_t H5T_REF_COMP_ALIGN_g; 413 414 /* 415 * Alignment information for native types. A value of N indicates that the 416 * data must be aligned on an address ADDR such that 0 == ADDR mod N. When 417 * N=1 no alignment is required; N=0 implies that alignment constraints were 418 * not calculated. 419 */ 420 H5_DLLVAR size_t H5T_NATIVE_SCHAR_ALIGN_g; 421 H5_DLLVAR size_t H5T_NATIVE_UCHAR_ALIGN_g; 422 H5_DLLVAR size_t H5T_NATIVE_SHORT_ALIGN_g; 423 H5_DLLVAR size_t H5T_NATIVE_USHORT_ALIGN_g; 424 H5_DLLVAR size_t H5T_NATIVE_INT_ALIGN_g; 425 H5_DLLVAR size_t H5T_NATIVE_UINT_ALIGN_g; 426 H5_DLLVAR size_t H5T_NATIVE_LONG_ALIGN_g; 427 H5_DLLVAR size_t H5T_NATIVE_ULONG_ALIGN_g; 428 H5_DLLVAR size_t H5T_NATIVE_LLONG_ALIGN_g; 429 H5_DLLVAR size_t H5T_NATIVE_ULLONG_ALIGN_g; 430 H5_DLLVAR size_t H5T_NATIVE_FLOAT_ALIGN_g; 431 H5_DLLVAR size_t H5T_NATIVE_DOUBLE_ALIGN_g; 432 #if H5_SIZEOF_LONG_DOUBLE != 0 433 H5_DLLVAR size_t H5T_NATIVE_LDOUBLE_ALIGN_g; 434 #endif 435 436 /* C9x alignment constraints */ 437 H5_DLLVAR size_t H5T_NATIVE_INT8_ALIGN_g; 438 H5_DLLVAR size_t H5T_NATIVE_UINT8_ALIGN_g; 439 H5_DLLVAR size_t H5T_NATIVE_INT_LEAST8_ALIGN_g; 440 H5_DLLVAR size_t H5T_NATIVE_UINT_LEAST8_ALIGN_g; 441 H5_DLLVAR size_t H5T_NATIVE_INT_FAST8_ALIGN_g; 442 H5_DLLVAR size_t H5T_NATIVE_UINT_FAST8_ALIGN_g; 443 444 H5_DLLVAR size_t H5T_NATIVE_INT16_ALIGN_g; 445 H5_DLLVAR size_t H5T_NATIVE_UINT16_ALIGN_g; 446 H5_DLLVAR size_t H5T_NATIVE_INT_LEAST16_ALIGN_g; 447 H5_DLLVAR size_t H5T_NATIVE_UINT_LEAST16_ALIGN_g; 448 H5_DLLVAR size_t H5T_NATIVE_INT_FAST16_ALIGN_g; 449 H5_DLLVAR size_t H5T_NATIVE_UINT_FAST16_ALIGN_g; 450 451 H5_DLLVAR size_t H5T_NATIVE_INT32_ALIGN_g; 452 H5_DLLVAR size_t H5T_NATIVE_UINT32_ALIGN_g; 453 H5_DLLVAR size_t H5T_NATIVE_INT_LEAST32_ALIGN_g; 454 H5_DLLVAR size_t H5T_NATIVE_UINT_LEAST32_ALIGN_g; 455 H5_DLLVAR size_t H5T_NATIVE_INT_FAST32_ALIGN_g; 456 H5_DLLVAR size_t H5T_NATIVE_UINT_FAST32_ALIGN_g; 457 458 H5_DLLVAR size_t H5T_NATIVE_INT64_ALIGN_g; 459 H5_DLLVAR size_t H5T_NATIVE_UINT64_ALIGN_g; 460 H5_DLLVAR size_t H5T_NATIVE_INT_LEAST64_ALIGN_g; 461 H5_DLLVAR size_t H5T_NATIVE_UINT_LEAST64_ALIGN_g; 462 H5_DLLVAR size_t H5T_NATIVE_INT_FAST64_ALIGN_g; 463 H5_DLLVAR size_t H5T_NATIVE_UINT_FAST64_ALIGN_g; 464 465 /* Useful floating-point values for conversion routines */ 466 /* (+/- Inf for all floating-point types) */ 467 H5_DLLVAR float H5T_NATIVE_FLOAT_POS_INF_g; 468 H5_DLLVAR float H5T_NATIVE_FLOAT_NEG_INF_g; 469 H5_DLLVAR double H5T_NATIVE_DOUBLE_POS_INF_g; 470 H5_DLLVAR double H5T_NATIVE_DOUBLE_NEG_INF_g; 471 #if H5_SIZEOF_LONG_DOUBLE != 0 472 H5_DLLVAR double H5T_NATIVE_LDOUBLE_POS_INF_g; 473 H5_DLLVAR double H5T_NATIVE_LDOUBLE_NEG_INF_g; 474 #endif 475 476 /* Declare extern the free lists for H5T_t's and H5T_shared_t's */ 477 H5FL_EXTERN(H5T_t); 478 H5FL_EXTERN(H5T_shared_t); 479 480 /* Common functions */ 481 H5_DLL herr_t H5T__init_native(void); 482 H5_DLL H5T_t *H5T__create(H5T_class_t type, size_t size); 483 H5_DLL H5T_t *H5T__alloc(void); 484 H5_DLL herr_t H5T__free(H5T_t *dt); 485 H5_DLL herr_t H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value); 486 H5_DLL herr_t H5T__upgrade_version(H5T_t *dt, unsigned new_version); 487 488 /* Committed / named datatype routines */ 489 H5_DLL herr_t H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id); 490 H5_DLL herr_t H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id); 491 H5_DLL herr_t H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, hid_t lcpl_id, 492 hid_t tcpl_id); 493 H5_DLL H5T_t *H5T__open_name(const H5G_loc_t *loc, const char *name); 494 H5_DLL hid_t H5T__get_create_plist(const H5T_t *type); 495 496 /* Conversion functions */ 497 H5_DLL herr_t H5T__conv_noop(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 498 size_t bkg_stride, void *buf, void *bkg); 499 500 H5_DLL herr_t H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 501 size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); 502 H5_DLL herr_t H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 503 size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); 504 H5_DLL herr_t H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 505 size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); 506 H5_DLL herr_t H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 507 size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); 508 H5_DLL herr_t H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 509 size_t bkg_stride, void *buf, void *bkg); 510 H5_DLL herr_t H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 511 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 512 H5_DLL herr_t H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 513 size_t bkg_stride, void *buf, void *bkg); 514 H5_DLL herr_t H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 515 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 516 H5_DLL herr_t H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 517 size_t bkg_stride, void *buf, void *bkg); 518 H5_DLL herr_t H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 519 size_t bkg_stride, void *_buf, void *bkg); 520 H5_DLL herr_t H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 521 size_t bkg_stride, void *_buf, void *bkg); 522 H5_DLL herr_t H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 523 size_t bkg_stride, void *_buf, void *bkg); 524 H5_DLL herr_t H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 525 size_t bkg_stride, void *_buf, void *bkg); 526 H5_DLL herr_t H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 527 size_t bkg_stride, void *_buf, void *bkg); 528 H5_DLL herr_t H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, 529 size_t bkg_stride, void *_buf, void *bkg); 530 531 H5_DLL herr_t H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 532 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 533 H5_DLL herr_t H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 534 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 535 H5_DLL herr_t H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 536 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 537 H5_DLL herr_t H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 538 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 539 H5_DLL herr_t H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 540 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 541 H5_DLL herr_t H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 542 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 543 H5_DLL herr_t H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 544 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 545 H5_DLL herr_t H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 546 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 547 H5_DLL herr_t H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 548 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 549 H5_DLL herr_t H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 550 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 551 H5_DLL herr_t H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 552 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 553 H5_DLL herr_t H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 554 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 555 H5_DLL herr_t H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 556 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 557 H5_DLL herr_t H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 558 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 559 H5_DLL herr_t H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 560 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 561 H5_DLL herr_t H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 562 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 563 H5_DLL herr_t H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 564 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 565 H5_DLL herr_t H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 566 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 567 568 H5_DLL herr_t H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 569 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 570 H5_DLL herr_t H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 571 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 572 H5_DLL herr_t H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 573 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 574 H5_DLL herr_t H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 575 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 576 H5_DLL herr_t H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 577 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 578 H5_DLL herr_t H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 579 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 580 H5_DLL herr_t H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 581 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 582 H5_DLL herr_t H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 583 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 584 H5_DLL herr_t H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 585 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 586 H5_DLL herr_t H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 587 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 588 H5_DLL herr_t H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 589 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 590 H5_DLL herr_t H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 591 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 592 H5_DLL herr_t H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 593 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 594 H5_DLL herr_t H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 595 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 596 H5_DLL herr_t H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 597 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 598 H5_DLL herr_t H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 599 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 600 H5_DLL herr_t H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 601 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 602 H5_DLL herr_t H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 603 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 604 605 H5_DLL herr_t H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 606 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 607 H5_DLL herr_t H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 608 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 609 H5_DLL herr_t H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 610 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 611 H5_DLL herr_t H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 612 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 613 H5_DLL herr_t H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 614 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 615 H5_DLL herr_t H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 616 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 617 H5_DLL herr_t H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 618 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 619 H5_DLL herr_t H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 620 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 621 H5_DLL herr_t H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 622 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 623 H5_DLL herr_t H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 624 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 625 H5_DLL herr_t H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 626 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 627 H5_DLL herr_t H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 628 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 629 H5_DLL herr_t H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 630 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 631 H5_DLL herr_t H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 632 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 633 H5_DLL herr_t H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 634 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 635 H5_DLL herr_t H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 636 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 637 H5_DLL herr_t H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 638 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 639 H5_DLL herr_t H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 640 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 641 642 H5_DLL herr_t H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 643 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 644 H5_DLL herr_t H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 645 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 646 H5_DLL herr_t H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 647 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 648 H5_DLL herr_t H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 649 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 650 H5_DLL herr_t H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 651 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 652 H5_DLL herr_t H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 653 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 654 H5_DLL herr_t H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 655 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 656 H5_DLL herr_t H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 657 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 658 H5_DLL herr_t H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 659 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 660 H5_DLL herr_t H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 661 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 662 H5_DLL herr_t H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 663 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 664 H5_DLL herr_t H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 665 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 666 H5_DLL herr_t H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 667 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 668 H5_DLL herr_t H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 669 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 670 H5_DLL herr_t H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 671 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 672 H5_DLL herr_t H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 673 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 674 H5_DLL herr_t H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 675 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 676 H5_DLL herr_t H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 677 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 678 679 H5_DLL herr_t H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 680 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 681 H5_DLL herr_t H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 682 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 683 H5_DLL herr_t H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 684 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 685 H5_DLL herr_t H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 686 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 687 H5_DLL herr_t H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 688 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 689 H5_DLL herr_t H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 690 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 691 H5_DLL herr_t H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 692 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 693 H5_DLL herr_t H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 694 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 695 H5_DLL herr_t H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 696 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 697 H5_DLL herr_t H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 698 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 699 H5_DLL herr_t H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 700 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 701 H5_DLL herr_t H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 702 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 703 H5_DLL herr_t H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 704 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 705 H5_DLL herr_t H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 706 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 707 H5_DLL herr_t H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 708 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 709 H5_DLL herr_t H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 710 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 711 H5_DLL herr_t H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 712 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 713 H5_DLL herr_t H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 714 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 715 H5_DLL herr_t H5T__conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 716 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 717 H5_DLL herr_t H5T__conv_float_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 718 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 719 H5_DLL herr_t H5T__conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 720 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 721 H5_DLL herr_t H5T__conv_double_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 722 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 723 H5_DLL herr_t H5T__conv_ldouble_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 724 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 725 H5_DLL herr_t H5T__conv_ldouble_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 726 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 727 H5_DLL herr_t H5T__conv_schar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 728 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 729 H5_DLL herr_t H5T__conv_schar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 730 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 731 H5_DLL herr_t H5T__conv_schar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 732 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 733 H5_DLL herr_t H5T__conv_uchar_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 734 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 735 H5_DLL herr_t H5T__conv_uchar_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 736 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 737 H5_DLL herr_t H5T__conv_uchar_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 738 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 739 H5_DLL herr_t H5T__conv_short_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 740 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 741 H5_DLL herr_t H5T__conv_short_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 742 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 743 H5_DLL herr_t H5T__conv_short_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 744 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 745 H5_DLL herr_t H5T__conv_ushort_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 746 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 747 H5_DLL herr_t H5T__conv_ushort_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 748 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 749 H5_DLL herr_t H5T__conv_ushort_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 750 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 751 H5_DLL herr_t H5T__conv_int_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 752 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 753 H5_DLL herr_t H5T__conv_int_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 754 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 755 H5_DLL herr_t H5T__conv_int_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 756 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 757 H5_DLL herr_t H5T__conv_uint_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 758 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 759 H5_DLL herr_t H5T__conv_uint_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 760 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 761 H5_DLL herr_t H5T__conv_uint_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 762 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 763 H5_DLL herr_t H5T__conv_long_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 764 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 765 H5_DLL herr_t H5T__conv_long_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 766 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 767 H5_DLL herr_t H5T__conv_long_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 768 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 769 H5_DLL herr_t H5T__conv_ulong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 770 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 771 H5_DLL herr_t H5T__conv_ulong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 772 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 773 H5_DLL herr_t H5T__conv_ulong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 774 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 775 H5_DLL herr_t H5T__conv_llong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 776 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 777 H5_DLL herr_t H5T__conv_llong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 778 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 779 H5_DLL herr_t H5T__conv_llong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 780 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 781 H5_DLL herr_t H5T__conv_ullong_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 782 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 783 H5_DLL herr_t H5T__conv_ullong_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 784 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 785 H5_DLL herr_t H5T__conv_ullong_ldouble(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 786 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 787 H5_DLL herr_t H5T__conv_float_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 788 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 789 H5_DLL herr_t H5T__conv_float_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 790 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 791 H5_DLL herr_t H5T__conv_float_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 792 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 793 H5_DLL herr_t H5T__conv_float_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 794 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 795 H5_DLL herr_t H5T__conv_float_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 796 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 797 H5_DLL herr_t H5T__conv_float_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 798 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 799 H5_DLL herr_t H5T__conv_float_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 800 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 801 H5_DLL herr_t H5T__conv_float_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 802 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 803 H5_DLL herr_t H5T__conv_float_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 804 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 805 H5_DLL herr_t H5T__conv_float_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 806 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 807 H5_DLL herr_t H5T__conv_double_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 808 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 809 H5_DLL herr_t H5T__conv_double_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 810 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 811 H5_DLL herr_t H5T__conv_double_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 812 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 813 H5_DLL herr_t H5T__conv_double_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 814 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 815 H5_DLL herr_t H5T__conv_double_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 816 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 817 H5_DLL herr_t H5T__conv_double_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 818 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 819 H5_DLL herr_t H5T__conv_double_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 820 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 821 H5_DLL herr_t H5T__conv_double_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 822 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 823 H5_DLL herr_t H5T__conv_double_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 824 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 825 H5_DLL herr_t H5T__conv_double_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 826 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 827 H5_DLL herr_t H5T__conv_ldouble_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 828 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 829 H5_DLL herr_t H5T__conv_ldouble_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 830 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 831 H5_DLL herr_t H5T__conv_ldouble_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 832 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 833 H5_DLL herr_t H5T__conv_ldouble_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 834 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 835 H5_DLL herr_t H5T__conv_ldouble_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 836 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 837 H5_DLL herr_t H5T__conv_ldouble_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 838 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 839 H5_DLL herr_t H5T__conv_ldouble_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 840 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 841 H5_DLL herr_t H5T__conv_ldouble_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 842 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 843 H5_DLL herr_t H5T__conv_ldouble_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 844 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 845 H5_DLL herr_t H5T__conv_ldouble_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, 846 size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); 847 848 /* Bit twiddling functions */ 849 H5_DLL void H5T__bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, size_t src_offset, 850 size_t size); 851 H5_DLL herr_t H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size); 852 H5_DLL void H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value); 853 H5_DLL uint64_t H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size); 854 H5_DLL void H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val); 855 H5_DLL ssize_t H5T__bit_find(const uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction, 856 hbool_t value); 857 H5_DLL hbool_t H5T__bit_inc(uint8_t *buf, size_t start, size_t size); 858 H5_DLL hbool_t H5T__bit_dec(uint8_t *buf, size_t start, size_t size); 859 H5_DLL void H5T__bit_neg(uint8_t *buf, size_t start, size_t size); 860 861 /* VL functions */ 862 H5_DLL H5T_t *H5T__vlen_create(H5T_t *base); 863 H5_DLL herr_t H5T__vlen_reclaim(void *elem, const H5T_t *dt, H5T_vlen_alloc_info_t *alloc_info); 864 H5_DLL htri_t H5T__vlen_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); 865 866 /* Array functions */ 867 H5_DLL H5T_t *H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]); 868 H5_DLL int H5T__get_array_ndims(const H5T_t *dt); 869 H5_DLL int H5T__get_array_dims(const H5T_t *dt, hsize_t dims[]); 870 871 /* Reference functions */ 872 H5_DLL herr_t H5T__ref_reclaim(void *elem, const H5T_t *dt); 873 H5_DLL htri_t H5T__ref_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); 874 875 /* Compound functions */ 876 H5_DLL herr_t H5T__insert(H5T_t *parent, const char *name, size_t offset, H5T_t *member); 877 H5_DLL size_t H5T__get_member_size(const H5T_t *dt, unsigned membno); 878 H5_DLL void H5T__update_packed(const H5T_t *dt); 879 H5_DLL H5T_subset_info_t *H5T__conv_struct_subset(const H5T_cdata_t *cdata); 880 881 /* Enumerated type functions */ 882 H5_DLL H5T_t *H5T__enum_create(H5T_t *parent); 883 H5_DLL herr_t H5T__enum_insert(const H5T_t *dt, const char *name, const void *value); 884 H5_DLL herr_t H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value); 885 886 /* Field functions (for both compound & enumerated types) */ 887 H5_DLL char * H5T__get_member_name(H5T_t const *dt, unsigned membno); 888 H5_DLL herr_t H5T__sort_value(const H5T_t *dt, int *map); 889 H5_DLL herr_t H5T__sort_name(const H5T_t *dt, int *map); 890 891 /* Debugging functions */ 892 H5_DLL herr_t H5T__print_stats(H5T_path_t *path, int *nprint /*in,out*/); 893 894 #endif /* H5Tpkg_H */ 895