[svn-r202] Changed H5Pget/set_hyperslab routines to int, size_t, size_t paramters

This commit is contained in:
Quincey Koziol 1998-01-30 09:56:28 -05:00
parent 7e7e5513e1
commit e6e056ebbd

View File

@ -89,15 +89,10 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout,
const H5P_number_t *numbering, intn start, intn nelmts,
void *buf/*out*/)
{
size_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
int file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
size_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
size_t zero[H5O_LAYOUT_NDIMS]; /*zero */
size_t sample[H5O_LAYOUT_NDIMS]; /*hyperslab sampling */
#ifndef LATER
intn file_offset_signed[H5O_LAYOUT_NDIMS];
intn hsize_signed[H5O_LAYOUT_NDIMS];
intn sample_signed[H5O_LAYOUT_NDIMS];
#endif
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -125,26 +120,10 @@ H5P_simp_fgath (H5F_t *f, const struct H5O_layout_t *layout,
* currently pass sample information into H5F_arr_read() much less
* H5F_istore_read().
*/
#ifdef LATER
if ((space_ndims=H5P_get_hyperslab (file_space, file_offset,
hsize, sample))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0,
"unable to retrieve hyperslab parameters");
#else
if ((space_ndims=H5P_get_hyperslab (file_space, file_offset_signed,
hsize_signed, sample_signed))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0,
"unable to retrieve hyperslab parameters");
}
for (i=0; i<space_ndims; i++) {
assert (file_offset_signed[i]>=0);
file_offset[i] = file_offset_signed[i];
assert (hsize_signed[i]>0);
hsize[i] = hsize_signed[i];
assert (sample_signed[i]>0);
sample[i] = sample_signed[i];
}
#endif
for (i=0; i<space_ndims; i++) {
if (sample[i]!=1) {
HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, 0,
@ -197,11 +176,6 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size,
size_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
size_t zero[H5O_LAYOUT_NDIMS]; /*zero */
size_t sample[H5O_LAYOUT_NDIMS]; /*hyperslab sampling */
#ifndef LATER
intn mem_offset_signed[H5O_LAYOUT_NDIMS];
intn hsize_signed[H5O_LAYOUT_NDIMS];
intn sample_signed[H5O_LAYOUT_NDIMS];
#endif
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -227,27 +201,11 @@ H5P_simp_mscat (const void *tconv_buf, size_t elmt_size,
* only handle hyperslabs with unit sample because there's currently no
* way to pass sample information to H5V_hyper_copy().
*/
#ifdef LATER
if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset, hsize,
sample))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to retrieve hyperslab parameters");
}
#else
if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset_signed,
hsize_signed, sample_signed))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to retrieve hyperslab parameters");
}
for (i=0; i<space_ndims; i++) {
assert (mem_offset_signed[i]>=0);
mem_offset[i] = mem_offset_signed[i];
assert (hsize_signed[i]>0);
hsize[i] = hsize_signed[i];
assert (sample_signed[i]>0);
sample[i] = sample_signed[i];
}
#endif
for (i=0; i<space_ndims; i++) {
if (sample[i]!=1) {
HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,
@ -308,11 +266,6 @@ H5P_simp_mgath (const void *buf, size_t elmt_size,
size_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
size_t zero[H5O_LAYOUT_NDIMS]; /*zero */
size_t sample[H5O_LAYOUT_NDIMS]; /*hyperslab sampling */
#ifndef LATER
intn mem_offset_signed[H5O_LAYOUT_NDIMS];
intn hsize_signed[H5O_LAYOUT_NDIMS];
intn sample_signed[H5O_LAYOUT_NDIMS];
#endif
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@ -338,27 +291,11 @@ H5P_simp_mgath (const void *buf, size_t elmt_size,
* only handle hyperslabs with unit sample because there's currently no
* way to pass sample information to H5V_hyper_copy().
*/
#ifdef LATER
if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset, hsize,
sample))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, 0,
"unable to retrieve hyperslab parameters");
}
#else
if ((space_ndims=H5P_get_hyperslab (mem_space, mem_offset_signed,
hsize_signed, sample_signed))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to retrieve hyperslab parameters");
}
for (i=0; i<space_ndims; i++) {
assert (mem_offset_signed[i]>=0);
mem_offset[i] = mem_offset_signed[i];
assert (hsize_signed[i]>0);
hsize[i] = hsize_signed[i];
assert (sample_signed[i]>0);
sample[i] = sample_signed[i];
}
#endif
for (i=0; i<space_ndims; i++) {
if (sample[i]!=1) {
HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, 0,
@ -418,11 +355,6 @@ H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout,
size_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
size_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */
size_t sample[H5O_LAYOUT_NDIMS]; /*hyperslab sampling */
#ifndef LATER
intn file_offset_signed[H5O_LAYOUT_NDIMS];
intn hsize_signed[H5O_LAYOUT_NDIMS];
intn sample_signed[H5O_LAYOUT_NDIMS];
#endif
intn space_ndims; /*space dimensionality */
intn i; /*counters */
@ -450,27 +382,11 @@ H5P_simp_fscat (H5F_t *f, const struct H5O_layout_t *layout,
* currently pass sample information into H5F_arr_read() much less
* H5F_istore_read().
*/
#ifdef LATER
if ((space_ndims=H5P_get_hyperslab (file_space, file_offset, hsize,
sample))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to retrieve hyperslab parameters");
}
#else
if ((space_ndims=H5P_get_hyperslab (file_space, file_offset_signed,
hsize_signed, sample_signed))<0) {
HRETURN_ERROR (H5E_DATASPACE, H5E_CANTINIT, FAIL,
"unable to retrieve hyperslab parameters");
}
for (i=0; i<space_ndims; i++) {
assert (file_offset_signed[i]>=0);
file_offset[i] = file_offset_signed[i];
assert (hsize_signed[i]>0);
hsize[i] = hsize_signed[i];
assert (sample_signed[i]>0);
sample[i] = sample_signed[i];
}
#endif
for (i=0; i<space_ndims; i++) {
if (sample[i]!=1) {
HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,