summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-05 19:04:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-05 19:04:49 (GMT)
commit339a81a766d4d37e6535f0c8fad7c853b9a849e9 (patch)
tree0ac7b3415999db809156bcf213cd308ee07dc25a /src/H5Dio.c
parent353c881274a50c58d7ac9353616a9965f1549f2e (diff)
downloadhdf5-339a81a766d4d37e6535f0c8fad7c853b9a849e9.zip
hdf5-339a81a766d4d37e6535f0c8fad7c853b9a849e9.tar.gz
hdf5-339a81a766d4d37e6535f0c8fad7c853b9a849e9.tar.bz2
[svn-r8613] Purpose:
Refactor code Description: Move chunk and contiguous cached raw data from file information to dataset information. This simplifies a number of internal interfaces, aligns the code with it's purpose better and should allow more optimizations to the chunked data I/O performance. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) h5committest Misc. update:
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c82
1 files changed, 45 insertions, 37 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 2d6d016..77b9926 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -1088,9 +1088,11 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type,
H5S_NULL == H5S_GET_SIMPLE_EXTENT_TYPE(file_space) ||
dataset->layout.type==H5D_COMPACT);
H5_CHECK_OVERFLOW(nelmts,hsize_t,size_t);
- status = (sconv->read)(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, (H5D_storage_t *)&(dataset->efl), (size_t)nelmts, H5T_get_size(dataset->type),
- file_space, mem_space, dxpl_cache, dxpl_id, buf/*out*/);
+ status = (sconv->read)(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, (H5D_storage_t *)&(dataset->efl),
+ (size_t)nelmts, H5T_get_size(dataset->type),
+ file_space, mem_space,
+ buf/*out*/);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[1].read_timer), &timer);
sconv->stats[1].read_nbytes += nelmts * H5T_get_size(dataset->type);
@@ -1185,9 +1187,10 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type,
|| (dataset->layout.type==H5D_CHUNKED && H5F_addr_defined(dataset->layout.u.chunk.addr)))
|| dataset->efl.nused>0 ||
dataset->layout.type==H5D_COMPACT);
- n = H5S_select_fgath(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, (H5D_storage_t *)&(dataset->efl), file_space,
- &file_iter, smine_nelmts, dxpl_cache, dxpl_id, tconv_buf/*out*/);
+ n = H5S_select_fgath(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, (H5D_storage_t *)&(dataset->efl),
+ file_space, &file_iter, smine_nelmts,
+ tconv_buf/*out*/);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[1].gath_timer), &timer);
@@ -1220,11 +1223,8 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type,
/* Do the data transform after the conversion (since we're using type mem_type) */
if(!H5Z_xform_noop(dxpl_cache->data_xform_prop))
- {
if( H5Z_xform_eval(dxpl_cache->data_xform_prop, tconv_buf, smine_nelmts, mem_type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
- }
- /* end of LA additions */
/*
* Scatter the data into memory.
@@ -1313,7 +1313,7 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5
hsize_t smine_start; /*strip mine start loc */
hsize_t n, smine_nelmts; /*elements per strip */
herr_t ret_value = SUCCEED; /*return value */
-
+
FUNC_ENTER_NOAPI_NOINIT(H5D_contig_write)
/*
@@ -1325,9 +1325,11 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5
H5_timer_begin(&timer);
#endif
H5_CHECK_OVERFLOW(nelmts,hsize_t,size_t);
- status = (sconv->write)(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, (H5D_storage_t *)&(dataset->efl), (size_t)nelmts, H5T_get_size(dataset->type),
- file_space, mem_space, dxpl_cache, dxpl_id, buf);
+ status = (sconv->write)(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, (H5D_storage_t *)&(dataset->efl),
+ (size_t)nelmts, H5T_get_size(dataset->type),
+ file_space, mem_space,
+ buf);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[0].write_timer), &timer);
sconv->stats[0].write_nbytes += nelmts * H5T_get_size(mem_type);
@@ -1435,9 +1437,10 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5
#ifdef H5S_DEBUG
H5_timer_begin(&timer);
#endif
- n = H5S_select_fgath(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, (H5D_storage_t *)&(dataset->efl), file_space,
- &bkg_iter, smine_nelmts, dxpl_cache, dxpl_id, bkg_buf/*out*/);
+ n = H5S_select_fgath(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, (H5D_storage_t *)&(dataset->efl),
+ file_space, &bkg_iter, smine_nelmts,
+ bkg_buf/*out*/);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[0].bkg_timer), &timer);
@@ -1456,11 +1459,8 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5
/* Do the data transform after the type conversion (since we're using dataset->type). */
if(!H5Z_xform_noop(dxpl_cache->data_xform_prop))
- {
if( H5Z_xform_eval(dxpl_cache->data_xform_prop, tconv_buf, smine_nelmts, dataset->type) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
- }
- /* End of LA modifications */
/*
* Scatter the data out to the file.
@@ -1468,9 +1468,10 @@ H5D_contig_write(hsize_t nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5
#ifdef H5S_DEBUG
H5_timer_begin(&timer);
#endif
- status = H5S_select_fscat(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, (H5D_storage_t *)&(dataset->efl), file_space, &file_iter,
- smine_nelmts, dxpl_cache, dxpl_id, tconv_buf);
+ status = H5S_select_fscat(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, (H5D_storage_t *)&(dataset->efl),
+ file_space, &file_iter, smine_nelmts,
+ tconv_buf);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[0].scat_timer), &timer);
sconv->stats[0].scat_nbytes += smine_nelmts * dst_type_size;
@@ -1591,9 +1592,11 @@ UNUSED
store.chunk.index = chunk_info->index;
/* Perform the actual read operation */
- status = (sconv->read)(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, &store, chunk_info->chunk_points, H5T_get_size(dataset->type),
- chunk_info->fspace, chunk_info->mspace, dxpl_cache, dxpl_id, buf);
+ status = (sconv->read)(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, &store,
+ chunk_info->chunk_points, H5T_get_size(dataset->type),
+ chunk_info->fspace, chunk_info->mspace,
+ buf);
/* Check return value from optimized read */
if (status<0)
@@ -1707,9 +1710,10 @@ UNUSED
assert(((dataset->layout.type==H5D_CONTIGUOUS && H5F_addr_defined(dataset->layout.u.contig.addr))
|| (dataset->layout.type==H5D_CHUNKED && H5F_addr_defined(dataset->layout.u.chunk.addr)))
|| dataset->efl.nused>0 || dataset->layout.type==H5D_COMPACT);
- n = H5S_select_fgath(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, &store, chunk_info->fspace,
- &file_iter, smine_nelmts, dxpl_cache, dxpl_id, tconv_buf/*out*/);
+ n = H5S_select_fgath(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, &store,
+ chunk_info->fspace, &file_iter, smine_nelmts,
+ tconv_buf/*out*/);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[1].gath_timer), &timer);
@@ -1921,9 +1925,11 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
store.chunk.index = chunk_info->index;
/* Perform the actual write operation */
- status = (sconv->write)(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, &store, chunk_info->chunk_points, H5T_get_size(dataset->type),
- chunk_info->fspace, chunk_info->mspace, dxpl_cache, dxpl_id, buf);
+ status = (sconv->write)(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, &store,
+ chunk_info->chunk_points, H5T_get_size(dataset->type),
+ chunk_info->fspace, chunk_info->mspace,
+ buf);
/* Check return value from optimized write */
if (status<0)
@@ -2068,9 +2074,10 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
#ifdef H5S_DEBUG
H5_timer_begin(&timer);
#endif
- n = H5S_select_fgath(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, &store, chunk_info->fspace,
- &bkg_iter, smine_nelmts, dxpl_cache, dxpl_id, bkg_buf/*out*/);
+ n = H5S_select_fgath(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, &store,
+ chunk_info->fspace, &bkg_iter, smine_nelmts,
+ bkg_buf/*out*/);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[0].bkg_timer), &timer);
@@ -2099,9 +2106,10 @@ nelmts, H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
#ifdef H5S_DEBUG
H5_timer_begin(&timer);
#endif
- status = H5S_select_fscat(dataset->ent.file, &(dataset->layout),
- &dataset->dcpl_cache, &store, chunk_info->fspace,
- &file_iter, smine_nelmts, dxpl_cache, dxpl_id, tconv_buf);
+ status = H5S_select_fscat(dataset->ent.file, dxpl_cache, dxpl_id,
+ dataset, &store,
+ chunk_info->fspace, &file_iter, smine_nelmts,
+ tconv_buf);
#ifdef H5S_DEBUG
H5_timer_end(&(sconv->stats[0].scat_timer), &timer);