summaryrefslogtreecommitdiffstats
path: root/src/H5Dcompact.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-04-16 21:20:26 (GMT)
commita07c8f924703bdf3d1654b59cabf847f5d0f2683 (patch)
tree976dad3d894cfab9b88972a9e85d6bdfcf248f0d /src/H5Dcompact.c
parentbdb6e538ac8c4eae6413b2a7583289644dc9c90f (diff)
downloadhdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.zip
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.gz
hdf5-a07c8f924703bdf3d1654b59cabf847f5d0f2683.tar.bz2
[svn-r22287] Description:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5Dcompact.c')
-rw-r--r--src/H5Dcompact.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 33a0dd6..c692c2b 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -58,18 +58,18 @@
/********************/
/* Layout operation callbacks */
-static herr_t H5D_compact_construct(H5F_t *f, H5D_t *dset);
-static hbool_t H5D_compact_is_space_alloc(const H5O_storage_t *storage);
-static herr_t H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
+static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
+static hbool_t H5D__compact_is_space_alloc(const H5O_storage_t *storage);
+static herr_t H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
H5D_chunk_map_t *cm);
-static ssize_t H5D_compact_readvv(const H5D_io_info_t *io_info,
+static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
-static ssize_t H5D_compact_writevv(const H5D_io_info_t *io_info,
+static ssize_t H5D__compact_writevv(const H5D_io_info_t *io_info,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
-static herr_t H5D_compact_flush(H5D_t *dset, hid_t dxpl_id);
+static herr_t H5D__compact_flush(H5D_t *dset, hid_t dxpl_id);
/*********************/
@@ -78,19 +78,19 @@ static herr_t H5D_compact_flush(H5D_t *dset, hid_t dxpl_id);
/* Compact storage layout I/O ops */
const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
- H5D_compact_construct,
+ H5D__compact_construct,
NULL,
- H5D_compact_is_space_alloc,
- H5D_compact_io_init,
- H5D_contig_read,
- H5D_contig_write,
+ H5D__compact_is_space_alloc,
+ H5D__compact_io_init,
+ H5D__contig_read,
+ H5D__contig_write,
#ifdef H5_HAVE_PARALLEL
NULL,
NULL,
#endif /* H5_HAVE_PARALLEL */
- H5D_compact_readvv,
- H5D_compact_writevv,
- H5D_compact_flush,
+ H5D__compact_readvv,
+ H5D__compact_writevv,
+ H5D__compact_flush,
NULL
}};
@@ -105,7 +105,7 @@ H5FL_BLK_EXTERN(type_conv);
/*-------------------------------------------------------------------------
- * Function: H5D_compact_fill
+ * Function: H5D__compact_fill
*
* Purpose: Write fill values to a compactly stored dataset.
*
@@ -117,13 +117,13 @@ H5FL_BLK_EXTERN(type_conv);
*-------------------------------------------------------------------------
*/
herr_t
-H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
+H5D__compact_fill(H5D_t *dset, hid_t dxpl_id)
{
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 */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
@@ -134,7 +134,7 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
/* Initialize the fill value buffer */
/* (use the compact dataset storage buffer as the fill value buffer) */
- if(H5D_fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf,
+ if(H5D__fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf,
NULL, NULL, NULL, NULL,
&dset->shared->dcpl_cache.fill, dset->shared->type,
dset->shared->type_id, (size_t)0, dset->shared->layout.storage.u.compact.size, dxpl_id) < 0)
@@ -144,20 +144,20 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
/* Check for VL datatype & non-default fill value */
if(fb_info.has_vlen_fill_type)
/* Fill the buffer with VL datatype fill values */
- if(H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
+ if(H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
done:
/* Release the fill buffer info, if it's been initialized */
- if(fb_info_init && H5D_fill_term(&fb_info) < 0)
+ if(fb_info_init && H5D__fill_term(&fb_info) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_fill() */
+} /* end H5D__compact_fill() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_construct
+ * Function: H5D__compact_construct
*
* Purpose: Constructs new compact layout information for dataset
*
@@ -169,7 +169,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_compact_construct(H5F_t *f, H5D_t *dset)
+H5D__compact_construct(H5F_t *f, H5D_t *dset)
{
hssize_t stmp_size; /* Temporary holder for raw data size */
hsize_t tmp_size; /* Temporary holder for raw data size */
@@ -180,7 +180,7 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity checks */
HDassert(f);
@@ -207,17 +207,17 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
/* Verify data size is smaller than maximum header message size
* (64KB) minus other layout message fields.
*/
- max_comp_data_size = H5O_MESG_MAX_SIZE - H5D_layout_meta_size(f, &(dset->shared->layout), FALSE);
+ max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), FALSE);
if(dset->shared->layout.storage.u.compact.size > max_comp_data_size)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "compact dataset size is bigger than header message maximum size")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_construct() */
+} /* end H5D__compact_construct() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_is_space_alloc
+ * Function: H5D__compact_is_space_alloc
*
* Purpose: Query if space is allocated for layout
*
@@ -229,20 +229,20 @@ done:
*-------------------------------------------------------------------------
*/
static hbool_t
-H5D_compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
+H5D__compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(storage);
/* Compact storage is currently always allocated */
FUNC_LEAVE_NOAPI(TRUE)
-} /* end H5D_compact_is_space_alloc() */
+} /* end H5D__compact_is_space_alloc() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_io_init
+ * Function: H5D__compact_io_init
*
* Purpose: Performs initialization before any sort of I/O on the raw data
*
@@ -254,21 +254,21 @@ H5D_compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
+H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
H5D_chunk_map_t UNUSED *cm)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5D_compact_io_init() */
+} /* end H5D__compact_io_init() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_readvv
+ * Function: H5D__compact_readvv
*
* Purpose: Reads some data vectors from a dataset into a buffer.
* The data is in compact dataset. The address is relative
@@ -286,13 +286,13 @@ H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D_compact_readvv(const H5D_io_info_t *io_info,
+H5D__compact_readvv(const H5D_io_info_t *io_info,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(io_info);
@@ -302,11 +302,11 @@ H5D_compact_readvv(const H5D_io_info_t *io_info,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_readvv() */
+} /* end H5D__compact_readvv() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_writevv
+ * Function: H5D__compact_writevv
*
* Purpose: Writes some data vectors from a dataset into a buffer.
* The data is in compact dataset. The address is relative
@@ -327,13 +327,13 @@ done:
*-------------------------------------------------------------------------
*/
static ssize_t
-H5D_compact_writevv(const H5D_io_info_t *io_info,
+H5D__compact_writevv(const H5D_io_info_t *io_info,
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(io_info);
@@ -346,11 +346,11 @@ H5D_compact_writevv(const H5D_io_info_t *io_info,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_writevv() */
+} /* end H5D__compact_writevv() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_flush
+ * Function: H5D__compact_flush
*
* Purpose: Writes dirty compact data to object header
*
@@ -362,11 +362,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_compact_flush(H5D_t *dset, hid_t dxpl_id)
+H5D__compact_flush(H5D_t *dset, hid_t dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(dset);
@@ -380,11 +380,11 @@ H5D_compact_flush(H5D_t *dset, hid_t dxpl_id)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_flush() */
+} /* end H5D__compact_flush() */
/*-------------------------------------------------------------------------
- * Function: H5D_compact_copy
+ * Function: H5D__compact_copy
*
* Purpose: Copy compact storage raw data from SRC file to DST file.
*
@@ -396,7 +396,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
+H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
H5O_storage_compact_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info,
hid_t dxpl_id)
{
@@ -409,7 +409,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
hid_t buf_sid = -1; /* ID for buffer dataspace */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(f_src);
@@ -574,5 +574,5 @@ done:
bkg = H5FL_BLK_FREE(type_conv, bkg);
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5D_compact_copy() */
+} /* end H5D__compact_copy() */