summaryrefslogtreecommitdiffstats
path: root/src/H5Sall.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-05-26 02:43:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-05-26 02:43:38 (GMT)
commit85d15667be28bb8a2f0affd44d811bb565508f63 (patch)
treed12fac5151bb3be024e61757d97224147d077611 /src/H5Sall.c
parentf94d9d48ca7000087dab46e78ec9ea4b48939b32 (diff)
downloadhdf5-85d15667be28bb8a2f0affd44d811bb565508f63.zip
hdf5-85d15667be28bb8a2f0affd44d811bb565508f63.tar.gz
hdf5-85d15667be28bb8a2f0affd44d811bb565508f63.tar.bz2
[svn-r1279] Fixed bug in new optimized hyperslab code.
Diffstat (limited to 'src/H5Sall.c')
-rw-r--r--src/H5Sall.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 87e7ac8..9ac1e5e 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -549,7 +549,7 @@ H5S_all_read(H5F_t *f, const H5O_layout_t *layout, const H5O_pline_t *pline,
{
H5S_hyper_node_t *file_node,*mem_node; /* Hyperslab node */
hsize_t mem_size,file_size;
- hssize_t file_off;
+ hssize_t file_off,mem_off;
hsize_t size[H5S_MAX_RANK];
hssize_t file_offset[H5S_MAX_RANK];
hssize_t mem_offset[H5S_MAX_RANK];
@@ -586,9 +586,11 @@ H5S_all_read(H5F_t *f, const H5O_layout_t *layout, const H5O_pline_t *pline,
file_space->extent.u.simple.max[i]) goto fall_through;
if(mem_space->select.type==H5S_SEL_HYPERSLABS) {
mem_size=(mem_node->end[i]-mem_node->start[i])+1;
+ mem_off=mem_node->start[i];
} /* end if */
else {
mem_size=mem_space->extent.u.simple.size[i];
+ mem_off=0;
} /* end else */
if(file_space->select.type==H5S_SEL_HYPERSLABS) {
file_size=(file_node->end[i]-file_node->start[i])+1;
@@ -601,7 +603,7 @@ H5S_all_read(H5F_t *f, const H5O_layout_t *layout, const H5O_pline_t *pline,
if (mem_size!=file_size) goto fall_through;
size[i] = file_size;
file_offset[i] = file_off;
- mem_offset[i] = 0;
+ mem_offset[i] = mem_off;
}
size[i] = elmt_size;
file_offset[i] = 0;
@@ -649,7 +651,7 @@ H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout,
{
H5S_hyper_node_t *file_node,*mem_node; /* Hyperslab node */
hsize_t mem_size,file_size;
- hssize_t file_off;
+ hssize_t file_off,mem_off;
hsize_t size[H5S_MAX_RANK];
hssize_t file_offset[H5S_MAX_RANK];
hssize_t mem_offset[H5S_MAX_RANK];
@@ -686,9 +688,11 @@ H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout,
file_space->extent.u.simple.max[i]) goto fall_through;
if(mem_space->select.type==H5S_SEL_HYPERSLABS) {
mem_size=(mem_node->end[i]-mem_node->start[i])+1;
+ mem_off=mem_node->start[i];
} /* end if */
else {
mem_size=mem_space->extent.u.simple.size[i];
+ mem_off=0;
} /* end else */
if(file_space->select.type==H5S_SEL_HYPERSLABS) {
file_size=(file_node->end[i]-file_node->start[i])+1;
@@ -701,7 +705,7 @@ H5S_all_write(H5F_t *f, const struct H5O_layout_t *layout,
if (mem_size!=file_size) goto fall_through;
size[i] = file_size;
file_offset[i] = file_off;
- mem_offset[i] = 0;
+ mem_offset[i] = mem_off;
}
size[i] = elmt_size;
file_offset[i] = 0;