summaryrefslogtreecommitdiffstats
path: root/src/H5Sprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-22 20:21:44 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-22 20:21:44 (GMT)
commitd9ccc0e0f5edf32e0b70355f4cf2cfb583a12482 (patch)
tree7513d40d7cbc7ac7f89915be80aeb3bfc7f7acd1 /src/H5Sprivate.h
parente8e696542f60b1749d1ad8e89d561afc50b387e7 (diff)
downloadhdf5-d9ccc0e0f5edf32e0b70355f4cf2cfb583a12482.zip
hdf5-d9ccc0e0f5edf32e0b70355f4cf2cfb583a12482.tar.gz
hdf5-d9ccc0e0f5edf32e0b70355f4cf2cfb583a12482.tar.bz2
[svn-r8408] Purpose:
Code optimization Description: Instead of dynamicly allocating various arrays for various pieces of information about a selection or selection iterator, just use fixed size array of size H5S_MAX_RANK (as the rest of the library does). Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r--src/H5Sprivate.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 94510b2..d350738 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -42,7 +42,14 @@ typedef struct H5S_t H5S_t;
typedef struct H5S_pnt_node_t H5S_pnt_node_t;
typedef struct H5S_hyper_span_t H5S_hyper_span_t;
typedef struct H5S_hyper_span_info_t H5S_hyper_span_info_t;
-typedef struct H5S_hyper_dim_t H5S_hyper_dim_t;
+
+/* Information about one dimension in a hyperslab selection */
+typedef struct H5S_hyper_dim_t {
+ hssize_t start;
+ hsize_t stride;
+ hsize_t count;
+ hsize_t block;
+} H5S_hyper_dim_t;
/* Point selection iteration container */
typedef struct {
@@ -52,22 +59,23 @@ typedef struct {
/* Hyperslab selection iteration container */
typedef struct {
/* Common fields for all hyperslab selections */
- hssize_t *off; /* Offset in span node (used as position for regular hyperslabs) */
+ hssize_t off[H5S_MAX_RANK]; /* Offset in span node (used as position for regular hyperslabs) */
unsigned iter_rank; /* Rank of iterator information */
/* (This should always be the same as the dataspace
* rank, except for regular hyperslab selections in
* which there are contiguous regions in the lower
* dimensions which have been "flattened" out
*/
+ hbool_t diminfo_valid; /* Whether the dimension information is valid */
/* "Flattened" regular hyperslab selection fields */
- H5S_hyper_dim_t *diminfo; /* "Flattened" regular selection information */
- hsize_t *size; /* "Flattened" dataspace extent information */
- hssize_t *sel_off; /* "Flattened" selection offset information */
+ H5S_hyper_dim_t diminfo[H5S_MAX_RANK]; /* "Flattened" regular selection information */
+ hsize_t size[H5S_MAX_RANK]; /* "Flattened" dataspace extent information */
+ hssize_t sel_off[H5S_MAX_RANK]; /* "Flattened" selection offset information */
/* Irregular hyperslab selection fields */
H5S_hyper_span_info_t *spans; /* Pointer to copy of the span tree */
- H5S_hyper_span_t **span;/* Array of pointers to span nodes */
+ H5S_hyper_span_t *span[H5S_MAX_RANK];/* Array of pointers to span nodes */
} H5S_hyper_iter_t;
/* "All" selection iteration container */