summaryrefslogtreecommitdiffstats
path: root/src/H5Sprivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r--src/H5Sprivate.h229
1 files changed, 12 insertions, 217 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 2824af0..4ae3510 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -22,7 +22,6 @@
#include <H5private.h>
#include <H5Dpublic.h>
#include <H5Fprivate.h>
-#include <H5Gprivate.h> /*for H5G_entry_t */
#include <H5Oprivate.h>
#define H5S_RESERVED_ATOMS 2
@@ -31,30 +30,10 @@
#define H5S_VALID_MAX 0x01
#define H5S_VALID_PERM 0x02
-/*
- * Dataspace extent information
- */
-/* Simple extent container */
-typedef struct H5S_simple_t {
- intn rank; /* Number of dimensions */
- hsize_t *size; /* Current size of the dimensions */
- hsize_t *max; /* Maximum size of the dimensions */
-#ifdef LATER
- hsize_t *perm; /* Dimension permutation array */
-#endif /* LATER */
-} H5S_simple_t;
-
-/* Extent container */
-typedef struct {
- H5S_class_t type; /* Type of extent */
- union {
- H5S_simple_t simple; /* Simple dimensionality information */
- } u;
-} H5S_extent_t;
+/* Forward references of common typedefs */
+typedef struct H5S_t H5S_t;
+typedef struct H5S_pnt_node_t H5S_pnt_node_t;
-/*
- * Dataspace selection information
- */
/* Enumerated type for the type of selection */
typedef enum {
H5S_SEL_ERROR = -1, /* Error */
@@ -65,90 +44,6 @@ typedef enum {
H5S_SEL_N = 4 /*THIS MUST BE LAST */
}H5S_sel_type;
-/* Node in point selection list */
-typedef struct H5S_pnt_node_tag {
- hssize_t *pnt; /* Pointer to a selected point */
- struct H5S_pnt_node_tag *next; /* pointer to next point in list */
-} H5S_pnt_node_t;
-
-/* Information about point selection list */
-typedef struct {
- H5S_pnt_node_t *head; /* Pointer to head of point list */
-} H5S_pnt_list_t;
-
-/* Node in hyperslab selection list */
-typedef struct H5S_hyper_node_tag {
- hssize_t *start; /* Pointer to a corner of a hyperslab closest to the origin */
- hssize_t *end; /* Pointer to a corner of a hyperslab furthest from the origin */
- struct {
- uintn cached; /* Flag to indicate that the block is cached (during I/O only) */
- size_t size; /* Size of cached block (in elements) */
- uintn rleft; /* Read elements left to access in block */
- uintn wleft; /* Write elements left to access in block */
- uint8_t *block; /* Pointer into buffer for cache */
- uint8_t *rpos; /* Pointer to current read location within block */
- uint8_t *wpos; /* Pointer to current write location within block */
- } cinfo;
- struct H5S_hyper_node_tag *next; /* pointer to next hyperslab in list */
-} H5S_hyper_node_t;
-
-/* Region in dimension */
-typedef struct H5S_hyper_region_tag {
- hssize_t start; /* The low bound of a region in a dimension */
- hssize_t end; /* The high bound of a region in a dimension */
- H5S_hyper_node_t *node; /* pointer to the node the region is in */
-} H5S_hyper_region_t;
-
-/* Information about hyperslab boundary and pointer to hyperslab node */
-typedef struct {
- hssize_t bound; /* Location of boundary */
- H5S_hyper_node_t *node; /* Boundary's node */
-} H5S_hyper_bound_t;
-
-/* Information about hyperslab list */
-typedef struct {
- size_t count; /* Number of nodes in list */
- H5S_hyper_node_t *head; /* Pointer to head of hyperslab list */
- H5S_hyper_bound_t **lo_bounds; /* Lower (closest to the origin) bound array for each dimension */
-} H5S_hyper_list_t;
-
-/* Information about one dimension in a hyperslab selection */
-typedef struct {
- hssize_t start;
- hsize_t stride;
- hsize_t count;
- hsize_t block;
-} H5S_hyper_dim_t;
-
-/* Information about hyperslab selection */
-typedef struct {
- H5S_hyper_dim_t *diminfo; /* ->[rank] of per-dim selection info */
- /* diminfo only points to one array, which holds the information
- * for one hyperslab selection. Perhaps this might need to be
- * expanded into a list of arrays when the H5Sselect_hyperslab's
- * restriction to H5S_SELECT_SET is removed. */
- H5S_hyper_dim_t *app_diminfo;/* ->[rank] of per-dim selection info */
- /* 'diminfo' points to a [potentially] optimized version of the user's
- * hyperslab information. 'app_diminfo' points to the actual parameters
- * that the application used for setting the hyperslab selection. These
- * are only used for re-gurgitating the original values used to set the
- * hyperslab to the application when it queries the hyperslab selection
- * information. */
- H5S_hyper_list_t *hyper_lst; /* List of selected hyperslabs (order is not important) */
-} H5S_hyper_sel_t;
-
-/* Selection information container */
-typedef struct {
- H5S_sel_type type; /* Type of selection (list of points or hyperslabs) */
- hssize_t *offset; /* Offset within the extent (NULL means a 0 offset) */
- hsize_t *order; /* Selection order. (NULL means a specific ordering of points) */
- hsize_t num_elem; /* Number of elements in selection */
- union {
- H5S_pnt_list_t *pnt_lst; /* List of selected points (order is important) */
- H5S_hyper_sel_t hslab; /* Info about hyperslab selections */
- } sel_info;
-} H5S_select_t;
-
/* Point selection iteration container */
typedef struct {
hsize_t elmt_left; /* Number of elements left to iterate over */
@@ -174,12 +69,6 @@ typedef union {
H5S_all_iter_t all; /* "All" selection iteration information */
} H5S_sel_iter_t;
-/* Main dataspace structure */
-typedef struct H5S_t {
- H5S_extent_t extent; /* Dataspace extent */
- H5S_select_t select; /* Dataspace selection */
-} H5S_t;
-
/*
* Data space conversions usually take place in two halves. One half
* transfers data points between memory and a data type conversion array
@@ -303,21 +192,24 @@ __DLLVAR__ const H5S_mconv_t H5S_ALL_MCONV[];
__DLLVAR__ const H5S_fconv_t H5S_HYPER_FCONV[];
__DLLVAR__ const H5S_mconv_t H5S_HYPER_MCONV[];
+/* Forward declarations for prototypes arguments */
+struct H5G_entry_t;
+
__DLL__ H5S_t *H5S_create(H5S_class_t type);
__DLL__ H5S_t *H5S_copy(const H5S_t *src);
-__DLL__ herr_t H5S_close_simple(H5S_simple_t *simple);
__DLL__ herr_t H5S_close(H5S_t *ds);
+__DLL__ H5S_conv_t *H5S_find(const H5S_t *mem_space, const H5S_t *file_space);
+__DLL__ H5S_class_t H5S_get_simple_extent_type(const H5S_t *ds);
__DLL__ hsize_t H5S_get_simple_extent_npoints(const H5S_t *ds);
__DLL__ hsize_t H5S_get_npoints_max(const H5S_t *ds);
__DLL__ intn H5S_get_simple_extent_ndims(const H5S_t *ds);
__DLL__ intn H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[]/*out*/,
hsize_t max_dims[]/*out*/);
-__DLL__ herr_t H5S_modify(H5G_entry_t *ent, const H5S_t *space);
-__DLL__ H5S_t *H5S_read(H5G_entry_t *ent);
+__DLL__ herr_t H5S_modify(struct H5G_entry_t *ent, const H5S_t *space);
+__DLL__ H5S_t *H5S_read(struct H5G_entry_t *ent);
__DLL__ intn H5S_cmp(const H5S_t *ds1, const H5S_t *ds2);
__DLL__ htri_t H5S_is_simple(const H5S_t *sdim);
__DLL__ uintn H5S_nelem(const H5S_t *space);
-__DLL__ H5S_conv_t *H5S_find(const H5S_t *mem_space, const H5S_t *file_space);
__DLL__ herr_t H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op,
const hssize_t start[],
const hsize_t _stride[],
@@ -325,13 +217,9 @@ __DLL__ herr_t H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op,
const hsize_t _block[]);
__DLL__ intn H5S_get_hyperslab(const H5S_t *ds, hssize_t offset[]/*out*/,
hsize_t size[]/*out*/, hsize_t stride[]/*out*/);
-__DLL__ herr_t H5S_release_simple(H5S_simple_t *simple);
-__DLL__ herr_t H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src);
__DLL__ herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src);
__DLL__ herr_t H5S_extent_release(H5S_t *space);
__DLL__ herr_t H5S_select_release(H5S_t *space);
-__DLL__ herr_t H5S_sel_iter_release(const H5S_t *space,
- H5S_sel_iter_t *sel_iter);
__DLL__ hssize_t H5S_get_select_npoints(const H5S_t *space);
__DLL__ intn H5S_extend(H5S_t *space, const hsize_t *size);
__DLL__ herr_t H5S_set_extent_simple(H5S_t *space, int rank,
@@ -339,106 +227,13 @@ __DLL__ herr_t H5S_set_extent_simple(H5S_t *space, int rank,
__DLL__ htri_t H5S_select_valid(const H5S_t *space);
__DLL__ herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream,
intn indent, intn fwidth);
-__DLL__ herr_t H5S_register(H5S_sel_type cls, const H5S_fconv_t *fconv,
- const H5S_mconv_t *mconv);
__DLL__ hssize_t H5S_select_serial_size(const H5S_t *space);
__DLL__ herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf);
__DLL__ herr_t H5S_select_deserialize(H5S_t *space, const uint8_t *buf);
__DLL__ htri_t H5S_select_contiguous(const H5S_t *space);
__DLL__ herr_t H5S_select_iterate(void *buf, hid_t type_id, H5S_t *space,
H5D_operator_t op, void *operator_data);
-
-/* Point select functions */
-__DLL__ herr_t H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem,
- const hssize_t **coord);
-__DLL__ herr_t H5S_point_release(H5S_t *space);
-__DLL__ hsize_t H5S_point_npoints(const H5S_t *space);
-__DLL__ herr_t H5S_point_copy(H5S_t *dst, const H5S_t *src);
-__DLL__ htri_t H5S_point_select_valid(const H5S_t *space);
-__DLL__ hssize_t H5S_point_select_serial_size(const H5S_t *space);
-__DLL__ herr_t H5S_point_select_serialize(const H5S_t *space, uint8_t *buf);
-__DLL__ herr_t H5S_point_select_deserialize(H5S_t *space, const uint8_t *buf);
-__DLL__ herr_t H5S_point_bounds(H5S_t *space, hsize_t *start, hsize_t *end);
-__DLL__ htri_t H5S_point_select_contiguous(const H5S_t *space);
-__DLL__ herr_t H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op,
- void *operator_data);
-
-/* "All" select functions */
-__DLL__ herr_t H5S_all_release(H5S_t *space);
-__DLL__ hsize_t H5S_all_npoints(const H5S_t *space);
-__DLL__ herr_t H5S_all_select_serialize(const H5S_t *space, uint8_t *buf);
-__DLL__ herr_t H5S_all_select_deserialize(H5S_t *space, const uint8_t *buf);
-__DLL__ herr_t H5S_all_bounds(H5S_t *space, hsize_t *start, hsize_t *end);
-__DLL__ herr_t H5S_all_read(H5F_t *f, const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,
- hid_t dxpl_id, void *buf/*out*/,
- hbool_t *must_convert/*out*/);
-__DLL__ herr_t H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl, size_t elmt_size,
- const H5S_t *file_space, const H5S_t *mem_space,
- hid_t dxpl_id, const void *buf,
- hbool_t *must_convert/*out*/);
-__DLL__ herr_t H5S_all_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-
-/* Hyperslab selection functions */
-__DLL__ herr_t H5S_hyper_release(H5S_t *space);
-__DLL__ herr_t H5S_hyper_sel_iter_release(H5S_sel_iter_t *sel_iter);
-__DLL__ hsize_t H5S_hyper_npoints(const H5S_t *space);
-__DLL__ int H5S_hyper_compare_regions(const void *r1, const void *r2);
-__DLL__ int H5S_hyper_compare_bounds(const void *r1, const void *r2);
-__DLL__ herr_t H5S_hyper_copy(H5S_t *dst, const H5S_t *src);
-__DLL__ htri_t H5S_hyper_select_valid(const H5S_t *space);
-__DLL__ intn H5S_hyper_bound_comp(const void *_b1, const void *_b2);
-__DLL__ herr_t H5S_hyper_node_add(H5S_hyper_node_t **head, intn endflag,
- intn rank, const hssize_t *start,
- const hsize_t *size);
-__DLL__ herr_t H5S_hyper_clip(H5S_t *space, H5S_hyper_node_t *nodes,
- H5S_hyper_node_t **uniq,
- H5S_hyper_node_t **overlap);
-__DLL__ hssize_t H5S_hyper_select_serial_size(const H5S_t *space);
-__DLL__ herr_t H5S_hyper_select_serialize(const H5S_t *space, uint8_t *buf);
-__DLL__ herr_t H5S_hyper_select_deserialize(H5S_t *space, const uint8_t *buf);
-__DLL__ herr_t H5S_hyper_bounds(H5S_t *space, hsize_t *start, hsize_t *end);
-__DLL__ htri_t H5S_hyper_select_contiguous(const H5S_t *space);
-__DLL__ herr_t H5S_hyper_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-
-/* "None" selection functions */
-__DLL__ herr_t H5S_none_select_serialize(const H5S_t *space, uint8_t *buf);
-__DLL__ herr_t H5S_none_select_deserialize(H5S_t *space, const uint8_t *buf);
-__DLL__ herr_t H5S_none_select_iterate(void *buf, hid_t type_id, H5S_t *space,
- H5D_operator_t op, void *operator_data);
-
-#ifdef H5_HAVE_PARALLEL
-/* MPI-IO function to read directly from app buffer to file rky980813 */
-__DLL__ herr_t H5S_mpio_spaces_read(H5F_t *f,
- const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl,
- size_t elmt_size, const H5S_t *file_space,
- const H5S_t *mem_space, hid_t dxpl_id,
- void *buf/*out*/,
- hbool_t *must_convert /*out*/ );
-
-/* MPI-IO function to write directly from app buffer to file rky980813 */
-__DLL__ herr_t H5S_mpio_spaces_write(H5F_t *f,
- const struct H5O_layout_t *layout,
- const struct H5O_pline_t *pline,
- const struct H5O_efl_t *efl,
- size_t elmt_size, const H5S_t *file_space,
- const H5S_t *mem_space, hid_t dxpl_id,
- const void *buf,
- hbool_t *must_convert /*out*/ );
-#ifndef _H5S_IN_H5S_C
-/* Global var whose value comes from environment variable */
-__DLLVAR__ hbool_t H5_mpi_opt_types_g;
-#endif /* _H5S_IN_H5S_C */
-
-#endif /* H5_HAVE_PARALLEL */
+__DLL__ herr_t H5S_sel_iter_release(const H5S_t *space,
+ H5S_sel_iter_t *sel_iter);
#endif /* _H5Sprivate_H */