summaryrefslogtreecommitdiffstats
path: root/src/H5Oprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-05-27 20:24:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-05-27 20:24:08 (GMT)
commit2ce06c39120fe3d89c0faa1c948b5a0399e968e2 (patch)
treee00c2829682ffc6d5830e97726ed8c5563278bcb /src/H5Oprivate.h
parent71fba25e6ea0d7cacb19928af43af6874a4008c2 (diff)
downloadhdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.zip
hdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.tar.gz
hdf5-2ce06c39120fe3d89c0faa1c948b5a0399e968e2.tar.bz2
[svn-r8590] Purpose:
Code optimization & bug fix Description: When dimension information is being stored in the storage layout message on disk, it is stored as 32-bit quantities, possibly truncating the dimension information, if a dimension is greater than 32-bits in size. Solution: Fix the storage layout message problem by revising file format to not store dimension information, since it is already available in the dataspace. Also revise the storage layout data structures to be more compartmentalized for the information for contiguous, chunked and compact storage. Platforms tested: FreeBSD 4.9 (sleipnir) w/parallel Solaris 2.7 (arabica) h5committest
Diffstat (limited to 'src/H5Oprivate.h')
-rw-r--r--src/H5Oprivate.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 2686784..6520877 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -123,15 +123,32 @@ typedef struct H5O_efl_t {
*/
#define H5O_LAYOUT_NDIMS (H5S_MAX_RANK+1)
+typedef struct H5O_layout_contig_t {
+ haddr_t addr; /* File address of data */
+ hsize_t size; /* Size of data in bytes */
+} H5O_layout_contig_t;
+
+typedef struct H5O_layout_chunk_t {
+ haddr_t addr; /* File address of B-tree */
+ unsigned ndims; /* Num dimensions in chunk */
+ size_t dim[H5O_LAYOUT_NDIMS]; /* Size of chunk in elements */
+ size_t size; /* Size of chunk in bytes */
+} H5O_layout_chunk_t;
+
+typedef struct H5O_layout_compact_t {
+ hbool_t dirty; /* Dirty flag for compact dataset */
+ size_t size; /* Size of buffer in bytes */
+ void *buf; /* Buffer for compact dataset */
+} H5O_layout_compact_t;
+
typedef struct H5O_layout_t {
- int type; /*type of layout, H5D_layout_t */
- haddr_t addr; /*file address of data or B-tree */
- unsigned ndims; /*num dimensions in stored data */
- hsize_t dim[H5O_LAYOUT_NDIMS]; /*size of data or chunk in bytes */
- hsize_t chunk_size; /*size of chunk in bytes */
- hbool_t dirty; /*dirty flag for compact dataset */
- size_t size; /*size of compact dataset in bytes */
- void *buf; /*buffer for compact dataset */
+ H5D_layout_t type; /* Type of layout */
+ unsigned version; /* Version of message */
+ union {
+ H5O_layout_contig_t contig; /* Information for contiguous layout */
+ H5O_layout_chunk_t chunk; /* Information for chunked layout */
+ H5O_layout_compact_t compact; /* Information for compact layout */
+ } u;
} H5O_layout_t;
/* Enable reading/writing "bogus" messages */