diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-22 20:21:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-22 20:21:51 (GMT) |
commit | 253ee36580536cb1ebcc51876ee841538d0a83eb (patch) | |
tree | 808502fbc18eecba4c0db8eafcd95ddddd04e345 /src/H5Sprivate.h | |
parent | 6010b691f953b8aeb167d694ff09b5b1f88b14b1 (diff) | |
download | hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.zip hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.tar.gz hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.tar.bz2 |
[svn-r8409] 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.h | 20 |
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 */ |