diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2015-10-30 22:49:40 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2016-11-29 23:42:26 (GMT) |
commit | f6f35059a5a1372761e2773daf818d4b86756d6b (patch) | |
tree | 7a93afa46c56f341e5d98221ec4f63286170dfa7 /src/H5Spkg.h | |
parent | dc4a9970ec0bc4aa7d806f5505ba89166209956b (diff) | |
download | hdf5-f6f35059a5a1372761e2773daf818d4b86756d6b.zip hdf5-f6f35059a5a1372761e2773daf818d4b86756d6b.tar.gz hdf5-f6f35059a5a1372761e2773daf818d4b86756d6b.tar.bz2 |
Add hyperslab improvement changes back.
This reverts commit 950a5bd6110ae37375ce2a883aad44ac6ad9143a.
Diffstat (limited to 'src/H5Spkg.h')
-rw-r--r-- | src/H5Spkg.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e57650a..ec40cb9 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -88,6 +88,7 @@ struct H5S_pnt_node_t { /* Information about point selection list */ typedef struct { H5S_pnt_node_t *head; /* Pointer to head of point list */ + H5S_pnt_node_t *tail; /* Pointer to tail of point list */ } H5S_pnt_list_t; /* Information about new-style hyperslab spans */ @@ -101,7 +102,7 @@ struct H5S_hyper_span_t { struct H5S_hyper_span_t *next; /* Pointer to next span in list */ }; -/* Information about a list of hyperslab spans */ +/* Information about a list of hyperslab spans in one dimension */ struct H5S_hyper_span_info_t { unsigned count; /* Ref. count of number of spans which share this span */ struct H5S_hyper_span_info_t *scratch; /* Scratch pointer @@ -110,12 +111,20 @@ struct H5S_hyper_span_info_t { * to point to the last span in a * list during single element adds) */ - struct H5S_hyper_span_t *head; /* Pointer to list of spans in next dimension down */ + struct H5S_hyper_span_t *head; /* Pointer to the first span of list of spans in the current dimension */ + struct H5S_hyper_span_t *tail; /* Pointer to the last span of list of spans in the current dimension */ }; +/* Enum for diminfo_valid field in H5S_hyper_sel_t */ +typedef enum { + H5S_DIMINFO_VALID_IMPOSSIBLE, /* 0: diminfo is not valid and can never be valid with the current selection */ + H5S_DIMINFO_VALID_NO, /* 1: diminfo is not valid but may or may not be possible to constuct */ + H5S_DIMINFO_VALID_YES /* 2: diminfo is valid */ +} H5S_diminfo_valid_t; + /* Information about new-style hyperslab selection */ typedef struct { - hbool_t diminfo_valid; /* Whether the dataset has valid diminfo */ + H5S_diminfo_valid_t diminfo_valid; /* Whether the dataset has valid diminfo */ H5S_hyper_dim_t opt_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ H5S_hyper_dim_t app_diminfo[H5S_MAX_RANK]; /* per-dim selection info */ /* 'opt_diminfo' points to a [potentially] optimized version of the user's @@ -126,7 +135,7 @@ typedef struct { * information. */ int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */ hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */ - H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */ + H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information of all dimensions */ } H5S_hyper_sel_t; /* Selection information methods */ @@ -201,7 +210,12 @@ typedef struct { const H5S_select_class_t *type; /* Pointer to selection's class info */ hbool_t offset_changed; /* Indicate that the offset for the selection has been changed */ hssize_t offset[H5S_MAX_RANK]; /* Offset within the extent */ - hsize_t num_elem; /* Number of elements in selection */ + hsize_t num_elem; /* Number of elements in selection */ + + /* The following two fields defines the bounding box of the whole selection relative to the offset */ + hsize_t low_bounds[H5S_MAX_RANK]; /* The smallest offset in each dimension */ + hsize_t high_bounds[H5S_MAX_RANK]; /* The largest offset in each dimension */ + union { H5S_pnt_list_t *pnt_lst; /* List of selected points (order is important) */ H5S_hyper_sel_t *hslab; /* Info about hyperslab selections */ @@ -274,11 +288,16 @@ H5_DLL 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); H5_DLL herr_t H5S__hyper_subtract(H5S_t *space, H5S_t *subtract_space); +H5_DLL htri_t H5S_hyper_rebuild(H5S_t *space); /* Testing functions */ #ifdef H5S_TESTING H5_DLL htri_t H5S_select_shape_same_test(hid_t sid1, hid_t sid2); -H5_DLL htri_t H5S_get_rebuild_status_test(hid_t space_id); +H5_DLL herr_t H5S_get_rebuild_status_test(hid_t space_id, + H5S_diminfo_valid_t *status1, H5S_diminfo_valid_t *status2); +H5_DLL herr_t H5S_get_diminfo_status_test(hid_t space_id, + H5S_diminfo_valid_t *status); +H5_DLL htri_t H5S_internal_consistency_test(hid_t space_id); #endif /* H5S_TESTING */ #endif /*_H5Spkg_H*/ |