HDF5  1.12.0
Data Structures | Macros | Typedefs | Functions | Variables
H5Shyper.c File Reference
#include "H5Smodule.h"
#include "H5private.h"
#include "H5CXprivate.h"
#include "H5Eprivate.h"
#include "H5FLprivate.h"
#include "H5Iprivate.h"
#include "H5MMprivate.h"
#include "H5Spkg.h"
#include "H5VMprivate.h"

Data Structures

struct  H5S_hyper_project_intersect_ud_t
 

Macros

#define H5S_HYPER_COMPUTE_B_NOT_A   0x01
 
#define H5S_HYPER_COMPUTE_A_AND_B   0x02
 
#define H5S_HYPER_COMPUTE_A_NOT_B   0x04
 
#define H5S_HYPER_ADVANCE_SPAN(recover, curr_span, next_span)
 
#define H5S_HYPER_PROJ_INT_ADD_SKIP(UDATA, ADD, ERR)
 
#define DUFF_GUTS
 

Typedefs

typedef hsize_t hbounds_t
 

Functions

 H5FL_DEFINE_STATIC (H5S_hyper_sel_t)
 
 H5FL_DEFINE_STATIC (H5S_hyper_span_t)
 
 H5FL_BARR_DEFINE_STATIC (H5S_hyper_span_info_t, hbounds_t, H5S_MAX_RANK *2)
 
 H5FL_EXTERN (H5S_sel_iter_t)
 
uint64_t H5S__hyper_get_op_gen (void)
 
hssize_t H5Sget_select_hyper_nblocks (hid_t spaceid)
 
herr_t H5Sget_select_hyper_blocklist (hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[])
 
herr_t H5S_hyper_add_span_element (H5S_t *space, unsigned rank, const hsize_t *coords)
 
htri_t H5S_hyper_normalize_offset (H5S_t *space, hssize_t *old_offset)
 
herr_t H5S_hyper_denormalize_offset (H5S_t *space, const hssize_t *old_offset)
 
void H5S__hyper_rebuild (H5S_t *space)
 
herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t start[], const hsize_t *stride, const hsize_t count[], const hsize_t *block)
 
herr_t H5Sselect_hyperslab (hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t stride[], const hsize_t count[], const hsize_t block[])
 
herr_t H5S_combine_hyperslab (H5S_t *old_space, H5S_seloper_t op, const hsize_t start[], const hsize_t *stride, const hsize_t count[], const hsize_t *block, H5S_t **new_space)
 
hid_t H5Scombine_hyperslab (hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t stride[], const hsize_t count[], const hsize_t block[])
 
hid_t H5Scombine_select (hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
 
herr_t H5S__modify_select (H5S_t *space1, H5S_seloper_t op, H5S_t *space2)
 
herr_t H5Smodify_select (hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
 
herr_t H5S__hyper_project_intersection (const H5S_t *src_space, const H5S_t *dst_space, const H5S_t *src_intersect_space, H5S_t *proj_space, hbool_t share_selection)
 
herr_t H5S_hyper_clip_unlim (H5S_t *space, hsize_t clip_size)
 
hsize_t H5S_hyper_get_clip_extent (const H5S_t *clip_space, const H5S_t *match_space, hbool_t incl_trail)
 
hsize_t H5S_hyper_get_clip_extent_match (const H5S_t *clip_space, const H5S_t *match_space, hsize_t match_clip_size, hbool_t incl_trail)
 
H5S_tH5S_hyper_get_unlim_block (const H5S_t *space, hsize_t block_index)
 
hsize_t H5S_hyper_get_first_inc_block (const H5S_t *space, hsize_t clip_size, hbool_t *partial)
 
htri_t H5Sis_regular_hyperslab (hid_t spaceid)
 
herr_t H5Sget_regular_hyperslab (hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[])
 

Variables

const H5S_select_class_t H5S_sel_hyper [1]
 
const unsigned H5O_sds_hyper_ver_bounds []
 

Macro Definition Documentation

◆ DUFF_GUTS

#define DUFF_GUTS
Value:
/* Store the sequence information */ \
off[curr_seq] = loc; \
len[curr_seq] = actual_bytes; \
\
/* Increment sequence count */ \
curr_seq++; \
\
/* Increment information to reflect block just processed */ \
loc += fast_dim_buf_off;

◆ H5S_HYPER_ADVANCE_SPAN

#define H5S_HYPER_ADVANCE_SPAN (   recover,
  curr_span,
  next_span 
)
Value:
do { \
H5S_hyper_span_t *saved_next_span = (next_span); \
\
/* Check if the span should be recovered */ \
if(recover) { \
H5S__hyper_free_span(curr_span); \
(recover) = FALSE; \
} /* end if */ \
\
/* Set the current span to saved next span */ \
(curr_span) = saved_next_span; \
} while(0)

◆ H5S_HYPER_COMPUTE_A_AND_B

#define H5S_HYPER_COMPUTE_A_AND_B   0x02

◆ H5S_HYPER_COMPUTE_A_NOT_B

#define H5S_HYPER_COMPUTE_A_NOT_B   0x04

◆ H5S_HYPER_COMPUTE_B_NOT_A

#define H5S_HYPER_COMPUTE_B_NOT_A   0x01

◆ H5S_HYPER_PROJ_INT_ADD_SKIP

#define H5S_HYPER_PROJ_INT_ADD_SKIP (   UDATA,
  ADD,
  ERR 
)
Value:
do { \
/* If there are any elements to add, we must add them \
* to the projection first before adding skip */ \
if((UDATA)->nelem > 0) \
if(H5S__hyper_proj_int_build_proj(UDATA) < 0) \
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTAPPEND, ERR, "can't add elements to projected selection") \
(UDATA)->skip += (ADD); \
} while(0) /* end H5S_HYPER_PROJ_INT_ADD_SKIP() */

Typedef Documentation

◆ hbounds_t

typedef hsize_t hbounds_t

Function Documentation

◆ H5FL_BARR_DEFINE_STATIC()

H5FL_BARR_DEFINE_STATIC ( H5S_hyper_span_info_t  ,
hbounds_t  ,
H5S_MAX_RANK 2 
)

◆ H5FL_DEFINE_STATIC() [1/2]

H5FL_DEFINE_STATIC ( H5S_hyper_sel_t  )

◆ H5FL_DEFINE_STATIC() [2/2]

H5FL_DEFINE_STATIC ( H5S_hyper_span_t  )

◆ H5FL_EXTERN()

H5FL_EXTERN ( H5S_sel_iter_t  )

◆ H5S__hyper_get_op_gen()

uint64_t H5S__hyper_get_op_gen ( void  )

◆ H5S__hyper_project_intersection()

herr_t H5S__hyper_project_intersection ( const H5S_t src_space,
const H5S_t dst_space,
const H5S_t src_intersect_space,
H5S_t proj_space,
hbool_t  share_selection 
)

◆ H5S__hyper_rebuild()

void H5S__hyper_rebuild ( H5S_t space)

◆ H5S__modify_select()

herr_t H5S__modify_select ( H5S_t space1,
H5S_seloper_t  op,
H5S_t space2 
)

◆ H5S_combine_hyperslab()

herr_t H5S_combine_hyperslab ( H5S_t old_space,
H5S_seloper_t  op,
const hsize_t  start[],
const hsize_t stride,
const hsize_t  count[],
const hsize_t block,
H5S_t **  new_space 
)

◆ H5S_hyper_add_span_element()

herr_t H5S_hyper_add_span_element ( H5S_t space,
unsigned  rank,
const hsize_t coords 
)

◆ H5S_hyper_clip_unlim()

herr_t H5S_hyper_clip_unlim ( H5S_t space,
hsize_t  clip_size 
)

◆ H5S_hyper_denormalize_offset()

herr_t H5S_hyper_denormalize_offset ( H5S_t space,
const hssize_t old_offset 
)

◆ H5S_hyper_get_clip_extent()

hsize_t H5S_hyper_get_clip_extent ( const H5S_t clip_space,
const H5S_t match_space,
hbool_t  incl_trail 
)

◆ H5S_hyper_get_clip_extent_match()

hsize_t H5S_hyper_get_clip_extent_match ( const H5S_t clip_space,
const H5S_t match_space,
hsize_t  match_clip_size,
hbool_t  incl_trail 
)

◆ H5S_hyper_get_first_inc_block()

hsize_t H5S_hyper_get_first_inc_block ( const H5S_t space,
hsize_t  clip_size,
hbool_t partial 
)

◆ H5S_hyper_get_unlim_block()

H5S_t* H5S_hyper_get_unlim_block ( const H5S_t space,
hsize_t  block_index 
)

◆ H5S_hyper_normalize_offset()

htri_t H5S_hyper_normalize_offset ( H5S_t space,
hssize_t old_offset 
)

◆ H5S_select_hyperslab()

herr_t H5S_select_hyperslab ( H5S_t space,
H5S_seloper_t  op,
const hsize_t  start[],
const hsize_t stride,
const hsize_t  count[],
const hsize_t block 
)

◆ H5Scombine_hyperslab()

hid_t H5Scombine_hyperslab ( hid_t  space_id,
H5S_seloper_t  op,
const hsize_t  start[],
const hsize_t  stride[],
const hsize_t  count[],
const hsize_t  block[] 
)

◆ H5Scombine_select()

hid_t H5Scombine_select ( hid_t  space1_id,
H5S_seloper_t  op,
hid_t  space2_id 
)

◆ H5Sget_regular_hyperslab()

herr_t H5Sget_regular_hyperslab ( hid_t  spaceid,
hsize_t  start[],
hsize_t  stride[],
hsize_t  count[],
hsize_t  block[] 
)

◆ H5Sget_select_hyper_blocklist()

herr_t H5Sget_select_hyper_blocklist ( hid_t  spaceid,
hsize_t  startblock,
hsize_t  numblocks,
hsize_t  buf[] 
)

◆ H5Sget_select_hyper_nblocks()

hssize_t H5Sget_select_hyper_nblocks ( hid_t  spaceid)

◆ H5Sis_regular_hyperslab()

htri_t H5Sis_regular_hyperslab ( hid_t  spaceid)

◆ H5Smodify_select()

herr_t H5Smodify_select ( hid_t  space1_id,
H5S_seloper_t  op,
hid_t  space2_id 
)

Note that this is a tricky part of this function. It's possible that two dataspaces have different "offset". If the space2 has smaller offset value than that of space1 in a dimension, then the span elements of this dimension in space2 could have negative "low" and "high" values relative to the offset in space1. In other words, if the bounds of span elements in space2 are adjusted relative to the offset in space1, then every span element's bound is computed as "origin_bound+offset2-offset1". Therefore, if offset2 (the offset of space2) is smaller, then "origin_bound+offset2-offset1" could be negative which is not allowed by the bound type declaration as hsize_t! As a result, if the op is an OR selection, then the final result may contain span elements that have negative bound! So right now, the difference in the offset is totally ignored!!

◆ H5Sselect_hyperslab()

herr_t H5Sselect_hyperslab ( hid_t  space_id,
H5S_seloper_t  op,
const hsize_t  start[],
const hsize_t  stride[],
const hsize_t  count[],
const hsize_t  block[] 
)

Variable Documentation

◆ H5O_sds_hyper_ver_bounds

const unsigned H5O_sds_hyper_ver_bounds[]

◆ H5S_sel_hyper

const H5S_select_class_t H5S_sel_hyper[1]
Initial value:
= {{
H5S__hyper_copy,
H5S__hyper_release,
H5S__hyper_is_valid,
H5S__hyper_serial_size,
H5S__hyper_serialize,
H5S__hyper_deserialize,
H5S__hyper_bounds,
H5S__hyper_offset,
H5S__hyper_unlim_dim,
H5S__hyper_num_elem_non_unlim,
H5S__hyper_is_contiguous,
H5S__hyper_is_single,
H5S__hyper_is_regular,
H5S__hyper_shape_same,
H5S__hyper_intersect_block,
H5S__hyper_adjust_u,
H5S__hyper_adjust_s,
H5S__hyper_project_scalar,
H5S__hyper_project_simple,
H5S__hyper_iter_init,
}}
ERR
CATCH ERR
Definition: H5EA.c:729
H5S_HYPER_VERSION_3
#define H5S_HYPER_VERSION_3
Definition: H5Spkg.h:46
H5E_DATASPACE
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 H5E_DATASPACE
Definition: H5err.txt:60
H5E_CANTAPPEND
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 Unable to decode value Unable to split node Unable to redistribute records Unable to swap records Unable to insert object Unable to list node Unable to modify record Unable to remove object Bad object header link count Wrong version number Alignment error Unrecognized message Can t delete message Iteration failed Can t pack messages Can t reset object Unable to rename object Can t open object Can t close object Name component is too long Problem with path to object Can t convert datatypes Bad size for object Can t clip hyperslab region Can t count elements Can t select hyperslab Can t move to next iterator location Invalid selection Can t compare objects Internal states are inconsistent H5E_CANTAPPEND
Definition: H5err.txt:232
H5S_HYPER_VERSION_2
#define H5S_HYPER_VERSION_2
Definition: H5Spkg.h:45
H5S_SEL_HYPERSLABS
@ H5S_SEL_HYPERSLABS
Definition: H5Spublic.h:87
FALSE
#define FALSE
Definition: H5FDmulti.c:33
H5S_HYPER_VERSION_1
#define H5S_HYPER_VERSION_1
Definition: H5Spkg.h:44