summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-18 21:32:55 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-18 21:32:55 (GMT)
commitb7a6535650cd0317e3aee1bb62a96664b38e5304 (patch)
treea88c6b8668f76983b9b0acf4cf0a57845c78d110 /src/H5Dio.c
parent33f70a817aba7a4dd020fb29a187c53ba05e157c (diff)
parenta07c8f924703bdf3d1654b59cabf847f5d0f2683 (diff)
downloadhdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.zip
hdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.tar.gz
hdf5-b7a6535650cd0317e3aee1bb62a96664b38e5304.tar.bz2
[svn-r22297] merge from trunk
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 7a58c4a..31dff83 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -51,19 +51,19 @@
/********************/
/* Setup/teardown routines */
-static herr_t H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
+static herr_t H5D__ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
hid_t dxpl_id, const H5D_type_info_t *type_info, H5D_storage_t *store,
H5D_io_info_t *io_info);
-static herr_t H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
+static herr_t H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
H5D_type_info_t *type_info);
#ifdef H5_HAVE_PARALLEL
-static herr_t H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
+static herr_t H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
hid_t dxpl_id, const H5S_t *file_space, const H5S_t *mem_space,
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
-static herr_t H5D_ioinfo_term(H5D_io_info_t *io_info);
+static herr_t H5D__ioinfo_term(H5D_io_info_t *io_info);
#endif /* H5_HAVE_PARALLEL */
-static herr_t H5D_typeinfo_term(const H5D_type_info_t *type_info);
+static herr_t H5D__typeinfo_term(const H5D_type_info_t *type_info);
/*********************/
@@ -199,7 +199,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5D_read
+ * Function: H5D__read
*
* Purpose: Reads (part of) a DATASET into application memory BUF. See
* H5Dread() for complete details.
@@ -212,7 +212,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
+H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
const H5S_t *file_space, hid_t dxpl_id, void *buf/*out*/)
{
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
@@ -243,7 +243,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset && dataset->oloc.file);
@@ -257,11 +257,11 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5_ASSIGN_OVERFLOW(nelmts,snelmts,hssize_t,hsize_t);
/* Fill the DXPL cache values for later use */
- if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Set up datatype info for operation */
- if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
+ if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
type_info_init = TRUE;
@@ -340,7 +340,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HGOTO_DONE(SUCCEED)
/* Go fill the user's selection with the dataset's fill value */
- if(H5D_fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type, mem_space, dxpl_id) < 0)
+ if(H5D__fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type, mem_space, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed")
else
HGOTO_DONE(SUCCEED)
@@ -349,7 +349,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Set up I/O operation */
io_info.op_type = H5D_IO_OP_READ;
io_info.u.rbuf = buf;
- if(H5D_ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
+ if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation")
#ifdef H5_HAVE_PARALLEL
io_info_init = TRUE;
@@ -369,7 +369,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
#ifdef H5_HAVE_PARALLEL
/* Adjust I/O info for any parallel I/O */
- if(H5D_ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
+ if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
#endif /*H5_HAVE_PARALLEL*/
@@ -384,11 +384,11 @@ done:
#ifdef H5_HAVE_PARALLEL
/* Shut down io_info struct */
if(io_info_init)
- if(H5D_ioinfo_term(&io_info) < 0)
+ if(H5D__ioinfo_term(&io_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
+ if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
/* discard projected mem space if it was created */
@@ -397,11 +397,11 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_read() */
+} /* end H5D__read() */
/*-------------------------------------------------------------------------
- * Function: H5D_write
+ * Function: H5D__write
*
* Purpose: Writes (part of) a DATASET to a file from application memory
* BUF. See H5Dwrite() for complete details.
@@ -414,7 +414,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
+H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
const H5S_t *file_space, hid_t dxpl_id, const void *buf)
{
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
@@ -445,7 +445,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
+ FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
/* check args */
HDassert(dataset && dataset->oloc.file);
@@ -463,11 +463,11 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Fill the DXPL cache values for later use */
- if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
+ if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Set up datatype info for operation */
- if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
+ if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
type_info_init = TRUE;
@@ -572,14 +572,14 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
full_overwrite = (hbool_t)((hsize_t)file_nelmts == nelmts ? TRUE : FALSE);
/* Allocate storage */
- if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
+ if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
} /* end if */
/* Set up I/O operation */
io_info.op_type = H5D_IO_OP_WRITE;
io_info.u.wbuf = buf;
- if(H5D_ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
+ if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation")
#ifdef H5_HAVE_PARALLEL
io_info_init = TRUE;
@@ -593,7 +593,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
#ifdef H5_HAVE_PARALLEL
/* Adjust I/O info for any parallel I/O */
- if(H5D_ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
+ if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
#endif /*H5_HAVE_PARALLEL*/
@@ -625,11 +625,11 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
#ifdef H5_HAVE_PARALLEL
/* Shut down io_info struct */
- if(io_info_init && H5D_ioinfo_term(&io_info) < 0)
+ if(io_info_init && H5D__ioinfo_term(&io_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
#endif /*H5_HAVE_PARALLEL*/
/* Shut down datatype info for operation */
- if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
+ if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
/* discard projected mem space if it was created */
@@ -638,11 +638,11 @@ done:
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
-} /* end H5D_write() */
+} /* end H5D__write() */
/*-------------------------------------------------------------------------
- * Function: H5D_ioinfo_init
+ * Function: H5D__ioinfo_init
*
* Purpose: Routine for determining correct I/O operations for
* each I/O action.
@@ -655,10 +655,10 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
+H5D__ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
const H5D_type_info_t *type_info, H5D_storage_t *store, H5D_io_info_t *io_info)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(dset);
@@ -686,15 +686,15 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
* If there is no data transform or type conversion then read directly into
* the application's buffer. This saves at least one mem-to-mem copy.
*/
- io_info->io_ops.single_read = H5D_select_read;
- io_info->io_ops.single_write = H5D_select_write;
+ io_info->io_ops.single_read = H5D__select_read;
+ io_info->io_ops.single_write = H5D__select_write;
} /* end if */
else {
/*
* This is the general case (type conversion, usually).
*/
- io_info->io_ops.single_read = H5D_scatgath_read;
- io_info->io_ops.single_write = H5D_scatgath_write;
+ io_info->io_ops.single_read = H5D__scatgath_read;
+ io_info->io_ops.single_write = H5D__scatgath_write;
} /* end else */
#ifdef H5_HAVE_PARALLEL
@@ -703,11 +703,11 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
#endif /* H5_HAVE_PARALLEL */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_ioinfo_init() */
+} /* end H5D__ioinfo_init() */
/*-------------------------------------------------------------------------
- * Function: H5D_typeinfo_init
+ * Function: H5D__typeinfo_init
*
* Purpose: Routine for determining correct datatype information for
* each I/O action.
@@ -720,7 +720,7 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
+H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
H5D_type_info_t *type_info)
{
@@ -728,7 +728,7 @@ H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
const H5T_t *dst_type; /* Destination datatype */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(type_info);
@@ -859,12 +859,12 @@ H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_typeinfo_init() */
+} /* end H5D__typeinfo_init() */
#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
- * Function: H5D_ioinfo_adjust
+ * Function: H5D__ioinfo_adjust
*
* Purpose: Adjust operation's I/O info for any parallel I/O
*
@@ -876,7 +876,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
+H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
const H5S_t *file_space, const H5S_t *mem_space,
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm)
{
@@ -885,7 +885,7 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
H5D_mpio_actual_io_mode_t actual_io_mode; /* performed io mode */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(dset);
@@ -925,7 +925,7 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator")
/* Check if we can set direct MPI-IO read/write functions */
- if((opt = H5D_mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0)
+ if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ")
/* Check if we can use the optimized parallel I/O routines */
@@ -933,8 +933,8 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
/* Override the I/O op pointers to the MPI-specific routines */
io_info->io_ops.multi_read = dset->shared->layout.ops->par_read;
io_info->io_ops.multi_write = dset->shared->layout.ops->par_write;
- io_info->io_ops.single_read = H5D_mpio_select_read;
- io_info->io_ops.single_write = H5D_mpio_select_write;
+ io_info->io_ops.single_read = H5D__mpio_select_read;
+ io_info->io_ops.single_write = H5D__mpio_select_write;
} /* end if */
else {
/* If we won't be doing collective I/O, but the user asked for
@@ -952,11 +952,11 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_ioinfo_adjust() */
+} /* end H5D__ioinfo_adjust() */
/*-------------------------------------------------------------------------
- * Function: H5D_ioinfo_term
+ * Function: H5D__ioinfo_term
*
* Purpose: Common logic for terminating an I/O info object
* (Only used for restoring MPI transfer mode currently)
@@ -969,11 +969,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_ioinfo_term(H5D_io_info_t *io_info)
+H5D__ioinfo_term(H5D_io_info_t *io_info)
{
herr_t ret_value = SUCCEED; /*return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Check if we used the MPI VFD for the I/O */
if(io_info->using_mpi_vfd) {
@@ -1006,13 +1006,13 @@ H5D_ioinfo_term(H5D_io_info_t *io_info)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_ioinfo_term() */
+} /* end H5D__ioinfo_term() */
#endif /* H5_HAVE_PARALLEL */
/*-------------------------------------------------------------------------
- * Function: H5D_typeinfo_term
+ * Function: H5D__typeinfo_term
*
* Purpose: Common logic for terminating a type info object
*
@@ -1024,9 +1024,9 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_typeinfo_term(const H5D_type_info_t *type_info)
+H5D__typeinfo_term(const H5D_type_info_t *type_info)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Check for releasing datatype conversion & background buffers */
if(type_info->tconv_buf_allocated) {
@@ -1039,5 +1039,5 @@ H5D_typeinfo_term(const H5D_type_info_t *type_info)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_typeinfo_term() */
+} /* end H5D__typeinfo_term() */