summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-06-25 19:36:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-06-25 19:36:54 (GMT)
commit21403c5ec467bea879c1887ec5c9429a26458942 (patch)
tree4ca90b8969b8de21213f4ce3b83b629538c6c1c0 /src/H5Shyper.c
parent78f622071f1199581775479811b5d730d14f0779 (diff)
downloadhdf5-21403c5ec467bea879c1887ec5c9429a26458942.zip
hdf5-21403c5ec467bea879c1887ec5c9429a26458942.tar.gz
hdf5-21403c5ec467bea879c1887ec5c9429a26458942.tar.bz2
[svn-r1385] Updated H5Rdereference, H5Rget_object_type and H5Rget_region to accept a
location ID (i.e. a file or group ID) as well as the dataset ID. This should allow Dave to get the palettes stored in the file correctly and also enable Bob and/or Bruce's indexing stuff. This change should be folded into the documentation for these three functions for the release. Also, I fixed a number of bugs in the hyperslab and point selection iterators for H5Diterate and they are working correctly now.
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index ecef87c..50704bd 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -2992,7 +2992,7 @@ H5S_hyper_select_iterate_mem (intn dim, H5S_hyper_iter_info_t *iter_info)
size_t i; /* Counters */
intn j;
- FUNC_ENTER (H5S_hyper_mwrite, 0);
+ FUNC_ENTER (H5S_hyper_select_iterate_mem, 0);
assert(iter_info);
@@ -3010,6 +3010,8 @@ H5S_hyper_select_iterate_mem (intn dim, H5S_hyper_iter_info_t *iter_info)
/* (Which means that we've got a list of the regions in the fastest */
/* changing dimension and should input those regions) */
if((dim+2)==iter_info->space->extent.u.simple.rank) {
+ HDmemcpy(iter_info->mem_offset, iter_info->iter->hyp.pos,(iter_info->space->extent.u.simple.rank*sizeof(hssize_t)));
+ iter_info->mem_offset[iter_info->space->extent.u.simple.rank]=0;
/* Iterate over data from regions */
for(i=0; i<num_regions && user_ret==0; i++) {
@@ -3028,6 +3030,9 @@ H5S_hyper_select_iterate_mem (intn dim, H5S_hyper_iter_info_t *iter_info)
/* Subtract the element from the selected region (not implemented yet) */
+ /* Increment the coordinate offset */
+ iter_info->mem_offset[iter_info->space->extent.u.simple.rank-1]=j;
+
/* Advance the pointer in the buffer */
tmp_buf=((char *)tmp_buf+iter_info->elem_size);
} /* end for */
@@ -3122,7 +3127,7 @@ H5S_hyper_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t
assert(buf);
assert(space);
assert(operator);
- assert(H5I_DATATYPE != H5I_get_type(type_id));
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
/* Initialize these before any errors can occur */
HDmemset(&iter,0,sizeof(H5S_sel_iter_t));
@@ -3159,8 +3164,6 @@ H5S_hyper_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t
HDmemcpy(iter_info.mem_size, space->extent.u.simple.size, space->extent.u.simple.rank*sizeof(hsize_t));
iter_info.mem_size[space->extent.u.simple.rank]=iter_info.elem_size;
/* Copy the location of the region in the file */
- HDmemcpy(iter_info.mem_offset, iter.hyp.pos,(space->extent.u.simple.rank*sizeof(hssize_t)));
- iter_info.mem_offset[space->extent.u.simple.rank]=0;
iter_info.op=operator;
iter_info.op_data=operator_data;