HDF5  1.12.0
Macros | Functions | Variables
H5Rint.c File Reference
#include "H5Rmodule.h"
#include "H5private.h"
#include "H5ACprivate.h"
#include "H5CXprivate.h"
#include "H5Dprivate.h"
#include "H5Eprivate.h"
#include "H5Gprivate.h"
#include "H5HGprivate.h"
#include "H5Iprivate.h"
#include "H5MMprivate.h"
#include "H5Oprivate.h"
#include "H5Rpkg.h"
#include "H5Sprivate.h"
#include "H5Tprivate.h"
#include "H5VLnative_private.h"

Macros

#define H5R_MAX_STRING_LEN   (1 << 16) /* Max encoded string length */
 
#define H5R_ENCODE(func, val, buf, buf_size, actual, m)
 
#define H5R_ENCODE_VAR(func, var, size, buf, buf_size, actual, m)
 
#define H5R_DECODE(func, val, buf, buf_size, actual, m)
 
#define H5R_DECODE_VAR(func, var, size, buf, buf_size, actual, m)
 
#define H5R_LOG_DEBUG(...)   do { } while (0)
 

Functions

herr_t H5R__init_package (void)
 
int H5R_top_term_package (void)
 
int H5R_term_package (void)
 
herr_t H5R__create_object (const H5O_token_t *obj_token, size_t token_size, H5R_ref_priv_t *ref)
 
herr_t H5R__create_region (const H5O_token_t *obj_token, size_t token_size, H5S_t *space, H5R_ref_priv_t *ref)
 
herr_t H5R__create_attr (const H5O_token_t *obj_token, size_t token_size, const char *attr_name, H5R_ref_priv_t *ref)
 
herr_t H5R__destroy (H5R_ref_priv_t *ref)
 
herr_t H5R__set_loc_id (H5R_ref_priv_t *ref, hid_t id, hbool_t inc_ref, hbool_t app_ref)
 
hid_t H5R__get_loc_id (const H5R_ref_priv_t *ref)
 
hid_t H5R__reopen_file (H5R_ref_priv_t *ref, hid_t fapl_id)
 
H5R_type_t H5R__get_type (const H5R_ref_priv_t *ref)
 
htri_t H5R__equal (const H5R_ref_priv_t *ref1, const H5R_ref_priv_t *ref2)
 
herr_t H5R__copy (const H5R_ref_priv_t *src_ref, H5R_ref_priv_t *dst_ref)
 
herr_t H5R__get_obj_token (const H5R_ref_priv_t *ref, H5O_token_t *obj_token, size_t *token_size)
 
herr_t H5R__set_obj_token (H5R_ref_priv_t *ref, const H5O_token_t *obj_token, size_t token_size)
 
herr_t H5R__get_region (const H5R_ref_priv_t *ref, H5S_t *space)
 
ssize_t H5R__get_file_name (const H5R_ref_priv_t *ref, char *buf, size_t size)
 
ssize_t H5R__get_attr_name (const H5R_ref_priv_t *ref, char *buf, size_t size)
 
herr_t H5R__encode (const char *filename, const H5R_ref_priv_t *ref, unsigned char *buf, size_t *nalloc, unsigned flags)
 
herr_t H5R__decode (const unsigned char *buf, size_t *nbytes, H5R_ref_priv_t *ref)
 
herr_t H5R__encode_heap (H5F_t *f, unsigned char *buf, size_t *nalloc, const unsigned char *data, size_t data_size)
 
herr_t H5R__decode_heap (H5F_t *f, const unsigned char *buf, size_t *nbytes, unsigned char **data_ptr, size_t *data_size)
 
herr_t H5R__free_heap (H5F_t *f, const unsigned char *buf, size_t nbytes)
 
herr_t H5R__decode_token_compat (H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type, const unsigned char *buf, H5O_token_t *obj_token)
 
herr_t H5R__encode_token_obj_compat (const H5O_token_t *obj_token, size_t token_size, unsigned char *buf, size_t *nalloc)
 
herr_t H5R__decode_token_obj_compat (const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token, size_t token_size)
 
herr_t H5R__encode_token_region_compat (H5F_t *f, const H5O_token_t *obj_token, size_t token_size, H5S_t *space, unsigned char *buf, size_t *nalloc)
 
herr_t H5R__decode_token_region_compat (H5F_t *f, const unsigned char *buf, size_t *nbytes, H5O_token_t *obj_token, size_t token_size, H5S_t **space_ptr)
 

Variables

hbool_t H5_PKG_INIT_VAR = FALSE
 

Macro Definition Documentation

◆ H5R_DECODE

#define H5R_DECODE (   func,
  val,
  buf,
  buf_size,
  actual,
 
)
Value:
do {\
size_t __nbytes = buf_size; \
if(func(buf, &__nbytes, val) < 0) \
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m) \
buf += __nbytes; \
buf_size -= __nbytes; \
actual += __nbytes; \
} while(0)

◆ H5R_DECODE_VAR

#define H5R_DECODE_VAR (   func,
  var,
  size,
  buf,
  buf_size,
  actual,
 
)
Value:
do { \
size_t __nbytes = buf_size; \
if(func(buf, &__nbytes, var, size) < 0) \
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, FAIL, m) \
p += __nbytes; \
buf_size -= __nbytes; \
actual += __nbytes; \
} while(0)

◆ H5R_ENCODE

#define H5R_ENCODE (   func,
  val,
  buf,
  buf_size,
  actual,
 
)
Value:
do {\
size_t __nalloc = buf_size; \
if(func(val, buf, &__nalloc) < 0) \
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m) \
if(buf && buf_size >= __nalloc) { \
buf += __nalloc; \
buf_size -= __nalloc; \
} \
actual += __nalloc; \
} while(0)

◆ H5R_ENCODE_VAR

#define H5R_ENCODE_VAR (   func,
  var,
  size,
  buf,
  buf_size,
  actual,
 
)
Value:
do { \
size_t __nalloc = buf_size; \
if(func(var, size, buf, &__nalloc) < 0) \
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTENCODE, FAIL, m) \
if(buf && buf_size >= __nalloc) { \
p += __nalloc; \
buf_size -= __nalloc; \
} \
actual += __nalloc; \
} while(0)

◆ H5R_LOG_DEBUG

#define H5R_LOG_DEBUG (   ...)    do { } while (0)

◆ H5R_MAX_STRING_LEN

#define H5R_MAX_STRING_LEN   (1 << 16) /* Max encoded string length */

Function Documentation

◆ H5R__copy()

herr_t H5R__copy ( const H5R_ref_priv_t src_ref,
H5R_ref_priv_t dst_ref 
)

◆ H5R__create_attr()

herr_t H5R__create_attr ( const H5O_token_t obj_token,
size_t  token_size,
const char *  attr_name,
H5R_ref_priv_t ref 
)

◆ H5R__create_object()

herr_t H5R__create_object ( const H5O_token_t obj_token,
size_t  token_size,
H5R_ref_priv_t ref 
)

◆ H5R__create_region()

herr_t H5R__create_region ( const H5O_token_t obj_token,
size_t  token_size,
H5S_t space,
H5R_ref_priv_t ref 
)

◆ H5R__decode()

herr_t H5R__decode ( const unsigned char *  buf,
size_t nbytes,
H5R_ref_priv_t ref 
)

◆ H5R__decode_heap()

herr_t H5R__decode_heap ( H5F_t f,
const unsigned char *  buf,
size_t nbytes,
unsigned char **  data_ptr,
size_t data_size 
)

◆ H5R__decode_token_compat()

herr_t H5R__decode_token_compat ( H5VL_object_t vol_obj,
H5I_type_t  type,
H5R_type_t  ref_type,
const unsigned char *  buf,
H5O_token_t obj_token 
)

◆ H5R__decode_token_obj_compat()

herr_t H5R__decode_token_obj_compat ( const unsigned char *  buf,
size_t nbytes,
H5O_token_t obj_token,
size_t  token_size 
)

◆ H5R__decode_token_region_compat()

herr_t H5R__decode_token_region_compat ( H5F_t f,
const unsigned char *  buf,
size_t nbytes,
H5O_token_t obj_token,
size_t  token_size,
H5S_t **  space_ptr 
)

◆ H5R__destroy()

herr_t H5R__destroy ( H5R_ref_priv_t ref)

◆ H5R__encode()

herr_t H5R__encode ( const char *  filename,
const H5R_ref_priv_t ref,
unsigned char *  buf,
size_t nalloc,
unsigned  flags 
)

Encoding format: | Reference type (8 bits) | Flags (8 bits) | Token (token size) | | | |-—> H5R_IS_EXTERNAL: File info | |-—> H5R_DATASET_REGION2: Serialized selection | |-—> H5R_ATTR: Attribute name len + name

TODO Encode VOL info When we have a better way of storing blobs, we should add support for referencing files in external VOLs. There are currently multiple limitations:

  • avoid duplicating VOL info on each reference
  • must query terminal VOL connector to avoid passthrough confusion

◆ H5R__encode_heap()

herr_t H5R__encode_heap ( H5F_t f,
unsigned char *  buf,
size_t nalloc,
const unsigned char *  data,
size_t  data_size 
)

◆ H5R__encode_token_obj_compat()

herr_t H5R__encode_token_obj_compat ( const H5O_token_t obj_token,
size_t  token_size,
unsigned char *  buf,
size_t nalloc 
)

◆ H5R__encode_token_region_compat()

herr_t H5R__encode_token_region_compat ( H5F_t f,
const H5O_token_t obj_token,
size_t  token_size,
H5S_t space,
unsigned char *  buf,
size_t nalloc 
)

◆ H5R__equal()

htri_t H5R__equal ( const H5R_ref_priv_t ref1,
const H5R_ref_priv_t ref2 
)

◆ H5R__free_heap()

herr_t H5R__free_heap ( H5F_t f,
const unsigned char *  buf,
size_t  nbytes 
)

◆ H5R__get_attr_name()

ssize_t H5R__get_attr_name ( const H5R_ref_priv_t ref,
char *  buf,
size_t  size 
)

◆ H5R__get_file_name()

ssize_t H5R__get_file_name ( const H5R_ref_priv_t ref,
char *  buf,
size_t  size 
)

◆ H5R__get_loc_id()

hid_t H5R__get_loc_id ( const H5R_ref_priv_t ref)

◆ H5R__get_obj_token()

herr_t H5R__get_obj_token ( const H5R_ref_priv_t ref,
H5O_token_t obj_token,
size_t token_size 
)

◆ H5R__get_region()

herr_t H5R__get_region ( const H5R_ref_priv_t ref,
H5S_t space 
)

◆ H5R__get_type()

H5R_type_t H5R__get_type ( const H5R_ref_priv_t ref)

◆ H5R__init_package()

herr_t H5R__init_package ( void  )

◆ H5R__reopen_file()

hid_t H5R__reopen_file ( H5R_ref_priv_t ref,
hid_t  fapl_id 
)

◆ H5R__set_loc_id()

herr_t H5R__set_loc_id ( H5R_ref_priv_t ref,
hid_t  id,
hbool_t  inc_ref,
hbool_t  app_ref 
)

◆ H5R__set_obj_token()

herr_t H5R__set_obj_token ( H5R_ref_priv_t ref,
const H5O_token_t obj_token,
size_t  token_size 
)

◆ H5R_term_package()

int H5R_term_package ( void  )

◆ H5R_top_term_package()

int H5R_top_term_package ( void  )

Variable Documentation

◆ H5_PKG_INIT_VAR

hbool_t H5_PKG_INIT_VAR = FALSE
size
iblock size
Definition: H5EAcache.c:787
H5E_CANTDECODE
Invalid arguments to routine Resource unavailable Internal File accessibility Low level I O Function entry exit Object atom Object cache Links B Tree node Symbol table Heap Object header Datatype Dataspace Dataset Data storage Property lists Attribute Data filters External file list References Virtual File Layer Virtual Object Layer Ternary Search Trees Reference Counted Strings Error API Skip Lists Free Space Manager Shared Object Header Messages Extensible Array Fixed Array Plugin for dynamically loaded library Page Buffering API Context Map No error Argument errors Resource errors File accessibility errors Generic low level file I O errors Function entry exit interface errors Object atom related errors Cache related errors Link related errors B tree related errors Object header related errors Group related errors Datatype conversion errors Dataspace errors Property list errors Parallel MPI errors Heap errors Free space errors I O pipeline errors System level errors Plugin errors No error Information is uinitialized Feature is unsupported Inappropriate type Out of range Bad value No space available for allocation Can t allocate space Unable to copy object Unable to free object Object already exists Unable to lock object Unable to unlock object Unable to garbage collect Unable to compute size Object is already open File already exists File already open Unable to create file Unable to open file Unable to close file Not an HDF5 file Bad file ID accessed File has been truncated File mount error Unable to delete file Seek failed Read failed Write failed Close failed Address overflowed File Unable to initialize object Object already initialized Unable to release object Unable to find atom Unable to find ID group information Unable to register new atom Unable to increment reference count Unable to decrement reference count Out of IDs for group Unable to flush data from cache Unable to mark metadata as unserialized Unable to serialize data from cache Unable to tag metadata in the cache Unable to load metadata into cache Protected metadata error Metadata not currently cached Internal error detected Unable to insert metadata into cache Unable to protect metadata Unable to unprotect metadata Unable to pin cache entry Unable to un pin cache entry Unable to mark a pinned entry as dirty Unable to mark a pinned entry as clean Unable to mark an entry as unserialized Unable to mark an entry as serialized Unable to mark metadata as dirty Unable to mark metadata as clean Unable to expunge a metadata cache entry Unable to resize a metadata cache entry Unable to create a flush dependency Unable to destroy a flush dependency Unable to notify object about action Failure in the cache logging framework Unable to cork an object Unable to uncork an object Object not found Object already exists Unable to encode value H5E_CANTDECODE
Definition: H5err.txt:194
H5E_REFERENCE
Invalid arguments to routine Resource unavailable Internal File accessibility Low level I O Function entry exit Object atom Object cache Links B Tree node Symbol table Heap Object header Datatype Dataspace Dataset Data storage Property lists Attribute Data filters External file list H5E_REFERENCE
Definition: H5err.txt:67
H5E_CANTENCODE
Invalid arguments to routine Resource unavailable Internal File accessibility Low level I O Function entry exit Object atom Object cache Links B Tree node Symbol table Heap Object header Datatype Dataspace Dataset Data storage Property lists Attribute Data filters External file list References Virtual File Layer Virtual Object Layer Ternary Search Trees Reference Counted Strings Error API Skip Lists Free Space Manager Shared Object Header Messages Extensible Array Fixed Array Plugin for dynamically loaded library Page Buffering API Context Map No error Argument errors Resource errors File accessibility errors Generic low level file I O errors Function entry exit interface errors Object atom related errors Cache related errors Link related errors B tree related errors Object header related errors Group related errors Datatype conversion errors Dataspace errors Property list errors Parallel MPI errors Heap errors Free space errors I O pipeline errors System level errors Plugin errors No error Information is uinitialized Feature is unsupported Inappropriate type Out of range Bad value No space available for allocation Can t allocate space Unable to copy object Unable to free object Object already exists Unable to lock object Unable to unlock object Unable to garbage collect Unable to compute size Object is already open File already exists File already open Unable to create file Unable to open file Unable to close file Not an HDF5 file Bad file ID accessed File has been truncated File mount error Unable to delete file Seek failed Read failed Write failed Close failed Address overflowed File Unable to initialize object Object already initialized Unable to release object Unable to find atom Unable to find ID group information Unable to register new atom Unable to increment reference count Unable to decrement reference count Out of IDs for group Unable to flush data from cache Unable to mark metadata as unserialized Unable to serialize data from cache Unable to tag metadata in the cache Unable to load metadata into cache Protected metadata error Metadata not currently cached Internal error detected Unable to insert metadata into cache Unable to protect metadata Unable to unprotect metadata Unable to pin cache entry Unable to un pin cache entry Unable to mark a pinned entry as dirty Unable to mark a pinned entry as clean Unable to mark an entry as unserialized Unable to mark an entry as serialized Unable to mark metadata as dirty Unable to mark metadata as clean Unable to expunge a metadata cache entry Unable to resize a metadata cache entry Unable to create a flush dependency Unable to destroy a flush dependency Unable to notify object about action Failure in the cache logging framework Unable to cork an object Unable to uncork an object Object not found Object already exists H5E_CANTENCODE
Definition: H5err.txt:193
FAIL
#define FAIL
Definition: H5private.h:352