diff options
author | Albert Cheng <acheng@hdfgroup.org> | 1999-05-25 21:29:31 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 1999-05-25 21:29:31 (GMT) |
commit | ac830927fbda984086d7bd601282c5f3e5478176 (patch) | |
tree | d516c754a10ce7824f141e1bc82280977fab24f4 /src/H5S.c | |
parent | 9282a3e3575d7e3af855bea6ddd4d1a0ba511671 (diff) | |
download | hdf5-ac830927fbda984086d7bd601282c5f3e5478176.zip hdf5-ac830927fbda984086d7bd601282c5f3e5478176.tar.gz hdf5-ac830927fbda984086d7bd601282c5f3e5478176.tar.bz2 |
[svn-r1277] Added additional checks into the dataspace code to determine if the hyperslabs
being written out are contiguous in memory and on disk and write/read them as
one I/O operation (if the datatypes don't require conversion). This should be
a good performance boost for those situations. It's especially needed on the
ASCI Red (TFlops) machine. - QAK (from Albert's account on modi4 :-)
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1482,6 +1482,7 @@ H5S_conv_t * H5S_find (const H5S_t *mem_space, const H5S_t *file_space) { size_t i; + htri_t c1,c2; H5S_conv_t *path; FUNC_ENTER (H5S_find, NULL); @@ -1537,8 +1538,13 @@ H5S_find (const H5S_t *mem_space, const H5S_t *file_space) /* * Initialize direct read/write functions */ - if (H5S_SEL_ALL==file_space->select.type && - H5S_SEL_ALL==mem_space->select.type) { + c1=H5S_select_contiguous(file_space); + c2=H5S_select_contiguous(mem_space); + if(c1==FAIL || c2==FAIL) + HRETURN_ERROR(H5E_DATASPACE, H5E_INTERNAL, NULL, + "invalid check for contiguous dataspace "); + + if (c1==TRUE && c2==TRUE) { path->read = H5S_all_read; path->write = H5S_all_write; } |