summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-09-23 21:04:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-09-23 21:04:46 (GMT)
commit84540ce6d1708e98c152276f524c938435da804c (patch)
treebc9a3f4f5f57c8c1b41f88dafb11c9b107ad8623 /src/H5Dchunk.c
parent308982f2359c32277144636d1f62cf20af1b0972 (diff)
downloadhdf5-84540ce6d1708e98c152276f524c938435da804c.zip
hdf5-84540ce6d1708e98c152276f524c938435da804c.tar.gz
hdf5-84540ce6d1708e98c152276f524c938435da804c.tar.bz2
[svn-r19477] Description:
Bring r19476 from trunk to 1.8 branch: Polish the vectorized memory <-> memory and memory <-> file I/O routines to speed them up a little bit (~10%) Tested on: FreeBSD/32 6.3 (duty) in debug mode (h5committested on trunk)
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 7e3bf90..9dcd0ec 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -4949,9 +4949,8 @@ H5D_nonexistent_readvv(const H5D_io_info_t *io_info,
H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- ssize_t bytes_processed = 0; /* Eventual return value */
size_t u, v; /* Local index variables */
- ssize_t ret_value; /* Return value */
+ ssize_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5D_nonexistent_readvv)
@@ -4993,27 +4992,26 @@ H5D_nonexistent_readvv(const H5D_io_info_t *io_info,
/* Update source information */
chunk_len_arr[v] -= size;
- chunk_offset_arr[v] += size;
if(chunk_len_arr[v] == 0)
v++;
+ else
+ chunk_offset_arr[v] += size;
/* Update destination information */
mem_len_arr[u] -= size;
- mem_offset_arr[u] += size;
if(mem_len_arr[u] == 0)
u++;
+ else
+ mem_offset_arr[u] += size;
/* Increment number of bytes copied */
- bytes_processed += (ssize_t)size;
+ ret_value += (ssize_t)size;
} /* end for */
/* Update current sequence vectors */
*mem_curr_seq = u;
*chunk_curr_seq = v;
- /* Set return value */
- ret_value = bytes_processed;
-
done:
/* Release the fill buffer info, if it's been initialized */
if(fb_info_init && H5D_fill_term(&fb_info) < 0)