diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-06 13:37:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-06 13:37:18 (GMT) |
commit | 394dace97be91c6b4a5d1dc23538cc2c12566fb8 (patch) | |
tree | b60b45012c334436c0fa11b5adcfab7ad128322b /src/H5Olayout.c | |
parent | 43d3a9bfe8dfc060615b4a0f133ebf35bcb0f2f8 (diff) | |
download | hdf5-394dace97be91c6b4a5d1dc23538cc2c12566fb8.zip hdf5-394dace97be91c6b4a5d1dc23538cc2c12566fb8.tar.gz hdf5-394dace97be91c6b4a5d1dc23538cc2c12566fb8.tar.bz2 |
[svn-r8303] Purpose:
Code optimization
Description:
Compute the size of a chunk once, when the layout information is set,
instead of each time I/O is performed on the chunk.
Platforms tested:
h5committest
Solaris 2.7 (arabica)
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r-- | src/H5Olayout.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c index b9a41ec..9e92c3f 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -147,6 +147,11 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t p += mesg->size; } } + else if(mesg->type == H5D_CHUNKED) { + /* Compute chunk size */ + for (u=0, mesg->chunk_size=1; u<mesg->ndims; u++) + mesg->chunk_size *= mesg->dim[u]; + } /* end if */ /* Set return value */ ret_value=mesg; |