diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-10 21:38:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-12-10 21:38:03 (GMT) |
commit | 66addd2d2c56c31137b2e50f66134e66c0bb746d (patch) | |
tree | af0a17a8fc8a632bb13358463544e21ef503c2b5 /src/H5Dpkg.h | |
parent | e7d0100948c274dc8d77b6aaabb8f157340db61d (diff) | |
download | hdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.zip hdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.tar.gz hdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.tar.bz2 |
[svn-r14334] Description:
- Avoid trying to update 1-D dataset's chunk indices (they can't change)
- Cache a copy of a dataspace describing a chunk, when doing single
element I/O
- Keep a 'chunk info' struct around, for single element I/O
- Avoid creating a skip list for chunk infos when performing I/O on single
element
Also, minor formatting cleanups to testing code
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Dpkg.h')
-rw-r--r-- | src/H5Dpkg.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 4f4bc35..aec5e19 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -119,6 +119,17 @@ typedef struct H5D_io_info_t { #endif /* H5S_DEBUG */ } H5D_io_info_t; +/* Structure holding information about a chunk's selection for mapping */ +typedef struct H5D_chunk_info_t { + hsize_t index; /* "Index" of chunk in dataset */ + size_t chunk_points; /* Number of elements selected in chunk */ + hsize_t coords[H5O_LAYOUT_NDIMS]; /* Coordinates of chunk in file dataset's dataspace */ + H5S_t *fspace; /* Dataspace describing chunk & selection in it */ + unsigned fspace_shared; /* Indicate that the file space for a chunk is shared and shouldn't be freed */ + H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */ + unsigned mspace_shared; /* Indicate that the memory space for a chunk is shared and shouldn't be freed */ +} H5D_chunk_info_t; + /* Cached information about a particular chunk */ typedef struct { hbool_t valid; /*whether cache info is valid*/ @@ -143,7 +154,9 @@ typedef struct H5D_rdcc_t { int nused; /* Number of chunk slots in use */ H5D_chunk_cached_t last; /* Cached copy of last chunk information */ struct H5D_rdcc_ent_t **slot; /* Chunk slots, each points to a chunk*/ - H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */ + H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */ + H5S_t *single_space; /* Dataspace for single element I/O on chunks */ + H5D_chunk_info_t *single_chunk_info; /* Pointer to single chunk's info */ } H5D_rdcc_t; /* The raw data contiguous data cache */ @@ -200,16 +213,6 @@ typedef enum { } H5D_time_alloc_t; -/* Structure holding information about a chunk's selection for mapping */ -typedef struct H5D_chunk_info_t { - hsize_t index; /* "Index" of chunk in dataset */ - size_t chunk_points; /* Number of elements selected in chunk */ - H5S_t *fspace; /* Dataspace describing chunk & selection in it */ - hsize_t coords[H5O_LAYOUT_NDIMS]; /* Coordinates of chunk in file dataset's dataspace */ - H5S_t *mspace; /* Dataspace describing selection in memory corresponding to this chunk */ - unsigned mspace_shared; /* Indicate that the memory space for a chunk is shared and shouldn't be freed */ -} H5D_chunk_info_t; - /* Main structure holding the mapping between file chunks and memory */ typedef struct H5D_chunk_map_t { H5O_layout_t *layout; /* Dataset layout information*/ @@ -226,6 +229,9 @@ typedef struct H5D_chunk_map_t { H5S_sel_type msel_type; /* Selection type in memory */ H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */ + H5S_t *single_space; /* Dataspace for single chunk */ + H5D_chunk_info_t *single_chunk_info; /* Pointer to single chunk's info */ + hbool_t use_single; /* Whether I/O is on a single element */ hsize_t last_index; /* Index of last chunk operated on */ H5D_chunk_info_t *last_chunk_info; /* Pointer to last chunk's info */ hsize_t chunks[H5O_LAYOUT_NDIMS]; /* Number of chunks in each dimension */ |