diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-15 21:54:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-15 21:54:30 (GMT) |
commit | 4a17aff4085ad6ee265b95730aca3f493056dec8 (patch) | |
tree | 8bfb665c6d95a2e3520fa1bb0ff54d95aff3923f /src/H5Dselect.c | |
parent | 853ae26333592faf69cd8c454ef92ffea8549df5 (diff) | |
download | hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.zip hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.gz hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.bz2 |
Add API context interface and use it throughout the library.
Diffstat (limited to 'src/H5Dselect.c')
-rw-r--r-- | src/H5Dselect.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5Dselect.c b/src/H5Dselect.c index b4d0515..0ec3423 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -28,6 +28,7 @@ /* Headers */ /***********/ #include "H5private.h" /* Generic Functions */ +#include "H5CXprivate.h" /* API Contexts */ #include "H5Dpkg.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ @@ -99,6 +100,7 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, size_t curr_file_seq; /* Current file sequence to operate on */ size_t mem_nseq; /* Number of sequences generated in the file */ size_t file_nseq; /* Number of sequences generated in memory */ + size_t dxpl_vec_size; /* Vector length from API context's DXPL */ size_t vec_size; /* Vector length */ ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */ herr_t ret_value = SUCCEED; /* Return value */ @@ -109,12 +111,15 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, HDassert(io_info); HDassert(io_info->dset); HDassert(io_info->store); - HDassert(TRUE == H5P_isa_class(io_info->raw_dxpl_id, H5P_DATASET_XFER)); HDassert(io_info->u.rbuf); + /* Get info from API context */ + if(H5CX_get_vec_size(&dxpl_vec_size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve I/O vector size") + /* Allocate the vector I/O arrays */ - if(io_info->dxpl_cache->vec_size > H5D_IO_VECTOR_SIZE) - vec_size = io_info->dxpl_cache->vec_size; + if(dxpl_vec_size > H5D_IO_VECTOR_SIZE) + vec_size = dxpl_vec_size; else vec_size = H5D_IO_VECTOR_SIZE; if(NULL == (mem_len = H5FL_SEQ_MALLOC(size_t, vec_size))) |