HDF5  1.12.0
Macros | Typedefs | Enumerations | Functions
H5Spublic.h File Reference
#include "H5public.h"
#include "H5Ipublic.h"

Go to the source code of this file.

Macros

#define H5S_ALL   (hid_t)0
 
#define H5S_UNLIMITED   HSIZE_UNDEF
 
#define H5S_MAX_RANK   32
 
#define H5S_SEL_ITER_GET_SEQ_LIST_SORTED
 
#define H5S_SEL_ITER_SHARE_WITH_DATASPACE
 

Typedefs

typedef enum H5S_class_t H5S_class_t
 
typedef enum H5S_seloper_t H5S_seloper_t
 

Enumerations

enum  H5S_class_t { H5S_NO_CLASS = -1, H5S_SCALAR = 0, H5S_SIMPLE = 1, H5S_NULL = 2 }
 
enum  H5S_seloper_t {
  H5S_SELECT_NOOP = -1, H5S_SELECT_SET = 0, H5S_SELECT_OR, H5S_SELECT_AND,
  H5S_SELECT_XOR, H5S_SELECT_NOTB, H5S_SELECT_NOTA, H5S_SELECT_APPEND,
  H5S_SELECT_PREPEND, H5S_SELECT_INVALID
}
 
enum  H5S_sel_type {
  H5S_SEL_ERROR = -1, H5S_SEL_NONE = 0, H5S_SEL_POINTS = 1, H5S_SEL_HYPERSLABS = 2,
  H5S_SEL_ALL = 3, H5S_SEL_N
}
 

Functions

H5_DLL hid_t H5Screate (H5S_class_t type)
 
H5_DLL hid_t H5Screate_simple (int rank, const hsize_t dims[], const hsize_t maxdims[])
 
H5_DLL herr_t H5Sset_extent_simple (hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[])
 
H5_DLL hid_t H5Scopy (hid_t space_id)
 
H5_DLL herr_t H5Sclose (hid_t space_id)
 
H5_DLL herr_t H5Sencode2 (hid_t obj_id, void *buf, size_t *nalloc, hid_t fapl)
 
H5_DLL hid_t H5Sdecode (const void *buf)
 
H5_DLL hssize_t H5Sget_simple_extent_npoints (hid_t space_id)
 
H5_DLL int H5Sget_simple_extent_ndims (hid_t space_id)
 
H5_DLL int H5Sget_simple_extent_dims (hid_t space_id, hsize_t dims[], hsize_t maxdims[])
 
H5_DLL htri_t H5Sis_simple (hid_t space_id)
 
H5_DLL H5S_class_t H5Sget_simple_extent_type (hid_t space_id)
 
H5_DLL herr_t H5Sset_extent_none (hid_t space_id)
 
H5_DLL herr_t H5Sextent_copy (hid_t dst_id, hid_t src_id)
 
H5_DLL htri_t H5Sextent_equal (hid_t sid1, hid_t sid2)
 
H5_DLL H5S_sel_type H5Sget_select_type (hid_t spaceid)
 
H5_DLL hssize_t H5Sget_select_npoints (hid_t spaceid)
 
H5_DLL herr_t H5Sselect_copy (hid_t dst_id, hid_t src_id)
 
H5_DLL htri_t H5Sselect_valid (hid_t spaceid)
 
H5_DLL herr_t H5Sselect_adjust (hid_t spaceid, const hssize_t *offset)
 
H5_DLL herr_t H5Sget_select_bounds (hid_t spaceid, hsize_t start[], hsize_t end[])
 
H5_DLL htri_t H5Sselect_shape_same (hid_t space1_id, hid_t space2_id)
 
H5_DLL htri_t H5Sselect_intersect_block (hid_t space_id, const hsize_t *start, const hsize_t *end)
 
H5_DLL herr_t H5Soffset_simple (hid_t space_id, const hssize_t *offset)
 
H5_DLL herr_t H5Sselect_all (hid_t spaceid)
 
H5_DLL herr_t H5Sselect_none (hid_t spaceid)
 
H5_DLL herr_t H5Sselect_elements (hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord)
 
H5_DLL hssize_t H5Sget_select_elem_npoints (hid_t spaceid)
 
H5_DLL herr_t H5Sget_select_elem_pointlist (hid_t spaceid, hsize_t startpoint, hsize_t numpoints, hsize_t buf[])
 
H5_DLL 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[])
 
H5_DLL 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[])
 
H5_DLL herr_t H5Smodify_select (hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
 
H5_DLL hid_t H5Scombine_select (hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
 
H5_DLL htri_t H5Sis_regular_hyperslab (hid_t spaceid)
 
H5_DLL htri_t H5Sget_regular_hyperslab (hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[])
 
H5_DLL hssize_t H5Sget_select_hyper_nblocks (hid_t spaceid)
 
H5_DLL herr_t H5Sget_select_hyper_blocklist (hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[])
 
H5_DLL hid_t H5Sselect_project_intersection (hid_t src_space_id, hid_t dst_space_id, hid_t src_intersect_space_id)
 
H5_DLL hid_t H5Ssel_iter_create (hid_t spaceid, size_t elmt_size, unsigned flags)
 
H5_DLL herr_t H5Ssel_iter_get_seq_list (hid_t sel_iter_id, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len)
 
H5_DLL herr_t H5Ssel_iter_close (hid_t sel_iter_id)
 
H5_DLL herr_t H5Sencode1 (hid_t obj_id, void *buf, size_t *nalloc)
 

Macro Definition Documentation

◆ H5S_ALL

#define H5S_ALL   (hid_t)0

◆ H5S_MAX_RANK

#define H5S_MAX_RANK   32

◆ H5S_SEL_ITER_GET_SEQ_LIST_SORTED

#define H5S_SEL_ITER_GET_SEQ_LIST_SORTED
Value:
0x0001 /* Retrieve elements from iterator
* in increasing offset order, for
* each call to retrieve sequences.
* Currently, this only applies to
* point selections, as hyperslab
* selections are always returned
* in increasing offset order.
*
* Note that the order is only
* increasing for each call to
* get_seq_list, the next set of
* sequences could start with an
* earlier offset than the previous
* one.
*/

◆ H5S_SEL_ITER_SHARE_WITH_DATASPACE

#define H5S_SEL_ITER_SHARE_WITH_DATASPACE
Value:
0x0002 /* Don't copy the dataspace
* selection when creating the
* selection iterator.
*
* This can improve performance
* of creating the iterator, but
* the dataspace _MUST_NOT_ be
* modified or closed until the
* selection iterator is closed
* or the iterator's behavior
* will be undefined.
*/

◆ H5S_UNLIMITED

#define H5S_UNLIMITED   HSIZE_UNDEF

Typedef Documentation

◆ H5S_class_t

typedef enum H5S_class_t H5S_class_t

◆ H5S_seloper_t

Enumeration Type Documentation

◆ H5S_class_t

Enumerator
H5S_NO_CLASS 
H5S_SCALAR 
H5S_SIMPLE 
H5S_NULL 

◆ H5S_sel_type

Enumerator
H5S_SEL_ERROR 
H5S_SEL_NONE 
H5S_SEL_POINTS 
H5S_SEL_HYPERSLABS 
H5S_SEL_ALL 
H5S_SEL_N 

◆ H5S_seloper_t

Enumerator
H5S_SELECT_NOOP 
H5S_SELECT_SET 
H5S_SELECT_OR 
H5S_SELECT_AND 
H5S_SELECT_XOR 
H5S_SELECT_NOTB 
H5S_SELECT_NOTA 
H5S_SELECT_APPEND 
H5S_SELECT_PREPEND 
H5S_SELECT_INVALID 

Function Documentation

◆ H5Sclose()

H5_DLL herr_t H5Sclose ( hid_t  space_id)

◆ H5Scombine_hyperslab()

H5_DLL 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()

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

◆ H5Scopy()

H5_DLL hid_t H5Scopy ( hid_t  space_id)

◆ H5Screate()

H5_DLL hid_t H5Screate ( H5S_class_t  type)

◆ H5Screate_simple()

H5_DLL hid_t H5Screate_simple ( int  rank,
const hsize_t  dims[],
const hsize_t  maxdims[] 
)

◆ H5Sdecode()

H5_DLL hid_t H5Sdecode ( const void *  buf)

◆ H5Sencode1()

H5_DLL herr_t H5Sencode1 ( hid_t  obj_id,
void *  buf,
size_t nalloc 
)

◆ H5Sencode2()

H5_DLL herr_t H5Sencode2 ( hid_t  obj_id,
void *  buf,
size_t nalloc,
hid_t  fapl 
)

◆ H5Sextent_copy()

H5_DLL herr_t H5Sextent_copy ( hid_t  dst_id,
hid_t  src_id 
)

◆ H5Sextent_equal()

H5_DLL htri_t H5Sextent_equal ( hid_t  sid1,
hid_t  sid2 
)

◆ H5Sget_regular_hyperslab()

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

◆ H5Sget_select_bounds()

H5_DLL herr_t H5Sget_select_bounds ( hid_t  spaceid,
hsize_t  start[],
hsize_t  end[] 
)

◆ H5Sget_select_elem_npoints()

H5_DLL hssize_t H5Sget_select_elem_npoints ( hid_t  spaceid)

◆ H5Sget_select_elem_pointlist()

H5_DLL herr_t H5Sget_select_elem_pointlist ( hid_t  spaceid,
hsize_t  startpoint,
hsize_t  numpoints,
hsize_t  buf[] 
)

◆ H5Sget_select_hyper_blocklist()

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

◆ H5Sget_select_hyper_nblocks()

H5_DLL hssize_t H5Sget_select_hyper_nblocks ( hid_t  spaceid)

◆ H5Sget_select_npoints()

H5_DLL hssize_t H5Sget_select_npoints ( hid_t  spaceid)

◆ H5Sget_select_type()

H5_DLL H5S_sel_type H5Sget_select_type ( hid_t  spaceid)

◆ H5Sget_simple_extent_dims()

H5_DLL int H5Sget_simple_extent_dims ( hid_t  space_id,
hsize_t  dims[],
hsize_t  maxdims[] 
)

◆ H5Sget_simple_extent_ndims()

H5_DLL int H5Sget_simple_extent_ndims ( hid_t  space_id)

◆ H5Sget_simple_extent_npoints()

H5_DLL hssize_t H5Sget_simple_extent_npoints ( hid_t  space_id)

◆ H5Sget_simple_extent_type()

H5_DLL H5S_class_t H5Sget_simple_extent_type ( hid_t  space_id)

◆ H5Sis_regular_hyperslab()

H5_DLL htri_t H5Sis_regular_hyperslab ( hid_t  spaceid)

◆ H5Sis_simple()

H5_DLL htri_t H5Sis_simple ( hid_t  space_id)

◆ H5Smodify_select()

H5_DLL 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!!

◆ H5Soffset_simple()

H5_DLL herr_t H5Soffset_simple ( hid_t  space_id,
const hssize_t offset 
)

◆ H5Ssel_iter_close()

H5_DLL herr_t H5Ssel_iter_close ( hid_t  sel_iter_id)

◆ H5Ssel_iter_create()

H5_DLL hid_t H5Ssel_iter_create ( hid_t  spaceid,
size_t  elmt_size,
unsigned  flags 
)

◆ H5Ssel_iter_get_seq_list()

H5_DLL herr_t H5Ssel_iter_get_seq_list ( hid_t  sel_iter_id,
size_t  maxseq,
size_t  maxbytes,
size_t nseq,
size_t nbytes,
hsize_t off,
size_t len 
)

◆ H5Sselect_adjust()

H5_DLL herr_t H5Sselect_adjust ( hid_t  spaceid,
const hssize_t offset 
)

◆ H5Sselect_all()

H5_DLL herr_t H5Sselect_all ( hid_t  spaceid)

◆ H5Sselect_copy()

H5_DLL herr_t H5Sselect_copy ( hid_t  dst_id,
hid_t  src_id 
)

◆ H5Sselect_elements()

H5_DLL herr_t H5Sselect_elements ( hid_t  space_id,
H5S_seloper_t  op,
size_t  num_elem,
const hsize_t coord 
)

◆ H5Sselect_hyperslab()

H5_DLL 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[] 
)

◆ H5Sselect_intersect_block()

H5_DLL htri_t H5Sselect_intersect_block ( hid_t  space_id,
const hsize_t start,
const hsize_t end 
)

◆ H5Sselect_none()

H5_DLL herr_t H5Sselect_none ( hid_t  spaceid)

◆ H5Sselect_project_intersection()

H5_DLL hid_t H5Sselect_project_intersection ( hid_t  src_space_id,
hid_t  dst_space_id,
hid_t  src_intersect_space_id 
)

◆ H5Sselect_shape_same()

H5_DLL htri_t H5Sselect_shape_same ( hid_t  space1_id,
hid_t  space2_id 
)

◆ H5Sselect_valid()

H5_DLL htri_t H5Sselect_valid ( hid_t  spaceid)

◆ H5Sset_extent_none()

H5_DLL herr_t H5Sset_extent_none ( hid_t  space_id)

◆ H5Sset_extent_simple()

H5_DLL herr_t H5Sset_extent_simple ( hid_t  space_id,
int  rank,
const hsize_t  dims[],
const hsize_t  max[] 
)