diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-22 20:21:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-22 20:21:51 (GMT) |
commit | 253ee36580536cb1ebcc51876ee841538d0a83eb (patch) | |
tree | 808502fbc18eecba4c0db8eafcd95ddddd04e345 /src/H5Sselect.c | |
parent | 6010b691f953b8aeb167d694ff09b5b1f88b14b1 (diff) | |
download | hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.zip hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.tar.gz hdf5-253ee36580536cb1ebcc51876ee841538d0a83eb.tar.bz2 |
[svn-r8409] Purpose:
Code optimization
Description:
Instead of dynamicly allocating various arrays for various pieces of
information about a selection or selection iterator, just use fixed size
array of size H5S_MAX_RANK (as the rest of the library does).
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.9 (sleipnir)
h5committest
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 902530f..10774d2 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -130,7 +130,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src) assert(src); /* Copy regular fields */ - dst->select=src->select; + HDmemcpy(&dst->select,&src->select,sizeof(H5S_select_t)); /* Need to copy order information still */ @@ -1147,16 +1147,16 @@ HDfprintf(stderr,"%s: Entering\n",FUNC); else if(space1->select.type==H5S_SEL_NONE || space2->select.type==H5S_SEL_NONE) { HGOTO_DONE(TRUE); } /* end if */ - else if((space1->select.type==H5S_SEL_HYPERSLABS && space1->select.sel_info.hslab.diminfo) - && (space2->select.type==H5S_SEL_HYPERSLABS && space2->select.sel_info.hslab.diminfo)) { + else if((space1->select.type==H5S_SEL_HYPERSLABS && space1->select.sel_info.hslab.diminfo_valid) + && (space2->select.type==H5S_SEL_HYPERSLABS && space2->select.sel_info.hslab.diminfo_valid)) { /* Check that the shapes are the same */ for (u=0; u<space1->extent.u.simple.rank; u++) { - if(space1->select.sel_info.hslab.diminfo[u].stride!=space2->select.sel_info.hslab.diminfo[u].stride) + if(space1->select.sel_info.hslab.opt_diminfo[u].stride!=space2->select.sel_info.hslab.opt_diminfo[u].stride) HGOTO_DONE(FALSE); - if(space1->select.sel_info.hslab.diminfo[u].count!=space2->select.sel_info.hslab.diminfo[u].count) + if(space1->select.sel_info.hslab.opt_diminfo[u].count!=space2->select.sel_info.hslab.opt_diminfo[u].count) HGOTO_DONE(FALSE); - if(space1->select.sel_info.hslab.diminfo[u].block!=space2->select.sel_info.hslab.diminfo[u].block) + if(space1->select.sel_info.hslab.opt_diminfo[u].block!=space2->select.sel_info.hslab.opt_diminfo[u].block) HGOTO_DONE(FALSE); } /* end for */ } /* end if */ |