Update versioning to next major version

This commit is contained in:
Allen Byrne 2019-09-25 17:28:17 -05:00
parent 46f81a33dd
commit b2f52d0b07
29 changed files with 1775 additions and 1718 deletions

View File

@ -646,9 +646,9 @@ if (H5_HAVE_PARALLEL)
endif ()
endif ()
#option (DEFAULT_API_VERSION "Enable v1.12 API (v16, v18, v110, v112)" "v112")
set (DEFAULT_API_VERSION "v112" CACHE STRING "Enable v1.12 API (v16, v18, v110, v112)")
set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112)
#option (DEFAULT_API_VERSION "Enable v1.14 API (v16, v18, v110, v112, v114)" "v114")
set (DEFAULT_API_VERSION "v114" CACHE STRING "Enable v1.14 API (v16, v18, v110, v112, v114)")
set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114)
#-----------------------------------------------------------------------------
# Option to use 1.6.x API
#-----------------------------------------------------------------------------
@ -684,6 +684,17 @@ if (DEFAULT_API_VERSION MATCHES "v112")
set (H5_USE_112_API_DEFAULT 1)
endif ()
#-----------------------------------------------------------------------------
# Option to use 1.14.x API
#-----------------------------------------------------------------------------
if (NOT DEFAULT_API_VERSION)
set (DEFAULT_API_VERSION "v114")
endif ()
set (H5_USE_114_API_DEFAULT 0)
if (DEFAULT_API_VERSION MATCHES "v114")
set (H5_USE_114_API_DEFAULT 1)
endif ()
#-----------------------------------------------------------------------------
# Include user macros
#-----------------------------------------------------------------------------

View File

@ -7,8 +7,8 @@ require 5.003;
# is added (like support for 1.4, etc), the min_sup_idx parameter will
# need to be decremented. - QAK)
# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, etc)
$max_idx = 6;
# Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, etc)
$max_idx = 7;
# Min. supported previous library version "index" (0 = v1.0, 1 = 1.2, etc)
$min_sup_idx = 3;

View File

@ -233,7 +233,7 @@ tar2cmakezip()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.zip $cmziptmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.zip $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir
cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir
@ -328,7 +328,7 @@ tar2cmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir
@ -411,7 +411,7 @@ tar2hpccmaketgz()
# step 3: add SZIP.tar.gz, ZLib.tar.gz and cmake files
cp /mnt/scr1/pre-release/hdf5/CMake/SZip.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.12.4-Source.tar.gz $cmgztmpsubdir
cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-1.14.0-Source.tar.gz $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir
cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir

View File

@ -696,10 +696,16 @@ unsigned FileAccPropList::getGcReferences() const
/// Valid values of \a libver_low are as follows:
/// \li \c H5F_LIBVER_EARLIEST (Default)
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
///
/// Valid values of \a libver_high are as follows:
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST (Default)
///
/// For more detail, please refer to the H5Pset_libver_bounds API in
@ -729,10 +735,16 @@ void FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libv
/// values:
/// \li \c H5F_LIBVER_EARLIEST
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
///
/// and \a libver_high:
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
// Programmer Binh-Minh Ribler - March, 2015
//--------------------------------------------------------------------------

View File

@ -720,6 +720,9 @@
/* Define using v1.12 public API symbols by default */
#cmakedefine H5_USE_112_API_DEFAULT @H5_USE_112_API_DEFAULT@
/* Define using v1.14 public API symbols by default */
#cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@
/* Define if a memory checking tool will be used on the library, to cause
library to be very picky about memory operations and also disable the
internal free list manager code. */

View File

@ -74,7 +74,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.12.4-Source")
# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.14.0-Source")
#endif()
###############################################################################################################

View File

@ -40,9 +40,9 @@ set (CTEST_SOURCE_VERSEXT "")
##############################################################################
# handle input parameters to script.
#BUILD_GENERATOR - which CMake generator to use, required
#INSTALLDIR - HDF5-1.10.0 root folder
#INSTALLDIR - HDF5-1.13.0 root folder
#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.10.0
#CTEST_SOURCE_NAME - name of source folder; HDF5-1.13.0
#MODEL - CDash group name
#HPC - run alternate configurations for HPC machines; sbatch, bsub, raybsub, qsub
#MPI - enable MPI

View File

@ -67,7 +67,7 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### package examples ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.12.4-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-1.14.0-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
#############################################################################################
### enable parallel builds

View File

@ -943,7 +943,7 @@ fi
AM_CONDITIONAL([FORTRAN_SHARED_CONDITIONAL], [test "X$H5_FORTRAN_SHARED" = "Xyes"])
## ----------------------------------------------------------------------
## Check if they would like to disable building tests
## Check if they would like to disable building tests
##
## This needs to be exposed for the library info file.
@ -3390,10 +3390,10 @@ esac
AC_SUBST([DEFAULT_API_VERSION])
AC_MSG_CHECKING([which version of public symbols to use by default])
AC_ARG_WITH([default-api-version],
[AS_HELP_STRING([--with-default-api-version=(v16|v18|v110|v112)],
[AS_HELP_STRING([--with-default-api-version=(v16|v18|v110|v112|v114)],
[Specify default release version of public symbols
[default=v112]])],,
[withval=v112])
[default=v114]])],,
[withval=v114])
if test "X$withval" = "Xv16"; then
AC_MSG_RESULT([v16])
@ -3415,6 +3415,11 @@ elif test "X$withval" = "Xv112"; then
DEFAULT_API_VERSION=v112
AC_DEFINE([USE_112_API_DEFAULT], [1],
[Define using v1.12 public API symbols by default])
elif test "X$withval" = "Xv114"; then
AC_MSG_RESULT([v114])
DEFAULT_API_VERSION=v114
AC_DEFINE([USE_114_API_DEFAULT], [1],
[Define using v1.14 public API symbols by default])
else
AC_MSG_ERROR([invalid version of public symbols given])
fi
@ -3424,7 +3429,7 @@ fi
## if the user insists on doing this via the --enable-unsupported configure
## flag, we'll let them.
if test "X${ALLOW_UNSUPPORTED}" != "Xyes"; then
if test "X${DEFAULT_API_VERSION}" != "Xv112" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then
if test "X${DEFAULT_API_VERSION}" != "Xv114" -a "X${DEPRECATED_SYMBOLS}" = "Xno" ; then
AC_MSG_ERROR([Removing old public API symbols not allowed when using them as default public API symbols. Use --enable-unsupported to override this error.])
fi
fi
@ -3690,6 +3695,7 @@ AC_CONFIG_FILES([src/libhdf5.settings
test/test_vol_plugin.sh
testpar/Makefile
testpar/testpflush.sh
testpar/test_cache_image.sh
tools/Makefile
tools/lib/Makefile
tools/libtest/Makefile

View File

@ -218,6 +218,7 @@ public class HDF5Constants {
public static final int H5F_LIBVER_V18 = H5F_LIBVER_V18();
public static final int H5F_LIBVER_V110 = H5F_LIBVER_V110();
public static final int H5F_LIBVER_V112 = H5F_LIBVER_V112();
public static final int H5F_LIBVER_V114 = H5F_LIBVER_V114();
public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS();
public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST();
public static final int H5F_OBJ_ALL = H5F_OBJ_ALL();
@ -1059,6 +1060,8 @@ public class HDF5Constants {
private static native final int H5F_LIBVER_V112();
private static native final int H5F_LIBVER_V114();
private static native final int H5F_LIBVER_NBOUNDS();
private static native final int H5F_LIBVER_LATEST();

View File

@ -405,6 +405,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V110(JNIEnv *env, jclass cls){return
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V112(JNIEnv *env, jclass cls){return H5F_LIBVER_V112;}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1V114(JNIEnv *env, jclass cls){return H5F_LIBVER_V114;}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1NBOUNDS(JNIEnv *env, jclass cls){return H5F_LIBVER_NBOUNDS;}
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1LIBVER_1LATEST(JNIEnv *env, jclass cls){return H5F_LIBVER_LATEST;}

View File

@ -1,21 +1,21 @@
This tar file contains
This tar file contains
build-unix.sh script to build HDF5 with CMake on unix machines
build-unix-hpc.sh script to build HDF5 with CMake on unix machines and run
tests with batch scripts (sbatch).
CTestScript.cmake
CTestScript.cmake
HDF5config.cmake CMake scripts for building HDF5
HDF5options.cmake
hdf5-1.11.6 HDF5 1.11.6 source
hdf5-1.13.0 HDF5 1.13.0 source
SZip.tar.gz source for building SZIP
ZLib.tar.gz source for building ZLIB
For more information about building HDF5 with CMake, see USING_HDF5_CMake.txt in
hdf5-1.11.6/release_docs, or
hdf5-1.13.0/release_docs, or
https://portal.hdfgroup.org/display/support/Building+HDF5+with+CMake.
For more information about building HDF5 with CMake on HPC machines, including
cross compiling on Cray XC40, see README_HPC in hdf5-1.11.6/release_docs.
For more information about building HDF5 with CMake on HPC machines, including
cross compiling on Cray XC40, see README_HPC in hdf5-1.13.0/release_docs.

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,7 @@ const unsigned H5O_layout_ver_bounds[] = {
H5O_LAYOUT_VERSION_1, /* H5F_LIBVER_EARLIEST */
H5O_LAYOUT_VERSION_3, /* H5F_LIBVER_V18 */ /* H5O_LAYOUT_VERSION_DEFAULT */
H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V110 */
H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V112 */
H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
@ -65,7 +66,7 @@ const unsigned H5O_layout_ver_bounds[] = {
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_io_ops
*
@ -82,7 +83,7 @@ const unsigned H5O_layout_ver_bounds[] = {
herr_t
H5D__layout_set_io_ops(const H5D_t *dataset)
{
herr_t ret_value = SUCCEED; /* Return value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@ -152,7 +153,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_io_ops() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_meta_size
*
@ -283,7 +284,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_meta_size() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_version
*
@ -321,7 +322,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_version() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_set_latest_indexing
*
@ -335,7 +336,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
const H5D_dcpl_cache_t *dcpl_cache)
{
herr_t ret_value = SUCCEED; /* Return value */
@ -361,9 +362,9 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
if(ndims > 0) {
hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
hbool_t single = TRUE; /* Fulfill single chunk indexing */
unsigned u; /* Local index variable */
unsigned u; /* Local index variable */
/* Query the dataspace's dimensions */
if(H5S_get_simple_extent_dims(space, cur_dims, max_dims) < 0)
@ -417,7 +418,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE;
layout->storage.u.chunk.ops = H5D_COPS_SINGLE;
} /* end if */
else if(!dcpl_cache->pline.nused &&
else if(!dcpl_cache->pline.nused &&
dcpl_cache->fill.alloc_time == H5D_ALLOC_TIME_EARLY) {
/* Set the chunk index type to "none" Index */
@ -445,7 +446,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_set_latest_indexing() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_create
*
@ -586,17 +587,17 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5D__layout_oh_create() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_read
* Function: H5D__layout_oh_read
*
* Purpose: Read layout/pline/efl information for dataset
* Purpose: Read layout/pline/efl information for dataset
*
* Return: Success: SUCCEED
* Failure: FAIL
* Return: Success: SUCCEED
* Failure: FAIL
*
* Programmer: Quincey Koziol
* Monday, July 27, 2009
* Programmer: Quincey Koziol
* Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/
@ -680,17 +681,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__layout_oh_read() */
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_write
* Function: H5D__layout_oh_write
*
* Purpose: Write layout information for dataset
* Purpose: Write layout information for dataset
*
* Return: Success: SUCCEED
* Failure: FAIL
* Return: Success: SUCCEED
* Failure: FAIL
*
* Programmer: Quincey Koziol
* Monday, July 27, 2009
* Programmer: Quincey Koziol
* Monday, July 27, 2009
*
*-------------------------------------------------------------------------
*/

View File

@ -47,13 +47,13 @@
* We're assuming that these constants are used rather early in the hdf5
* session.
*/
#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */
#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */
#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */
#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/
#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */
#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */
#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */
#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/
/* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */
#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */
#define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is
#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */
#define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is
* open for writing in a
* single-writer/multi-reader (SWMR)
* scenario. Note that the
@ -62,7 +62,7 @@
* with RDONLY access, and use
* the special "SWMR_READ" access
* flag. */
#define H5F_ACC_SWMR_READ (H5CHECK 0x0040u) /*indicate that this file is
#define H5F_ACC_SWMR_READ (H5CHECK 0x0040u) /*indicate that this file is
* open for reading in a
* single-writer/multi-reader (SWMR)
* scenario. Note that the
@ -73,15 +73,15 @@
/* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the
* parent file. */
#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */
#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */
/* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */
#define H5F_OBJ_FILE (0x0001u) /* File objects */
#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */
#define H5F_OBJ_GROUP (0x0004u) /* Group objects */
#define H5F_OBJ_FILE (0x0001u) /* File objects */
#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */
#define H5F_OBJ_GROUP (0x0004u) /* Group objects */
#define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */
#define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */
#define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR)
#define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR)
#define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */
/* (as opposed to objects opened through any file ID accessing this file) */
@ -99,20 +99,20 @@
/* The difference between a single file and a set of mounted files */
typedef enum H5F_scope_t {
H5F_SCOPE_LOCAL = 0, /*specified file handle only */
H5F_SCOPE_GLOBAL = 1 /*entire virtual file */
H5F_SCOPE_LOCAL = 0, /*specified file handle only */
H5F_SCOPE_GLOBAL = 1 /*entire virtual file */
} H5F_scope_t;
/* Unlimited file size for H5Pset_external() */
#define H5F_UNLIMITED ((hsize_t)(-1L))
#define H5F_UNLIMITED ((hsize_t)(-1L))
/* How does file close behave?
* H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL
* H5F_CLOSE_WEAK - file closes only after all opened objects are closed
* H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file
close fails
close fails
* H5F_CLOSE_STRONG - if there are opened objects, close them first, then
close file
close file
*/
typedef enum H5F_close_degree_t {
H5F_CLOSE_DEFAULT = 0,
@ -124,19 +124,19 @@ typedef enum H5F_close_degree_t {
/* Current "global" information about file */
typedef struct H5F_info2_t {
struct {
unsigned version; /* Superblock version # */
hsize_t super_size; /* Superblock size */
hsize_t super_ext_size; /* Superblock extension size */
unsigned version; /* Superblock version # */
hsize_t super_size; /* Superblock size */
hsize_t super_ext_size; /* Superblock extension size */
} super;
struct {
unsigned version; /* Version # of file free space management */
hsize_t meta_size; /* Free space manager metadata size */
hsize_t tot_space; /* Amount of free space in the file */
unsigned version; /* Version # of file free space management */
hsize_t meta_size; /* Free space manager metadata size */
hsize_t tot_space; /* Amount of free space in the file */
} free;
struct {
unsigned version; /* Version # of shared object header info */
hsize_t hdr_size; /* Shared object header message header size */
H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
unsigned version; /* Version # of shared object header info */
hsize_t hdr_size; /* Shared object header message header size */
H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
} sohm;
} H5F_info2_t;
@ -180,10 +180,11 @@ typedef enum H5F_libver_t {
H5F_LIBVER_V18 = 1, /* Use the latest v18 format for storing objects */
H5F_LIBVER_V110 = 2, /* Use the latest v110 format for storing objects */
H5F_LIBVER_V112 = 3, /* Use the latest v112 format for storing objects */
H5F_LIBVER_V114 = 4, /* Use the latest v112 format for storing objects */
H5F_LIBVER_NBOUNDS
} H5F_libver_t;
#define H5F_LIBVER_LATEST H5F_LIBVER_V112
#define H5F_LIBVER_LATEST H5F_LIBVER_V114
/* File space handling strategy */
typedef enum H5F_fspace_strategy_t {
@ -200,16 +201,16 @@ typedef enum H5F_fspace_strategy_t {
typedef enum H5F_file_space_type_t {
H5F_FILE_SPACE_DEFAULT = 0, /* Default (or current) free space strategy setting */
H5F_FILE_SPACE_ALL_PERSIST = 1, /* Persistent free space managers, aggregators, virtual file driver */
H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */
/* This is the library default */
H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */
/* This is the library default */
H5F_FILE_SPACE_AGGR_VFD = 3, /* Aggregators, Virtual file driver */
H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */
H5F_FILE_SPACE_NTYPES /* must be last */
H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */
H5F_FILE_SPACE_NTYPES /* must be last */
} H5F_file_space_type_t;
/* Data structure to report the collection of read retries for metadata items with checksum */
/* Used by public routine H5Fget_metadata_read_retry_info() */
#define H5F_NUM_METADATA_READ_RETRY_TYPES 21
#define H5F_NUM_METADATA_READ_RETRY_TYPES 21
typedef struct H5F_retry_info_t {
unsigned nbins;
uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES];
@ -227,9 +228,9 @@ extern "C" {
H5_DLL htri_t H5Fis_accessible(const char *container_name, hid_t fapl_id);
H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags,
hid_t create_plist, hid_t access_plist);
hid_t create_plist, hid_t access_plist);
H5_DLL hid_t H5Fopen(const char *filename, unsigned flags,
hid_t access_plist);
hid_t access_plist);
H5_DLL hid_t H5Freopen(hid_t file_id);
H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope);
H5_DLL herr_t H5Fclose(hid_t file_id);
@ -249,9 +250,9 @@ H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa);
H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment);
H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len);
H5_DLL herr_t H5Fget_mdc_config(hid_t file_id,
H5AC_cache_config_t * config_ptr);
H5AC_cache_config_t * config_ptr);
H5_DLL herr_t H5Fset_mdc_config(hid_t file_id,
H5AC_cache_config_t * config_ptr);
H5AC_cache_config_t * config_ptr);
H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr);
H5_DLL herr_t H5Fget_mdc_size(hid_t file_id,
size_t * max_size_ptr,
@ -292,16 +293,16 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag);
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Macros */
#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/
#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/
/* Typedefs */
/* Current "global" information about file */
typedef struct H5F_info1_t {
hsize_t super_ext_size; /* Superblock extension size */
hsize_t super_ext_size; /* Superblock extension size */
struct {
hsize_t hdr_size; /* Shared object header message header size */
H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
hsize_t hdr_size; /* Shared object header message header size */
H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
} sohm;
} H5F_info1_t;

View File

@ -77,10 +77,11 @@ static const unsigned HDF5_superblock_ver_bounds[] = {
HDF5_SUPERBLOCK_VERSION_DEF, /* H5F_LIBVER_EARLIEST */
HDF5_SUPERBLOCK_VERSION_2, /* H5F_LIBVER_V18 */
HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V110 */
HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V112 */
HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_create
*
@ -133,7 +134,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_create() */
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_open
*
@ -171,7 +172,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_open() */
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_close
*
@ -224,14 +225,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_close() */
/*-------------------------------------------------------------------------
* Function: H5F__update_super_ext_driver_msg
*
* Purpose: Update the superblock extension file driver info message if
* Purpose: Update the superblock extension file driver info message if
* we are using a V 2 superblock. Observe that the function
* is a NO-OP if the file driver info message does not exist.
* This is necessary, as the function is called whenever the
* This is necessary, as the function is called whenever the
* EOA is updated, and were it to create the file driver info
* message, it would find itself in an infinite recursion.
*
@ -271,8 +272,8 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
/* Check for driver info */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
/* Nothing to do unless there is both driver info and
* the driver info superblock extension message has
/* Nothing to do unless there is both driver info and
* the driver info superblock extension message has
* already been created.
*/
if(driver_size > 0) {
@ -288,7 +289,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f)
/* Write the message to the superblock extension.
*
* Note that the superblock extension and the
* Note that the superblock extension and the
* file driver info message must already exist.
*/
drvinfo.len = driver_size;
@ -304,7 +305,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__update_super_ext_driver_msg() */
/*-------------------------------------------------------------------------
* Function: H5F__super_read
*
@ -343,7 +344,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG)
/* initialize the drvinfo to NULL -- we will overwrite this if there
* is a driver information block
* is a driver information block
*/
f->shared->drvinfo = NULL;
@ -435,7 +436,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list")
/* Make certain we can read the fixed-size portion of the superblock */
if(H5F__set_eoa(f, H5FD_MEM_SUPER,
if(H5F__set_eoa(f, H5FD_MEM_SUPER,
(haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed")
@ -455,12 +456,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags)))
HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock")
/*
/*
* When opening a file with SWMR-write access, the library will first
* check to ensure that superblock version 3 is used. Otherwise fail
* check to ensure that superblock version 3 is used. Otherwise fail
* file open.
*
* Then the library will upgrade the file's low_bound depending on
* Then the library will upgrade the file's low_bound depending on
* superblock version as follows:
* --version 0 or 1: no change to low_bound
* --version 2: upgrade low_bound to at least V18
@ -590,8 +591,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* as the file can appear truncated if only part of it has been
* been flushed to disk by the SWMR writer process.
*/
/* The EOF check is also skipped when the private property
* H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl.
/* The EOF check is also skipped when the private property
* H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl.
* This property is enabled by the tool h5clear with these
* two options: (1) --filesize (2) --increment
*/
@ -602,7 +603,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get skip EOF check value")
if(H5F_INTENT(f) & H5F_ACC_SWMR_READ) {
/*
/*
* When the file is opened for SWMR read access, skip the check if:
* --the file is already marked for SWMR writing and
* --the file has version 3 superblock for SWMR support
@ -644,10 +645,10 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
drvrinfo_udata.f = f;
drvrinfo_udata.driver_addr = sblock->driver_addr;
/* extend EOA so we can read at least the fixed sized
* portion of the driver info block
/* extend EOA so we can read at least the fixed sized
* portion of the driver info block
*/
if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */
if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed")
/* Look up the driver info block */
@ -660,7 +661,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD))
drvinfo_flags |= H5AC__DIRTIED_FLAG;
/* set the pin entry flag so that the driver information block
/* set the pin entry flag so that the driver information block
* cache entry will be pinned in the cache.
*/
drvinfo_flags |= H5AC__PIN_ENTRY_FLAG;
@ -826,7 +827,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(f->shared->eoa_fsm_fsalloc != fsinfo.eoa_pre_fsm_fsalloc)
f->shared->eoa_fsm_fsalloc = fsinfo.eoa_pre_fsm_fsalloc;
/*
/*
* If the following two conditions are true:
* (1) skipping EOF check (skip_eof_check)
* (2) dropping free-space to the floor (f->shared->null_fsm_addr)
@ -838,9 +839,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
if(!skip_eof_check && !f->shared->null_fsm_addr)
HDassert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF));
/*
/*
* A crashed file with persistent free-space managers may have
* undefined f->shared->eoa_fsm_fsalloc.
* undefined f->shared->eoa_fsm_fsalloc.
* eoa_fsm_fsalloc is the final eoa which is saved in the free-space
* info message's eoa_pre_fsm_fsalloc field for backward compatibility.
* If the tool h5clear sets to dropping free-space to the floor
@ -856,7 +857,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
* Because:
* --there is no more f->shared->eoa_pre_fsm_fsalloc and
* f->shared->first_alloc_dealloc
* --the check for null_fsm_addr is directly done in H5MF_settle_meta_data_fsm()
* --the check for null_fsm_addr is directly done in H5MF_settle_meta_data_fsm()
* and H5MF_settle_raw_data_fsm()
*/
@ -865,9 +866,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
f->shared->fs_addr[u] = fsinfo.fs_addr[u - 1];
/* If the following two conditions are true:
* (1) file is persisting free-space
* (1) file is persisting free-space
* (2) dropping free-space to the floor (f->shared->null_fsm_addr)
* nullify the addresses of the FSMs
* nullify the addresses of the FSMs
*/
if(f->shared->fs_persist && f->shared->null_fsm_addr)
for(u = 0; u < NELMTS(fsinfo.fs_addr); u++)
@ -882,7 +883,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
/* KLUGE ALERT!!
*
* H5F__super_ext_write_msg() expects f->shared->sblock to
* H5F__super_ext_write_msg() expects f->shared->sblock to
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
@ -919,12 +920,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
/* if the metadata cache image superblock extension message exists,
* read its contents and pass the data on to the metadata cache.
* Given this data, the cache will load and decode the metadata
* cache image block, decoded it and load its contents into the
* the cache on the test protect call.
* cache image block, decoded it and load its contents into the
* the cache on the test protect call.
*
* Further, if the file is opened R/W, the metadata cache will
* Further, if the file is opened R/W, the metadata cache will
* delete the metadata cache image superblock extension and free
* the cache image block. Don't do this now as f->shared
* the cache image block. Don't do this now as f->shared
* is not fully setup, which complicates matters.
*/
@ -975,7 +976,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
#if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */
/* KLUGE ALERT!!
*
* H5F__super_ext_write_msg() expects f->shared->sblock to
* H5F__super_ext_write_msg() expects f->shared->sblock to
* be set -- verify that it is NULL, and then set it.
* Set it back to NULL when we are done.
*/
@ -1019,10 +1020,10 @@ done:
if(sblock && H5AC_unprotect(f, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock")
/* If we have failed, make sure no entries are left in the
/* If we have failed, make sure no entries are left in the
* metadata cache, so that it can be shut down and discarded.
*/
if(ret_value < 0) {
if(ret_value < 0) {
/* Unpin and discard drvinfo cache entry */
if(f->shared->drvinfo) {
if(H5AC_unpin_entry(f->shared->drvinfo) < 0)
@ -1048,7 +1049,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5F__super_read() */
/*-------------------------------------------------------------------------
* Function: H5F__super_init
*
@ -1112,10 +1113,10 @@ H5F__super_init(H5F_t *f)
if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF &&
f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF &&
f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF &&
f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF))
f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF))
non_default_fs_settings = TRUE;
/*
/*
* When creating a file with write access, the library will:
* -- set superblock version to 0, 1 or 2 based on feature enabled
* -- no change to low_bound
@ -1124,9 +1125,9 @@ H5F__super_init(H5F_t *f)
* -- set superblock version to 3
* -- upgrade low_bound to at least V110
*
* Then the library will finalize superblock version to that allowed by
* Then the library will finalize superblock version to that allowed by
* low_bound if that is higher.
* Lastly, the library will check to ensure the superblock version does not
* Lastly, the library will check to ensure the superblock version does not
* exceed the version allowed by high_bound. Otherwise fail file open.
*
* For details, please see RFC:Setting Bounds for Object Creation in HDF5 1.10.0.
@ -1136,12 +1137,12 @@ H5F__super_init(H5F_t *f)
* the status_flags field in the superblock. The problem is discussed in
* jira issue SWMR-79 and also in the RFC: File Format Changes in HDF5 1.10.0.
* The file's low_bound is upgraded for SWMR so that the library will
* use the best format versions available in 1.10.
* Due to the possible upgrade, the fapl returned from H5Fget_access_plist()
* use the best format versions available in 1.10.
* Due to the possible upgrade, the fapl returned from H5Fget_access_plist()
* might indicate a low_bound higher than what the user originally set.
*/
/*
/*
* Creating a file with SWMR-write access will
* upgrade superblock version and low_bound
*/
@ -1152,10 +1153,10 @@ H5F__super_init(H5F_t *f)
/* Bump superblock version to create superblock extension for SOHM info */
} else if(f->shared->sohm_nindexes > 0)
super_vers = HDF5_SUPERBLOCK_VERSION_2;
/*
* Bump superblock version to create superblock extension for:
* -- non-default file space strategy or
* -- non-default persisting free-space or
/*
* Bump superblock version to create superblock extension for:
* -- non-default file space strategy or
* -- non-default persisting free-space or
* -- non-default free-space threshold or
* -- non-default page_size
*/
@ -1232,7 +1233,7 @@ H5F__super_init(H5F_t *f)
/* Compute the size of the driver information block */
H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t);
/* The following code sets driver_size to the valued needed
/* The following code sets driver_size to the valued needed
* for the driver info block, and sets the driver info block
* address regardless of the version of the superblock.
*/
@ -1273,7 +1274,7 @@ H5F__super_init(H5F_t *f)
/* Allocate space for the superblock */
if(HADDR_UNDEF == H5MF_alloc(f, H5FD_MEM_SUPER, superblock_size))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock")
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock")
/* set the drvinfo filed to NULL -- will overwrite this later if needed */
f->shared->drvinfo = NULL;
@ -1324,7 +1325,7 @@ H5F__super_init(H5F_t *f)
* be tuned if more information is added to the superblock
* extension.
*/
if(H5F__super_ext_create(f, &ext_loc) < 0)
if(H5F__super_ext_create(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension")
ext_created = TRUE;
@ -1398,7 +1399,7 @@ H5F__super_init(H5F_t *f)
if(H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE | H5O_MSG_FLAG_MARK_IF_UNKNOWN, H5O_UPDATE_TIME, &fsinfo) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message")
} /* end if */
} /* end if */
} /* end if */
else {
/* Check for creating an "old-style" driver info block */
@ -1481,7 +1482,7 @@ done:
FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5F__super_init() */
/*-------------------------------------------------------------------------
* Function: H5F_eoa_dirty
*
@ -1511,8 +1512,8 @@ H5F_eoa_dirty(H5F_t *f)
if(H5F_super_dirty(f) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty")
/* If the driver information block exists, mark it dirty as well
* so that the change in eoa will be reflected there as well if
/* If the driver information block exists, mark it dirty as well
* so that the change in eoa will be reflected there as well if
* appropriate.
*/
if(f->shared->drvinfo) {
@ -1529,7 +1530,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_eoa_dirty() */
/*-------------------------------------------------------------------------
* Function: H5F_super_dirty
*
@ -1563,7 +1564,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_dirty() */
/*-------------------------------------------------------------------------
* Function: H5F__super_free
*
@ -1594,7 +1595,7 @@ H5F__super_free(H5F_super_t *sblock)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5F__super_free() */
/*-------------------------------------------------------------------------
* Function: H5F__super_size
*
@ -1623,7 +1624,7 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size)
/* Set the superblock size */
if(super_size)
*super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock);
*super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock);
/* Set the superblock extension size */
if(super_ext_size) {
@ -1659,7 +1660,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_size() */
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_write_msg()
*
@ -1678,9 +1679,9 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg,
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
hbool_t ext_created = FALSE; /* Whether superblock extension was created */
hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@ -1744,7 +1745,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F__super_ext_write_msg() */
/*-------------------------------------------------------------------------
* Function: H5F__super_ext_remove_msg
*
@ -1760,11 +1761,11 @@ herr_t
H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
{
H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
hbool_t ext_opened = FALSE; /* Whether the superblock extension was opened */
int null_count = 0; /* # of null messages */
int null_count = 0; /* # of null messages */
htri_t status; /* Indicate whether the message exists or not */
herr_t ret_value = SUCCEED; /* Return value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@ -1784,7 +1785,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message")
else if(status) {
/* message exists */
H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
/* Remove the message */
if(H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0)

View File

@ -14,15 +14,15 @@
/* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, September 30, 1998
*
* Purpose: The fill message indicates a bit pattern to use for
* uninitialized data points of a dataset.
* Purpose: The fill message indicates a bit pattern to use for
* uninitialized data points of a dataset.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
@ -49,61 +49,61 @@ static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_FILL
#define H5O_SHARED_DECODE H5O_fill_shared_decode
#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
#define H5O_SHARED_ENCODE H5O_fill_shared_encode
#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
#define H5O_SHARED_SIZE H5O_fill_shared_size
#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
#define H5O_SHARED_DELETE H5O__fill_shared_delete
#define H5O_SHARED_TYPE H5O_MSG_FILL
#define H5O_SHARED_DECODE H5O_fill_shared_decode
#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode
#define H5O_SHARED_ENCODE H5O_fill_shared_encode
#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode
#define H5O_SHARED_SIZE H5O_fill_shared_size
#define H5O_SHARED_SIZE_REAL H5O_fill_old_size
#define H5O_SHARED_DELETE H5O__fill_shared_delete
#undef H5O_SHARED_DELETE_REAL
#define H5O_SHARED_LINK H5O__fill_shared_link
#define H5O_SHARED_LINK H5O__fill_shared_link
#undef H5O_SHARED_LINK_REAL
#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#define H5O_SHARED_DEBUG H5O_fill_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
#define H5O_SHARED_DEBUG H5O_fill_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* Set up & include shared message "interface" info */
/* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */
#undef H5O_SHARED_TYPE
#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW
#undef H5O_SHARED_DECODE
#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
#define H5O_SHARED_DECODE H5O_fill_new_shared_decode
#undef H5O_SHARED_DECODE_REAL
#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode
#undef H5O_SHARED_ENCODE
#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode
#undef H5O_SHARED_ENCODE_REAL
#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode
#undef H5O_SHARED_SIZE
#define H5O_SHARED_SIZE H5O_fill_new_shared_size
#define H5O_SHARED_SIZE H5O_fill_new_shared_size
#undef H5O_SHARED_SIZE_REAL
#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#define H5O_SHARED_SIZE_REAL H5O_fill_new_size
#undef H5O_SHARED_DELETE
#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#define H5O_SHARED_DELETE H5O__fill_new_shared_delete
#undef H5O_SHARED_DELETE_REAL
#undef H5O_SHARED_LINK
#define H5O_SHARED_LINK H5O__fill_new_shared_link
#define H5O_SHARED_LINK H5O__fill_new_shared_link
#undef H5O_SHARED_LINK_REAL
#undef H5O_SHARED_COPY_FILE
#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE
#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#undef H5O_SHARED_DEBUG
#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug
#undef H5O_SHARED_DEBUG_REAL
#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#define H5O_SHARED_DEBUG_REAL H5O__fill_debug
#undef H5Oshared_H
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class, for old fill value before version 1.5 */
const H5O_msg_class_t H5O_MSG_FILL[1] = {{
@ -150,7 +150,7 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{
H5O_fill_new_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_fill_new_shared_debug /*debug the message */
H5O_fill_new_shared_debug /*debug the message */
}};
/* Format version bounds for fill value */
@ -158,6 +158,7 @@ const unsigned H5O_fill_ver_bounds[] = {
H5O_FILL_VERSION_1, /* H5F_LIBVER_EARLIEST */
H5O_FILL_VERSION_3, /* H5F_LIBVER_V18 */
H5O_FILL_VERSION_3, /* H5F_LIBVER_V110 */
H5O_FILL_VERSION_3, /* H5F_LIBVER_V112 */
H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
@ -176,15 +177,15 @@ H5FL_DEFINE(H5O_fill_t);
/* Declare extern the free list to manage blocks of type conversion data */
H5FL_BLK_EXTERN(type_conv);
/*-------------------------------------------------------------------------
* Function: H5O_fill_new_decode
* Function: H5O_fill_new_decode
*
* Purpose: Decode a new fill value message. The new fill value
* Purpose: Decode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
* Return: Success: Ptr to new message in native struct.
* Return: Success: Ptr to new message in native struct.
* Failure: NULL
*
* Programmer: Raymond Lu
@ -197,7 +198,7 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
H5O_fill_t *fill = NULL;
H5O_fill_t *fill = NULL;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@ -295,7 +296,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_decode() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_decode
*
@ -314,7 +315,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
H5O_fill_t *fill = NULL; /* Decoded fill value message */
H5O_fill_t *fill = NULL; /* Decoded fill value message */
htri_t exists = FALSE;
H5T_t *dt = NULL;
void *ret_value = NULL; /* Return value */
@ -376,15 +377,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_old_decode() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_new_encode
* Function: H5O_fill_new_encode
*
* Purpose: Encode a new fill value message. The new fill value
* Purpose: Encode a new fill value message. The new fill value
* message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Raymond Lu
* Feb 26, 2002
@ -394,7 +395,7 @@ done:
static herr_t
H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
{
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
const H5O_fill_t *fill = (const H5O_fill_t *)_fill;
FUNC_ENTER_NOAPI_NOINIT_NOERR
@ -474,7 +475,7 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_new_encode() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_encode
*
@ -505,17 +506,17 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fill_old_encode() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_copy
* Function: H5O_fill_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary. The new fill value message is fill value plus
* space allocation time and fill value writing time and
* whether fill value is defined.
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary. The new fill value message is fill value plus
* space allocation time and fill value writing time and
* whether fill value is defined.
*
* Return: Success: Ptr to _DEST
* Failure: NULL
* Return: Success: Ptr to _DEST
* Failure: NULL
*
* Programmer: Raymond Lu
* Feb 26, 2002
@ -622,18 +623,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_copy() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_new_size
* Function: H5O_fill_new_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
* Purpose: Returns the size of the raw message in bytes not counting the
* message type or size fields, but only the data fields. This
* function doesn't take into account alignment. The new fill
* value message is fill value plus space allocation time and
* fill value writing time and whether fill value is defined.
*
* Return: Success: Message data size in bytes w/o alignment.
* Failure: 0
* Return: Success: Message data size in bytes w/o alignment.
* Failure: 0
*
* Programmer: Raymond Lu
* Feb 26, 2002
@ -653,26 +654,26 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
/* Determine size for different versions */
if(fill->version < H5O_FILL_VERSION_3) {
ret_value = 1 + /* Version number */
1 + /* Space allocation time */
1 + /* Fill value write time */
1; /* Fill value defined */
ret_value = 1 + /* Version number */
1 + /* Space allocation time */
1 + /* Fill value write time */
1; /* Fill value defined */
if(fill->fill_defined)
ret_value += 4 + /* Fill value size */
(fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
ret_value += 4 + /* Fill value size */
(fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */
} /* end if */
else {
ret_value = 1 + /* Version number */
1; /* Status flags */
ret_value = 1 + /* Version number */
1; /* Status flags */
if(fill->size > 0)
ret_value += 4 + /* Fill value size */
(size_t)fill->size; /* Size of fill value */
ret_value += 4 + /* Fill value size */
(size_t)fill->size; /* Size of fill value */
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_new_size() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_old_size
*
@ -700,15 +701,15 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill)
FUNC_LEAVE_NOAPI(4 + (size_t)fill->size)
} /* end H5O_fill_old_size() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_reset_dyn
* Function: H5O_fill_reset_dyn
*
* Purpose: Resets dynamic fill value fields
* Purpose: Resets dynamic fill value fields
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Monday, January 22, 2007
*
*-------------------------------------------------------------------------
@ -766,15 +767,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_reset_dyn() */
/*-------------------------------------------------------------------------
* Function: H5O__fill_reset
* Function: H5O__fill_reset
*
* Purpose: Resets a message to an initial state.
* Purpose: Resets a message to an initial state.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@ -782,7 +783,7 @@ done:
static herr_t
H5O__fill_reset(void *_fill)
{
H5O_fill_t *fill = (H5O_fill_t *)_fill;
H5O_fill_t *fill = (H5O_fill_t *)_fill;
FUNC_ENTER_STATIC_NOERR
@ -799,15 +800,15 @@ H5O__fill_reset(void *_fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_reset() */
/*-------------------------------------------------------------------------
* Function: H5O__fill_free
* Function: H5O__fill_free
*
* Purpose: Frees the message
* Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Thursday, December 5, 2002
*
*-------------------------------------------------------------------------
@ -824,7 +825,7 @@ H5O__fill_free(void *fill)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_free() */
/*-------------------------------------------------------------------------
* Function: H5O__fill_pre_copy_file
*
@ -842,7 +843,7 @@ static herr_t
H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src,
hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata)
{
const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@ -860,15 +861,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__fill_pre_copy_file() */
/*-------------------------------------------------------------------------
* Function: H5O__fill_debug
* Function: H5O__fill_debug
*
* Purpose: Prints debugging info for the message.
* Purpose: Prints debugging info for the message.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@ -950,7 +951,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
} /* end switch */
HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth,
"Size:", fill->size);
"Size:", fill->size);
HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:");
if(fill->type) {
H5T_debug(fill->type, stream);
@ -962,18 +963,18 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fill_debug() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_convert
* Function: H5O_fill_convert
*
* Purpose: Convert a fill value from whatever data type it currently has
* Purpose: Convert a fill value from whatever data type it currently has
* to the specified dataset type. The `type' field of the fill
* value struct will be set to NULL to indicate that it has the
* same type as the dataset.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Thursday, October 1, 1998
*
*-------------------------------------------------------------------------
@ -981,10 +982,10 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream,
herr_t
H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed)
{
H5T_path_t *tpath; /* Type conversion info */
void *buf = NULL, *bkg = NULL; /* Conversion buffers */
hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
herr_t ret_value = SUCCEED; /* Return value */
H5T_path_t *tpath; /* Type conversion info */
void *buf = NULL, *bkg = NULL; /* Conversion buffers */
hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
@ -1065,7 +1066,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fill_convert() */
/*-------------------------------------------------------------------------
* Function: H5O_fill_set_version
*

View File

@ -15,7 +15,7 @@
*
* Created: H5Ofsinfo.c
* Feb 2009
* Vailin Choi
* Vailin Choi
*
* Purpose: File space info message.
*
@ -25,11 +25,11 @@
#include "H5Omodule.h" /* This source code file is part of the H5O module */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
#include "H5FLprivate.h" /* Free lists */
#include "H5Opkg.h" /* Object headers */
#include "H5FLprivate.h" /* Free lists */
#include "H5Opkg.h" /* Object headers */
/* PRIVATE PROTOTYPES */
static void *H5O_fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags,
@ -43,26 +43,26 @@ static herr_t H5O__fsinfo_debug(H5F_t *f, const void *_mesg, FILE * stream,
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_FSINFO[1] = {{
H5O_FSINFO_ID, /* message id number */
"fsinfo", /* message name for debugging */
sizeof(H5O_fsinfo_t), /* native message size */
0, /* messages are sharable? */
H5O_fsinfo_decode, /* decode message */
H5O_fsinfo_encode, /* encode message */
H5O_fsinfo_copy, /* copy the native value */
H5O_fsinfo_size, /* size of free-space manager info message */
NULL, /* default reset method */
H5O__fsinfo_free, /* free method */
NULL, /* file delete method */
NULL, /* link method */
NULL, /* set share method */
NULL, /* can share method */
NULL, /* pre copy native value to file */
NULL, /* copy native value to file */
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O__fsinfo_debug /* debug the message */
H5O_FSINFO_ID, /* message id number */
"fsinfo", /* message name for debugging */
sizeof(H5O_fsinfo_t), /* native message size */
0, /* messages are sharable? */
H5O_fsinfo_decode, /* decode message */
H5O_fsinfo_encode, /* encode message */
H5O_fsinfo_copy, /* copy the native value */
H5O_fsinfo_size, /* size of free-space manager info message */
NULL, /* default reset method */
H5O__fsinfo_free, /* free method */
NULL, /* file delete method */
NULL, /* link method */
NULL, /* set share method */
NULL, /* can share method */
NULL, /* pre copy native value to file */
NULL, /* copy native value to file */
NULL, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O__fsinfo_debug /* debug the message */
}};
/* Format version bounds for fsinfo message */
@ -71,6 +71,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = {
H5O_INVALID_VERSION, /* H5F_LIBVER_EARLIEST */
H5O_INVALID_VERSION, /* H5F_LIBVER_V18 */
H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V110 */
H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V112 */
H5O_FSINFO_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
#define N_FSINFO_VERSION_BOUNDS 4
@ -78,7 +79,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = {
/* Declare a free list to manage the H5O_fsinfo_t struct */
H5FL_DEFINE_STATIC(H5O_fsinfo_t);
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_decode
*
@ -109,7 +110,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Allocate space for message */
if(NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, ptype))
fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF;
@ -165,7 +166,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh,
fsinfo->version = H5O_FSINFO_VERSION_1;
fsinfo->mapped = TRUE;
} else {
HDassert(vers >= H5O_FSINFO_VERSION_1);
@ -197,7 +198,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fsinfo_decode() */
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_encode
*
@ -213,7 +214,7 @@ static herr_t
H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
H5F_mem_page_t ptype; /* Memory type for iteration */
H5F_mem_page_t ptype; /* Memory type for iteration */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@ -223,12 +224,12 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
HDassert(fsinfo);
*p++ = (uint8_t)fsinfo->version; /* message version */
*p++ = fsinfo->strategy; /* File space strategy */
*p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */
*p++ = fsinfo->strategy; /* File space strategy */
*p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */
H5F_ENCODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section size threshold */
H5F_ENCODE_LENGTH(f, p, fsinfo->page_size); /* File space page size */
UINT16ENCODE(p, fsinfo->pgend_meta_thres); /* Page end metadata threshold */
H5F_ENCODE_LENGTH(f, p, fsinfo->page_size); /* File space page size */
UINT16ENCODE(p, fsinfo->pgend_meta_thres); /* Page end metadata threshold */
H5F_addr_encode(f, &p, fsinfo->eoa_pre_fsm_fsalloc); /* EOA before free-space header and section info */
/* Store addresses of free-space managers, if persisting */
@ -241,7 +242,7 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_fsinfo_encode() */
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_copy
*
@ -279,7 +280,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fsinfo_copy() */
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_size
*
@ -303,11 +304,11 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
FUNC_ENTER_NOAPI_NOINIT_NOERR
ret_value = 3 /* Version, strategy & persist */
+ (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */
+ (size_t)H5F_SIZEOF_SIZE(f) /* File space page size */
+ 2 /* Page end meta threshold */
+ (size_t)H5F_SIZEOF_ADDR(f);
+ (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */
+ (size_t)H5F_SIZEOF_SIZE(f) /* File space page size */
+ 2 /* Page end meta threshold */
+ (size_t)H5F_SIZEOF_ADDR(f);
/* Free-space manager addresses */
if(fsinfo->persist)
ret_value += (H5F_MEM_PAGE_NTYPES - 1) * (size_t)H5F_SIZEOF_ADDR(f);
@ -315,7 +316,7 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fsinfo_size() */
/*-------------------------------------------------------------------------
* Function: H5O__fsinfo_free
*
@ -339,7 +340,7 @@ H5O__fsinfo_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__fsinfo_free() */
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_set_version
*
@ -380,7 +381,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fsinfo_set_version() */
/*-------------------------------------------------------------------------
* Function: H5O_fsinfo_check_version
*
@ -412,7 +413,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_fsinfo_check_version() */
/*-------------------------------------------------------------------------
* Function: H5O__fsinfo_debug
*
@ -428,7 +429,7 @@ static herr_t
H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream,
int indent, int fwidth)
{
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
H5F_mem_page_t ptype; /* Free-space types for iteration */
FUNC_ENTER_STATIC_NOERR

File diff suppressed because it is too large Load Diff

View File

@ -12,23 +12,23 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, April 15, 1998
* Programmer: Robb Matzke <matzke@llnl.gov>
* Wednesday, April 15, 1998
*
* Purpose: Data filter pipeline message.
* Purpose: Data filter pipeline message.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
#define H5Z_FRIEND /*suppress error about including H5Zpkg */
#define H5Z_FRIEND /*suppress error about including H5Zpkg */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Zpkg.h" /* Data filters */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MMprivate.h" /* Memory management */
#include "H5Opkg.h" /* Object headers */
#include "H5Zpkg.h" /* Data filters */
/* PRIVATE PROTOTYPES */
@ -45,48 +45,48 @@ static herr_t H5O__pline_debug(H5F_t *f, const void *_mesg, FILE * stream,
int indent, int fwidth);
/* Set up & include shared message "interface" info */
#define H5O_SHARED_TYPE H5O_MSG_PLINE
#define H5O_SHARED_DECODE H5O_pline_shared_decode
#define H5O_SHARED_DECODE_REAL H5O__pline_decode
#define H5O_SHARED_ENCODE H5O_pline_shared_encode
#define H5O_SHARED_ENCODE_REAL H5O_pline_encode
#define H5O_SHARED_SIZE H5O_pline_shared_size
#define H5O_SHARED_SIZE_REAL H5O_pline_size
#define H5O_SHARED_DELETE H5O__pline_shared_delete
#define H5O_SHARED_TYPE H5O_MSG_PLINE
#define H5O_SHARED_DECODE H5O_pline_shared_decode
#define H5O_SHARED_DECODE_REAL H5O__pline_decode
#define H5O_SHARED_ENCODE H5O_pline_shared_encode
#define H5O_SHARED_ENCODE_REAL H5O_pline_encode
#define H5O_SHARED_SIZE H5O_pline_shared_size
#define H5O_SHARED_SIZE_REAL H5O_pline_size
#define H5O_SHARED_DELETE H5O__pline_shared_delete
#undef H5O_SHARED_DELETE_REAL
#define H5O_SHARED_LINK H5O__pline_shared_link
#define H5O_SHARED_LINK H5O__pline_shared_link
#undef H5O_SHARED_LINK_REAL
#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file
#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file
#undef H5O_SHARED_COPY_FILE_REAL
#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file
#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file
#undef H5O_SHARED_POST_COPY_FILE_REAL
#undef H5O_SHARED_POST_COPY_FILE_UPD
#define H5O_SHARED_DEBUG H5O_pline_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__pline_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
#define H5O_SHARED_DEBUG H5O_pline_shared_debug
#define H5O_SHARED_DEBUG_REAL H5O__pline_debug
#include "H5Oshared.h" /* Shared Object Header Message Callbacks */
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_PLINE[1] = {{
H5O_PLINE_ID, /* message id number */
"filter pipeline", /* message name for debugging */
sizeof(H5O_pline_t), /* native message size */
H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
H5O_pline_shared_decode, /* decode message */
H5O_pline_shared_encode, /* encode message */
H5O_pline_copy, /* copy the native value */
H5O_pline_shared_size, /* size of raw message */
H5O__pline_reset, /* reset method */
H5O__pline_free, /* free method */
H5O__pline_shared_delete, /* file delete method */
H5O__pline_shared_link, /* link method */
NULL, /* set share method */
NULL, /*can share method */
H5O_pline_pre_copy_file, /* pre copy native value to file */
H5O__pline_shared_copy_file, /* copy native value to file */
H5O_pline_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_pline_shared_debug /* debug the message */
H5O_PLINE_ID, /* message id number */
"filter pipeline", /* message name for debugging */
sizeof(H5O_pline_t), /* native message size */
H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */
H5O_pline_shared_decode, /* decode message */
H5O_pline_shared_encode, /* encode message */
H5O_pline_copy, /* copy the native value */
H5O_pline_shared_size, /* size of raw message */
H5O__pline_reset, /* reset method */
H5O__pline_free, /* free method */
H5O__pline_shared_delete, /* file delete method */
H5O__pline_shared_link, /* link method */
NULL, /* set share method */
NULL, /*can share method */
H5O_pline_pre_copy_file, /* pre copy native value to file */
H5O__pline_shared_copy_file, /* copy native value to file */
H5O_pline_shared_post_copy_file, /* post copy native value to file */
NULL, /* get creation index */
NULL, /* set creation index */
H5O_pline_shared_debug /* debug the message */
}};
/* Format version bounds for filter pipleline */
@ -94,22 +94,23 @@ const unsigned H5O_pline_ver_bounds[] = {
H5O_PLINE_VERSION_1, /* H5F_LIBVER_EARLIEST */
H5O_PLINE_VERSION_2, /* H5F_LIBVER_V18 */
H5O_PLINE_VERSION_2, /* H5F_LIBVER_V110 */
H5O_PLINE_VERSION_2, /* H5F_LIBVER_V112 */
H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
/* Declare a free list to manage the H5O_pline_t struct */
H5FL_DEFINE(H5O_pline_t);
/*-------------------------------------------------------------------------
* Function: H5O__pline_decode
* Function: H5O__pline_decode
*
* Purpose: Decodes a filter pipeline message.
* Purpose: Decodes a filter pipeline message.
*
* Return: Success: Ptr to the native message.
* Failure: NULL
* Return: Success: Ptr to the native message.
* Failure: NULL
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -119,12 +120,12 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags,
size_t p_size, const uint8_t *p)
{
H5O_pline_t *pline = NULL; /* Pipeline message */
H5O_pline_t *pline = NULL; /* Pipeline message */
H5Z_filter_info_t *filter; /* Filter to decode */
size_t name_length; /* Length of filter name */
size_t i; /* Local index variable */
size_t name_length; /* Length of filter name */
size_t i; /* Local index variable */
const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */
void *ret_value = NULL; /* Return value */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_STATIC
@ -204,7 +205,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Filter parameters */
if(filter->cd_nelmts) {
size_t j; /* Local index variable */
size_t j; /* Local index variable */
/* Allocate space for the client data elements, or use the internal buffer */
if(filter->cd_nelmts > H5Z_COMMON_CD_VALUES) {
@ -243,15 +244,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__pline_decode() */
/*-------------------------------------------------------------------------
* Function: H5O_pline_encode
* Function: H5O_pline_encode
*
* Purpose: Encodes message MESG into buffer P.
* Purpose: Encodes message MESG into buffer P.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -259,9 +260,9 @@ done:
static herr_t
H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */
const H5Z_filter_info_t *filter; /* Filter to encode */
size_t i, j; /* Local index variables */
size_t i, j; /* Local index variables */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@ -273,21 +274,21 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
*p++ = (uint8_t)pline->version;
*p++ = (uint8_t)(pline->nused);
if(pline->version == H5O_PLINE_VERSION_1) {
*p++ = 0; /*reserved 1*/
*p++ = 0; /*reserved 2*/
*p++ = 0; /*reserved 3*/
*p++ = 0; /*reserved 4*/
*p++ = 0; /*reserved 5*/
*p++ = 0; /*reserved 6*/
*p++ = 0; /*reserved 1*/
*p++ = 0; /*reserved 2*/
*p++ = 0; /*reserved 3*/
*p++ = 0; /*reserved 4*/
*p++ = 0; /*reserved 5*/
*p++ = 0; /*reserved 6*/
} /* end if */
/* Encode filters */
for(i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) {
const char *name; /* Filter name */
size_t name_length; /* Length of filter name */
const char *name; /* Filter name */
size_t name_length; /* Length of filter name */
/* Filter ID */
UINT16ENCODE(p, filter->id);
UINT16ENCODE(p, filter->id);
/* Skip writing the name length & name if the filter is an internal filter */
if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) {
@ -295,7 +296,7 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
name = NULL;
} /* end if */
else {
H5Z_class2_t *cls; /* Filter class */
H5Z_class2_t *cls; /* Filter class */
/*
* Get the filter name. If the pipeline message has a name in it then
@ -311,26 +312,26 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
} /* end else */
/* Filter flags */
UINT16ENCODE(p, filter->flags);
UINT16ENCODE(p, filter->flags);
/* # of filter parameters */
UINT16ENCODE(p, filter->cd_nelmts);
UINT16ENCODE(p, filter->cd_nelmts);
/* Encode name, if there is one to encode */
if(name_length > 0) {
if(name_length > 0) {
/* Store name, with null terminator */
H5MM_memcpy(p, name, name_length);
p += name_length;
H5MM_memcpy(p, name, name_length);
p += name_length;
/* Pad out name to alignment, in older versions */
if(pline->version == H5O_PLINE_VERSION_1)
while(name_length++ % 8)
*p++ = 0;
} /* end if */
} /* end if */
/* Filter parameters */
for(j = 0; j < filter->cd_nelmts; j++)
UINT32ENCODE(p, filter->cd_values[j]);
for(j = 0; j < filter->cd_nelmts; j++)
UINT32ENCODE(p, filter->cd_values[j]);
/* Align the parameters for older versions of the format */
if(pline->version == H5O_PLINE_VERSION_1)
@ -341,19 +342,19 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_pline_encode() */
/*-------------------------------------------------------------------------
* Function: H5O_pline_copy
* Function: H5O_pline_copy
*
* Purpose: Copies a filter pipeline message from SRC to DST allocating
* DST if necessary. If DST is already allocated then we assume
* that it isn't initialized.
* Purpose: Copies a filter pipeline message from SRC to DST allocating
* DST if necessary. If DST is already allocated then we assume
* that it isn't initialized.
*
* Return: Success: Ptr to DST or allocated result.
* Return: Success: Ptr to DST or allocated result.
*
* Failure: NULL
* Failure: NULL
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -361,16 +362,16 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg)
static void *
H5O_pline_copy(const void *_src, void *_dst/*out*/)
{
const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */
H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */
size_t i; /* Local index variable */
H5O_pline_t *ret_value = NULL; /* Return value */
const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */
H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */
size_t i; /* Local index variable */
H5O_pline_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Allocate pipeline message, if not provided */
if(!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy basic fields */
*dst = *src;
@ -379,8 +380,8 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/)
dst->nalloc = dst->nused;
if(dst->nalloc) {
/* Allocate array to hold filters */
if(NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0]))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0]))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Deep-copy filters */
for(i = 0; i < src->nused; i++) {
@ -419,7 +420,7 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/)
} /* end for */
} /* end if */
else
dst->filter = NULL;
dst->filter = NULL;
/* Set return value */
ret_value = dst;
@ -427,24 +428,24 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/)
done:
if(!ret_value && dst) {
H5O__pline_reset(dst);
if(!_dst)
if(!_dst)
H5O__pline_free(dst);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_copy() */
/*-------------------------------------------------------------------------
* Function: H5O_pline_size
* Function: H5O_pline_size
*
* Purpose: Determines the size of a raw filter pipeline message.
* Purpose: Determines the size of a raw filter pipeline message.
*
* Return: Success: Size of message.
* Return: Success: Size of message.
*
* Failure: zero
* Failure: zero
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -452,27 +453,27 @@ done:
static size_t
H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */
const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */
size_t i; /* Local index variable */
size_t ret_value = 0; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Message header */
ret_value = (size_t)(1 + /*version */
1 + /*number of filters */
(pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */
ret_value = (size_t)(1 + /*version */
1 + /*number of filters */
(pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */
/* Calculate size of each filter in pipeline */
for(i = 0; i < pline->nused; i++) {
size_t name_len; /* Length of filter name */
size_t name_len; /* Length of filter name */
const char *name; /* Filter name */
/* Don't write the name length & name if the filter is an internal filter */
if(pline->version > H5O_PLINE_VERSION_1 && pline->filter[i].id < H5Z_FILTER_RESERVED)
name_len = 0;
else {
H5Z_class2_t *cls; /* Filter class */
H5Z_class2_t *cls; /* Filter class */
/* Get the name of the filter, same as done with H5O_pline_encode() */
if(NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id)))
@ -480,13 +481,13 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
name_len = name ? HDstrlen(name) + 1 : 0;
} /* end else */
ret_value += 2 + /*filter identification number */
(size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */
2 + /*flags */
2 + /*number of client data values */
(pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */
ret_value += 2 + /*filter identification number */
(size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */
2 + /*flags */
2 + /*number of client data values */
(pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */
ret_value += pline->filter[i].cd_nelmts * 4;
ret_value += pline->filter[i].cd_nelmts * 4;
if(pline->version == H5O_PLINE_VERSION_1)
if(pline->filter[i].cd_nelmts % 2)
ret_value += 4;
@ -495,16 +496,16 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_size() */
/*-------------------------------------------------------------------------
* Function: H5O__pline_reset
* Function: H5O__pline_reset
*
* Purpose: Resets a filter pipeline message by clearing all filters.
* The MESG buffer is not freed.
* Purpose: Resets a filter pipeline message by clearing all filters.
* The MESG buffer is not freed.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -512,8 +513,8 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg)
static herr_t
H5O__pline_reset(void *mesg)
{
H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */
size_t i; /* Local index variable */
H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */
size_t i; /* Local index variable */
FUNC_ENTER_STATIC_NOERR
@ -551,15 +552,15 @@ H5O__pline_reset(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__pline_reset() */
/*-------------------------------------------------------------------------
* Function: H5O__pline_free
* Function: H5O__pline_free
*
* Purpose: Frees the message
* Purpose: Frees the message
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Saturday, March 11, 2000
*
*-------------------------------------------------------------------------
@ -576,7 +577,7 @@ H5O__pline_free(void *mesg)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__pline_free() */
/*-------------------------------------------------------------------------
* Function: H5O_pline_pre_copy_file
*
@ -624,17 +625,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_pline_pre_copy_file() */
/*-------------------------------------------------------------------------
* Function: H5O__pline_debug
* Function: H5O__pline_debug
*
* Purpose: Prints debugging information for filter pipeline message MESG
* on output stream STREAM. Each line is indented INDENT
* characters and the field name takes up FWIDTH characters.
* Purpose: Prints debugging information for filter pipeline message MESG
* on output stream STREAM. Each line is indented INDENT
* characters and the field name takes up FWIDTH characters.
*
* Return: Non-negative on success/Negative on failure
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Wednesday, April 15, 1998
*
*-------------------------------------------------------------------------
@ -643,8 +644,8 @@ static herr_t
H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
int indent, int fwidth)
{
const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
size_t i, j;
const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
size_t i, j;
FUNC_ENTER_STATIC_NOERR
@ -656,48 +657,48 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream,
HDassert(fwidth >= 0);
HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth,
"Number of filters:",
pline->nused,
pline->nalloc);
"Number of filters:",
pline->nused,
pline->nalloc);
/* Loop over all the filters */
for(i = 0; i < pline->nused; i++) {
char name[32];
char name[32];
HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter identification:",
(unsigned)(pline->filter[i].id));
if(pline->filter[i].name)
HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter name:",
pline->filter[i].name);
else
HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter name:");
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Flags:",
pline->filter[i].flags);
HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Num CD values:",
pline->filter[i].cd_nelmts);
HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i);
HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name);
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter identification:",
(unsigned)(pline->filter[i].id));
if(pline->filter[i].name)
HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter name:",
pline->filter[i].name);
else
HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3),
"Filter name:");
HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3),
"Flags:",
pline->filter[i].flags);
HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3),
"Num CD values:",
pline->filter[i].cd_nelmts);
/* Filter parameters */
for(j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
for(j = 0; j < pline->filter[i].cd_nelmts; j++) {
char field_name[32];
HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6),
field_name,
pline->filter[i].cd_values[j]);
} /* end for */
HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j);
HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6),
field_name,
pline->filter[i].cd_values[j]);
} /* end for */
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__pline_debug() */
/*-------------------------------------------------------------------------
* Function: H5O_pline_set_version
*

629
src/H5S.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
* Purpose: Point selection dataspace I/O functions.
* Purpose: Point selection dataspace I/O functions.
*/
/****************/
@ -30,8 +30,8 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* ID Functions */
#include "H5MMprivate.h" /* Memory management */
#include "H5Spkg.h" /* Dataspace functions */
@ -138,6 +138,7 @@ const unsigned H5O_sds_point_ver_bounds[] = {
H5S_POINT_VERSION_1, /* H5F_LIBVER_EARLIEST */
H5S_POINT_VERSION_1, /* H5F_LIBVER_V18 */
H5S_POINT_VERSION_1, /* H5F_LIBVER_V110 */
H5S_POINT_VERSION_1, /* H5F_LIBVER_V112 */
H5S_POINT_VERSION_2 /* H5F_LIBVER_LATEST */
};
@ -167,15 +168,15 @@ H5FL_BARR_DEFINE_STATIC(H5S_pnt_node_t, hcoords_t, H5S_MAX_RANK);
H5FL_DEFINE_STATIC(H5S_pnt_list_t);
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_init
* Function: H5S__point_iter_init
*
* Purpose: Initializes iteration information for point selection.
* Purpose: Initializes iteration information for point selection.
*
* Return: Non-negative on success, negative on failure.
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@ -193,14 +194,14 @@ H5S__point_iter_init(const H5S_t *space, H5S_sel_iter_t *iter)
/* If this iterator is created from an API call, by default we clone the
* selection now, as the dataspace could be modified or go out of scope.
*
*
* However, if the H5S_SEL_ITER_SHARE_WITH_DATASPACE flag is given,
* the selection is shared between the selection iterator and the
* dataspace. In this case, the application _must_not_ modify or
* close the dataspace that the iterator is operating on, or undefined
* behavior will occur.
*/
if((iter->flags & H5S_SEL_ITER_API_CALL) &&
if((iter->flags & H5S_SEL_ITER_API_CALL) &&
!(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE)) {
/* Copy the point list */
if(NULL == (iter->u.pnt.pnt_lst = H5S__copy_pnt_list(space->select.sel_info.pnt_lst, space->extent.rank)))
@ -220,16 +221,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_init() */
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_coords
* Function: H5S__point_iter_coords
*
* Purpose: Retrieve the current coordinates of iterator for current
* Purpose: Retrieve the current coordinates of iterator for current
* selection
*
* Return: Non-negative on success, negative on failure
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Tuesday, April 22, 2003
*
*-------------------------------------------------------------------------
@ -249,16 +250,16 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_coords() */
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_block
* Function: H5S__point_iter_block
*
* Purpose: Retrieve the current block of iterator for current
* Purpose: Retrieve the current block of iterator for current
* selection
*
* Return: Non-negative on success, negative on failure
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Monday, June 2, 2003
*
*-------------------------------------------------------------------------
@ -280,15 +281,15 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_block() */
/*-------------------------------------------------------------------------
* Function: H5S__point_iter_nelmts
* Function: H5S__point_iter_nelmts
*
* Purpose: Return number of elements left to process in iterator
* Purpose: Return number of elements left to process in iterator
*
* Return: Non-negative number of elements on success, zero on failure
* Return: Non-negative number of elements on success, zero on failure
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
*-------------------------------------------------------------------------
@ -304,7 +305,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* end H5S__point_iter_nelmts() */
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_has_next_block
@ -340,7 +341,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_has_next_block() */
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_next
@ -377,7 +378,7 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_next() */
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_next_block
@ -409,7 +410,7 @@ H5S__point_iter_next_block(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_next_block() */
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_get_seq_list
@ -446,9 +447,9 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
size_t io_left; /* The number of bytes left in the selection */
size_t start_io_left; /* The initial number of bytes left in the selection */
H5S_pnt_node_t *node; /* Point node */
unsigned ndims; /* Dimensionality of dataspace*/
hsize_t acc; /* Coordinate accumulator */
hsize_t loc; /* Coordinate offset */
unsigned ndims; /* Dimensionality of dataspace*/
hsize_t acc; /* Coordinate accumulator */
hsize_t loc; /* Coordinate offset */
size_t curr_seq; /* Current sequence being operated on */
int i; /* Local index variable */
herr_t ret_value = SUCCEED; /* return value */
@ -540,7 +541,7 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_iter_get_seq_list() */
/*--------------------------------------------------------------------------
NAME
H5S__point_iter_release
@ -567,14 +568,14 @@ H5S__point_iter_release(H5S_sel_iter_t * iter)
HDassert(iter);
/* If this iterator copied the point list, we must free it */
if((iter->flags & H5S_SEL_ITER_API_CALL) &&
if((iter->flags & H5S_SEL_ITER_API_CALL) &&
!(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE))
H5S__free_pnt_list(iter->u.pnt.pnt_lst);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_iter_release() */
/*--------------------------------------------------------------------------
NAME
H5S__point_add
@ -691,7 +692,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_add() */
/*--------------------------------------------------------------------------
NAME
H5S__point_release
@ -729,7 +730,7 @@ H5S__point_release(H5S_t *space)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_release() */
/*--------------------------------------------------------------------------
NAME
H5S_select_elements
@ -799,7 +800,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_elements() */
/*--------------------------------------------------------------------------
NAME
H5S__copy_pnt_list
@ -875,7 +876,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__copy_pnt_list() */
/*--------------------------------------------------------------------------
NAME
H5S__free_pnt_list
@ -917,7 +918,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst)
FUNC_LEAVE_NOAPI_VOID
} /* end H5S__free_pnt_list() */
/*--------------------------------------------------------------------------
NAME
H5S__point_copy
@ -957,7 +958,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_copy() */
/*--------------------------------------------------------------------------
NAME
H5S__point_is_valid
@ -1001,7 +1002,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_valid() */
/*--------------------------------------------------------------------------
NAME
H5Sget_select_elem_npoints
@ -1040,7 +1041,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_select_elem_npoints() */
/*--------------------------------------------------------------------------
NAME
H5S__point_get_version_enc_size
@ -1060,7 +1061,7 @@ done:
(2) whether the number of points or selection high bounds exceeds H5S_UINT32_MAX or not
Determine the encoded size based on version:
--For version 2, the encoded size of point selection info is determined
--For version 2, the encoded size of point selection info is determined
by the maximum size for:
(a) storing the number of points
(b) storing the selection high bounds
@ -1158,7 +1159,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S__point_get_version_enc_size() */
/*--------------------------------------------------------------------------
NAME
H5S__point_serial_size
@ -1196,19 +1197,19 @@ H5S__point_serial_size(const H5S_t *space)
/* Basic number of bytes required to serialize point selection: */
if(version >= H5S_POINT_VERSION_2)
/*
* <type (4 bytes)> + <version (4 bytes)> +
* <type (4 bytes)> + <version (4 bytes)> +
* <size of point info (1 byte)> + rank (4 bytes)>
*/
ret_value=13;
else
else
/*
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> + <rank (4 bytes)>
* <length (4 bytes)> + <rank (4 bytes)>
*/
ret_value = 20;
/* <num points (depend on enc_size)> */
ret_value += enc_size;
ret_value += enc_size;
/* Count points in selection */
ret_value += (hssize_t) (enc_size * space->extent.rank * space->select.num_elem);
@ -1217,7 +1218,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_serial_size() */
/*--------------------------------------------------------------------------
NAME
H5S__point_serialize
@ -1350,7 +1351,7 @@ done:
} /* H5S__point_serialize() */
/*--------------------------------------------------------------------------
NAME
H5S__point_deserialize
@ -1440,13 +1441,13 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p)
/* decode the number of points */
switch(enc_size) {
case H5S_SELECT_INFO_ENC_SIZE_2:
UINT16DECODE(pp, num_elem);
UINT16DECODE(pp, num_elem);
break;
case H5S_SELECT_INFO_ENC_SIZE_4:
UINT32DECODE(pp, num_elem);
break;
case H5S_SELECT_INFO_ENC_SIZE_8:
UINT64DECODE(pp, num_elem);
UINT64DECODE(pp, num_elem);
break;
default:
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size")
@ -1502,7 +1503,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_deserialize() */
/*--------------------------------------------------------------------------
NAME
H5S__get_select_elem_pointlist
@ -1567,7 +1568,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__get_select_elem_pointlist() */
/*--------------------------------------------------------------------------
NAME
H5Sget_select_elem_pointlist
@ -1621,7 +1622,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Sget_select_elem_pointlist() */
/*--------------------------------------------------------------------------
NAME
H5S__point_bounds
@ -1679,7 +1680,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_bounds() */
/*--------------------------------------------------------------------------
NAME
H5S__point_offset
@ -1743,7 +1744,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_offset() */
/*--------------------------------------------------------------------------
NAME
H5S__point_unlim_dim
@ -1772,7 +1773,7 @@ H5S__point_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
FUNC_LEAVE_NOAPI(-1)
} /* end H5S__point_unlim_dim() */
/*--------------------------------------------------------------------------
NAME
H5S__point_is_contiguous
@ -1805,14 +1806,14 @@ H5S__point_is_contiguous(const H5S_t *space)
/* One point is definitely contiguous */
if(space->select.num_elem == 1)
ret_value = TRUE;
else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */
ret_value = FALSE;
ret_value = TRUE;
else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */
ret_value = FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_contiguous() */
/*--------------------------------------------------------------------------
NAME
H5S__point_is_single
@ -1842,14 +1843,14 @@ H5S__point_is_single(const H5S_t *space)
/* One point is definitely 'single' :-) */
if(space->select.num_elem == 1)
ret_value = TRUE;
ret_value = TRUE;
else
ret_value = FALSE;
ret_value = FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_single() */
/*--------------------------------------------------------------------------
NAME
H5S__point_is_regular
@ -1883,14 +1884,14 @@ H5S__point_is_regular(const H5S_t *space)
/* Only simple check for regular points for now... */
if(space->select.num_elem == 1)
ret_value = TRUE;
ret_value = TRUE;
else
ret_value = FALSE;
ret_value = FALSE;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_is_regular() */
/*--------------------------------------------------------------------------
NAME
H5S__point_shape_same
@ -1998,7 +1999,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_shape_same() */
/*--------------------------------------------------------------------------
NAME
H5S__point_intersect_block
@ -2055,7 +2056,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_intersect_block() */
/*--------------------------------------------------------------------------
NAME
H5S__point_adjust_u
@ -2112,16 +2113,16 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__point_adjust_u() */
/*-------------------------------------------------------------------------
* Function: H5S__point_project_scalar
* Function: H5S__point_project_scalar
*
* Purpose: Projects a single element point selection into a scalar
* Purpose: Projects a single element point selection into a scalar
* dataspace
*
* Return: Non-negative on success, negative on failure.
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Sunday, July 18, 2010
*
*-------------------------------------------------------------------------
@ -2152,16 +2153,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_project_scalar() */
/*-------------------------------------------------------------------------
* Function: H5S__point_project_simple
* Function: H5S__point_project_simple
*
* Purpose: Projects a point selection onto/into a simple dataspace
* Purpose: Projects a point selection onto/into a simple dataspace
* of a different rank
*
* Return: Non-negative on success, negative on failure.
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* Programmer: Quincey Koziol
* Sunday, July 18, 2010
*
*-------------------------------------------------------------------------
@ -2288,7 +2289,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__point_project_simple() */
/*--------------------------------------------------------------------------
NAME
H5Sselect_elements

139
src/H5T.c
View File

@ -514,6 +514,7 @@ const unsigned H5O_dtype_ver_bounds[] = {
H5O_DTYPE_VERSION_1, /* H5F_LIBVER_EARLIEST */
H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V18 */
H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V110 */
H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V112 */
H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */
};
@ -550,7 +551,7 @@ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{
static hbool_t H5T_top_package_initialize_s = FALSE;
/*-------------------------------------------------------------------------
* Function: H5T_init
*
@ -576,7 +577,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_init() */
/*-------------------------------------------------------------------------
* Function: H5T__init_inf
*
@ -689,7 +690,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_inf() */
/*--------------------------------------------------------------------------
NAME
H5T__init_package -- Initialize interface-specific information
@ -1313,7 +1314,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__init_package() */
/*-------------------------------------------------------------------------
* Function: H5T__unlock_cb
*
@ -1346,7 +1347,7 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unlock_cb() */
/*-------------------------------------------------------------------------
* Function: H5T_top_term_package
*
@ -1547,7 +1548,7 @@ H5T_top_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_top_term_package() */
/*-------------------------------------------------------------------------
* Function: H5T_term_package
*
@ -1589,7 +1590,7 @@ H5T_term_package(void)
FUNC_LEAVE_NOAPI(n)
} /* end H5T_term_package() */
/*-------------------------------------------------------------------------
* Function: H5T__close_cb
*
@ -1632,7 +1633,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__close_cb() */
/*-------------------------------------------------------------------------
* Function: H5Tcreate
*
@ -1677,7 +1678,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcreate() */
/*-------------------------------------------------------------------------
* Function: H5Tcopy
*
@ -1777,7 +1778,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcopy() */
/*-------------------------------------------------------------------------
* Function: H5Tclose
*
@ -1812,7 +1813,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tclose() */
/*-------------------------------------------------------------------------
* Function: H5Tequal
*
@ -1849,7 +1850,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tequal() */
/*-------------------------------------------------------------------------
* Function: H5Tlock
*
@ -1896,7 +1897,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tlock() */
/*-------------------------------------------------------------------------
* Function: H5Tget_class
*
@ -1931,7 +1932,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_class() */
/*-------------------------------------------------------------------------
* Function: H5T_get_class
*
@ -1973,7 +1974,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_class() */
/*-------------------------------------------------------------------------
* Function: H5Tdetect_class
*
@ -2009,7 +2010,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tdetect_class() */
/*-------------------------------------------------------------------------
* Function: H5T_detect_class
*
@ -2085,7 +2086,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_detect_class() */
/*-------------------------------------------------------------------------
* Function: H5Tis_variable_str
*
@ -2119,7 +2120,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tis_variable_str() */
/*-------------------------------------------------------------------------
* Function: H5T_is_variable_str
*
@ -2140,7 +2141,7 @@ H5T_is_variable_str(const H5T_t *dt)
FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared))
} /* end H5T_is_variable_str() */
/*-------------------------------------------------------------------------
* Function: H5Tget_size
*
@ -2177,7 +2178,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_size() */
/*-------------------------------------------------------------------------
* Function: H5Tset_size
*
@ -2233,7 +2234,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tset_size() */
/*-------------------------------------------------------------------------
* Function: H5Tget_super
*
@ -2273,7 +2274,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_super() */
/*-------------------------------------------------------------------------
* Function: H5T_get_super
*
@ -2307,7 +2308,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_super() */
/*-------------------------------------------------------------------------
* Function: H5T__register_int
*
@ -2347,7 +2348,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register_int() */
/*-------------------------------------------------------------------------
* Function: H5T__register
*
@ -2531,7 +2532,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__register() */
/*-------------------------------------------------------------------------
* Function: H5Tregister
*
@ -2587,7 +2588,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tregister() */
/*-------------------------------------------------------------------------
* Function: H5T__unregister
*
@ -2691,7 +2692,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T__unregister() */
/*-------------------------------------------------------------------------
* Function: H5Tunregister
*
@ -2731,7 +2732,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tunregister() */
/*-------------------------------------------------------------------------
* Function: H5Tfind
*
@ -2781,7 +2782,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tfind() */
/*-------------------------------------------------------------------------
* Function: H5Tcompiler_conv
*
@ -2821,7 +2822,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcompiler_conv() */
/*-------------------------------------------------------------------------
* Function: H5Tconvert
*
@ -2880,7 +2881,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tconvert() */
/*-------------------------------------------------------------------------
* Function: H5Tencode
*
@ -2919,7 +2920,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tencode() */
/*-------------------------------------------------------------------------
* Function: H5Tdecode
*
@ -2974,7 +2975,7 @@ done:
*-------------------------------------------------------------------------
*/
/*-------------------------------------------------------------------------
* Function: H5T_encode
*
@ -3030,7 +3031,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_encode() */
/*-------------------------------------------------------------------------
* Function: H5T_decode
*
@ -3084,7 +3085,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_decode() */
/*-------------------------------------------------------------------------
* Function: H5T__create
*
@ -3216,7 +3217,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__create() */
/*-------------------------------------------------------------------------
* Function: H5T_copy
*
@ -3506,7 +3507,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_copy() */
/*-------------------------------------------------------------------------
* Function: H5T_lock
*
@ -3553,7 +3554,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
* Function: H5T__alloc
*
@ -3603,7 +3604,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__alloc() */
/*-------------------------------------------------------------------------
* Function: H5T__free
*
@ -3683,7 +3684,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__free() */
/*-------------------------------------------------------------------------
* Function: H5T_close_real
*
@ -3727,7 +3728,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close_real() */
/*-------------------------------------------------------------------------
* Function: H5T_close
*
@ -3812,7 +3813,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_close() */
/*-------------------------------------------------------------------------
* Function: H5T__set_size
*
@ -4012,7 +4013,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__set_size() */
/*-------------------------------------------------------------------------
* Function: H5T_get_size
*
@ -4040,7 +4041,7 @@ H5T_get_size(const H5T_t *dt)
FUNC_LEAVE_NOAPI(dt->shared->size)
} /* end H5T_get_size() */
/*-------------------------------------------------------------------------
* Function: H5T_cmp
*
@ -4502,7 +4503,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_cmp() */
/*-------------------------------------------------------------------------
* Function: H5T_path_find
*
@ -4549,7 +4550,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_find() */
/*-------------------------------------------------------------------------
* Function: H5T__path_find_real
*
@ -4856,7 +4857,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__path_find_real() */
/*-------------------------------------------------------------------------
* Function: H5T_path_noop
*
@ -4881,7 +4882,7 @@ H5T_path_noop(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE)))
} /* end H5T_path_noop() */
/*-------------------------------------------------------------------------
* Function: H5T_path_compound_subset
*
@ -4925,7 +4926,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_path_compound_subset */
/*-------------------------------------------------------------------------
* Function: H5T_path_bkg
*
@ -4947,7 +4948,7 @@ H5T_path_bkg(const H5T_path_t *p)
FUNC_LEAVE_NOAPI(p->cdata.need_bkg)
} /* end H5T_path_bkg() */
/*-------------------------------------------------------------------------
* Function: H5T__compiler_conv
*
@ -4981,7 +4982,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__compiler_conv() */
/*-------------------------------------------------------------------------
* Function: H5T_convert
*
@ -5032,7 +5033,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert() */
/*-------------------------------------------------------------------------
* Function: H5T_oloc
*
@ -5073,7 +5074,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_oloc() */
/*-------------------------------------------------------------------------
* Function: H5T_nameof
*
@ -5113,7 +5114,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_nameof() */
/*-------------------------------------------------------------------------
* Function: H5T_is_immutable
*
@ -5143,7 +5144,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
* Function: H5T_is_named
*
@ -5228,7 +5229,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_convert_committed_datatype() */
/*--------------------------------------------------------------------------
* Function: H5T_get_ref_type
*
@ -5257,7 +5258,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_get_ref_type() */
/*-------------------------------------------------------------------------
* Function: H5T_is_sensible
*
@ -5319,7 +5320,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
/*--------------------------------------------------------------------------
NAME
H5T_set_loc
@ -5485,7 +5486,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_loc() */
/*-------------------------------------------------------------------------
* Function: H5T_is_relocatable
*
@ -5524,7 +5525,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_relocatable() */
/*-------------------------------------------------------------------------
* Function: H5T_detect_reg_ref
*
@ -5532,7 +5533,7 @@ done:
* datatype.
*
* Return: TRUE (1) or FALSE (0) on success
* (Can't fail)
* (Can't fail)
*
* Programmer: Quincey Koziol
* Saturday, January 5, 2019
@ -5587,7 +5588,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__detect_reg_ref() */
/*-------------------------------------------------------------------------
* Function: H5T_is_vl_storage
*
@ -5629,7 +5630,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_is_vl_storage() */
/*-------------------------------------------------------------------------
* Function: H5T_upgrade_version_cb
*
@ -5687,7 +5688,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5T_upgrade_version_cb() */
/*-------------------------------------------------------------------------
* Function: H5T__upgrade_version
*
@ -5720,12 +5721,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__upgrade_version() */
/*-------------------------------------------------------------------------
* Function: H5T_set_version
*
* Purpose: Set the encoding for a datatype to the version indicated by
* the file's low bound if that is higher than the datatype's
* the file's low bound if that is higher than the datatype's
* version.
*
* Return: Non-negative on success/Negative on failure
@ -5752,7 +5753,7 @@ H5T_set_version(H5F_t *f, H5T_t *dt)
if(H5T__upgrade_version(dt, vers) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding")
}
/* Version bounds check */
if(dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)])
HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds")
@ -5761,7 +5762,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_set_version() */
/*-------------------------------------------------------------------------
* Function: H5T_patch_file
*
@ -5797,7 +5798,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_patch_file() */
/*-------------------------------------------------------------------------
* Function: H5T_patch_vlen_file
*

View File

@ -25,7 +25,7 @@
/****************/
/* Module Setup */
/****************/
#define H5I_FRIEND /*suppress error about including H5Ipkg */
#define H5I_FRIEND /*suppress error about including H5Ipkg */
/***********/
/* Headers */
@ -79,7 +79,7 @@
/*******************/
/*-------------------------------------------------------------------------
* Function: H5_trace
*
@ -134,7 +134,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
/* FUNC_ENTER() should not be called */
if(!out)
return 0.0F; /*tracing is off*/
return 0.0F; /*tracing is off*/
HDva_start(ap, type);
if(H5_debug_g.ttop) {
@ -767,7 +767,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
if(status >= 0)
HDfprintf(out, "SUCCEED");
else
else
HDfprintf(out, "FAIL");
} /* end else */
break;
@ -1058,7 +1058,11 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
break;
case H5F_LIBVER_V112:
HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V112);
HDfprintf(out, "H5F_LIBVER_V112");
break;
case H5F_LIBVER_V114:
HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V114);
HDfprintf(out, "H5F_LIBVER_LATEST");
break;

View File

@ -106,7 +106,8 @@ const char *LIBVER_NAMES[] = {
"earliest", /* H5F_LIBVER_EARLIEST = 0 */
"v18", /* H5F_LIBVER_V18 = 1 */
"v110", /* H5F_LIBVER_V110 = 2 */
"latest", /* H5F_LIBVER_V112 = 3 */
"v112", /* H5F_LIBVER_V112 = 3 */
"latest", /* H5F_LIBVER_V114 = 4 */
NULL
};

View File

@ -5769,6 +5769,7 @@ test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr, htri_t n
case H5F_LIBVER_V110:
case H5F_LIBVER_V112:
case H5F_LIBVER_V114:
ok = (f->shared->sblock->super_vers == HDF5_SUPERBLOCK_VERSION_3);
VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
break;

View File

@ -139,7 +139,8 @@ static void usage(const char *prog) {
PRINTVALSTREAM(rawoutstream, " 1: This is H5F_LIBVER_V18 in H5F_libver_t struct\n");
PRINTVALSTREAM(rawoutstream, " 2: This is H5F_LIBVER_V110 in H5F_libver_t struct\n");
PRINTVALSTREAM(rawoutstream, " 3: This is H5F_LIBVER_V112 in H5F_libver_t struct\n");
PRINTVALSTREAM(rawoutstream, " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V112 for this release\n");
PRINTVALSTREAM(rawoutstream, " 4: This is H5F_LIBVER_V114 in H5F_libver_t struct\n");
PRINTVALSTREAM(rawoutstream, " (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V114 for this release\n");
PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, " FS_STRATEGY is a string indicating the file space strategy used:\n");
PRINTVALSTREAM(rawoutstream, " FSM_AGGR:\n");

View File

@ -61,7 +61,8 @@ usage: h5repack [OPTIONS] file1 file2
1: This is H5F_LIBVER_V18 in H5F_libver_t struct
2: This is H5F_LIBVER_V110 in H5F_libver_t struct
3: This is H5F_LIBVER_V112 in H5F_libver_t struct
(H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V112 for this release
4: This is H5F_LIBVER_V114 in H5F_libver_t struct
(H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V114 for this release
FS_STRATEGY is a string indicating the file space strategy used:
FSM_AGGR: