mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
Merge remote-tracking branch 'origin/develop' into env_vol_load
This commit is contained in:
commit
fc945999d0
@ -33,7 +33,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
EXPORT ${HDF5_EXPORTED_TARGETS}
|
||||
DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
|
||||
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
|
||||
NAMESPACE ${HDF5_PACKAGE}::
|
||||
NAMESPACE ${HDF_PACKAGE_NAMESPACE}
|
||||
COMPONENT configinstall
|
||||
)
|
||||
endif ()
|
||||
@ -45,7 +45,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
|
||||
export (
|
||||
TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} ${HDF5_UTILS_TO_EXPORT}
|
||||
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
|
||||
NAMESPACE ${HDF5_PACKAGE}::
|
||||
NAMESPACE ${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -756,7 +756,7 @@ endif ()
|
||||
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
|
||||
if (BUILD_TESTING)
|
||||
set (DART_TESTING_TIMEOUT 1200
|
||||
CACHE INTEGER
|
||||
CACHE STRING
|
||||
"Timeout in seconds for each test (default 1200=20minutes)"
|
||||
)
|
||||
|
||||
@ -806,6 +806,7 @@ endif ()
|
||||
if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
|
||||
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON)
|
||||
if (HDF5_BUILD_TOOLS)
|
||||
option (SKIP_ERROR_STACK_TESTS "Skip HDF5 Tools Error Stack Tests" OFF)
|
||||
add_subdirectory (tools)
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -1,4 +1,4 @@
|
||||
HDF5 version 1.11.4 currently under development
|
||||
HDF5 version 1.11.5 currently under development
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Please refer to the release_docs/INSTALL file for installation instructions.
|
||||
|
@ -38,7 +38,7 @@ PROJECT_NAME =
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "1.11.4"
|
||||
PROJECT_NUMBER = "1.11.5"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@ -609,10 +609,10 @@ static void test_getobjectinfo_same_file()
|
||||
catch (Exception& E)
|
||||
{
|
||||
cerr << " in Exception " << E.getCFuncName() << "detail: " << E.getCDetailMsg() << endl;
|
||||
issue_fail_msg("test_file_name()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
issue_fail_msg("test_getobjectinfo_same_file()", __LINE__, __FILE__, E.getCDetailMsg());
|
||||
}
|
||||
|
||||
} // test_h5o_getinfo_same_file
|
||||
} // test_getobjectinfo_same_file
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_object
|
||||
|
@ -103,6 +103,8 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PAC
|
||||
|
||||
if(WIN32)
|
||||
include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake)
|
||||
include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
|
||||
else()
|
||||
include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake)
|
||||
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
|
||||
endif()
|
||||
|
@ -57,106 +57,3 @@
|
||||
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON")
|
||||
|
||||
#############################################################################################
|
||||
# Do not edit below this line
|
||||
#############################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
# MAC machines need special option
|
||||
#-----------------------------------------------------------------------------
|
||||
if (APPLE)
|
||||
# Compiler choice
|
||||
execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set (ENV{CC} "${XCODE_CC}")
|
||||
set (ENV{CXX} "${XCODE_CXX}")
|
||||
if (NOT NO_MAC_FORTRAN)
|
||||
# Shared fortran is not supported, build static
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
|
||||
else ()
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
|
||||
endif ()
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
|
||||
else ()
|
||||
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
|
||||
## --------------------------
|
||||
if (CTEST_USE_TAR_SOURCE)
|
||||
## Uncompress source if tar or zip file provided
|
||||
## --------------------------
|
||||
if (WIN32)
|
||||
message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
|
||||
execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
|
||||
else ()
|
||||
message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
|
||||
execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
|
||||
endif ()
|
||||
|
||||
if (NOT rv EQUAL 0)
|
||||
message (STATUS "extracting... [error-(${rv}) clean up]")
|
||||
file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
|
||||
message (FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
## Clear the build directory
|
||||
## --------------------------
|
||||
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
|
||||
if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
|
||||
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
|
||||
else ()
|
||||
file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
|
||||
endif ()
|
||||
|
||||
# Use multiple CPU cores to build
|
||||
include (ProcessorCount)
|
||||
ProcessorCount (N)
|
||||
if (NOT N EQUAL 0)
|
||||
if (NOT WIN32)
|
||||
set (CTEST_BUILD_FLAGS -j${N})
|
||||
endif ()
|
||||
set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
|
||||
endif ()
|
||||
set (CTEST_CONFIGURE_COMMAND
|
||||
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
## -- set output to english
|
||||
set ($ENV{LC_MESSAGES} "en_EN")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
|
||||
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
|
||||
## NORMAL process
|
||||
## --------------------------
|
||||
ctest_start (Experimental)
|
||||
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||
if (${res} LESS 0 OR ${res} GREATER 0)
|
||||
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
|
||||
endif ()
|
||||
if (LOCAL_SUBMIT)
|
||||
ctest_submit (PARTS Configure Notes)
|
||||
endif ()
|
||||
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND APPEND RETURN_VALUE res NUMBER_ERRORS errval)
|
||||
if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
|
||||
file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
|
||||
endif ()
|
||||
if (LOCAL_SUBMIT)
|
||||
ctest_submit (PARTS Build)
|
||||
endif ()
|
||||
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
|
||||
if (${res} LESS 0 OR ${res} GREATER 0)
|
||||
file(APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
|
||||
endif ()
|
||||
if (LOCAL_SUBMIT)
|
||||
ctest_submit (PARTS Test)
|
||||
endif ()
|
||||
if (${res} LESS 0 OR ${res} GREATER 0)
|
||||
message (FATAL_ERROR "tests FAILED")
|
||||
endif ()
|
||||
#-----------------------------------------------------------------------------
|
||||
##############################################################################################################
|
||||
message (STATUS "DONE")
|
||||
|
@ -34,9 +34,9 @@ utility should be installed.
|
||||
To test the installation with the examples;
|
||||
Create a directory to run the examples.
|
||||
Copy HDF5Examples folder to this directory.
|
||||
Copy CTestScript.cmake to this directory.
|
||||
Copy HDF5_Examples.cmake to this directory.
|
||||
Copy HDF5_Examples_options.cmake to this directory.
|
||||
Copy CTestScript.cmake to this directory.
|
||||
The default source folder is defined as "HDF5Examples". It can be changed
|
||||
with the CTEST_SOURCE_NAME script option.
|
||||
The default installation folder is defined as "@CMAKE_INSTALL_PREFIX@".
|
||||
|
@ -19,6 +19,8 @@ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Framework
|
||||
|
||||
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
|
||||
|
||||
set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace (can be empty)" FORCE)
|
||||
|
||||
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
|
||||
|
||||
set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE)
|
||||
|
@ -108,10 +108,10 @@ set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
|
||||
# project which has already built hdf5 as a subproject
|
||||
#-----------------------------------------------------------------------------
|
||||
if (NOT TARGET "@HDF5_PACKAGE@")
|
||||
if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
|
||||
if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
|
||||
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
||||
endif ()
|
||||
if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip")
|
||||
if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS)
|
||||
include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake)
|
||||
endif ()
|
||||
include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
|
||||
|
@ -23,6 +23,8 @@ set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
|
||||
|
||||
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
|
||||
|
||||
set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace" FORCE)
|
||||
|
||||
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
|
||||
|
||||
set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
|
||||
|
@ -34,7 +34,7 @@ cmake_minimum_required (VERSION 3.10)
|
||||
# CTEST_SOURCE_NAME - source folder
|
||||
##############################################################################
|
||||
|
||||
set (CTEST_SOURCE_VERSION "1.11.4")
|
||||
set (CTEST_SOURCE_VERSION "1.11.5")
|
||||
set (CTEST_SOURCE_VERSEXT "")
|
||||
|
||||
##############################################################################
|
||||
|
@ -14,25 +14,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
|
||||
# May need to build JPEG with PIC on x64 machines with gcc
|
||||
# Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
|
||||
|
||||
if (${compress_type} MATCHES "SVN")
|
||||
EXTERNALPROJECT_ADD (JPEG
|
||||
SVN_REPOSITORY ${JPEG_URL}
|
||||
# [SVN_REVISION rev]
|
||||
INSTALL_COMMAND ""
|
||||
CMAKE_ARGS
|
||||
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
|
||||
-DJPEG_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
|
||||
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
|
||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
||||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "GIT")
|
||||
if (${compress_type} MATCHES "GIT")
|
||||
EXTERNALPROJECT_ADD (JPEG
|
||||
GIT_REPOSITORY ${JPEG_URL}
|
||||
GIT_TAG ${JPEG_BRANCH}
|
||||
@ -49,6 +31,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "TGZ")
|
||||
EXTERNALPROJECT_ADD (JPEG
|
||||
@ -67,23 +50,24 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
endif ()
|
||||
externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
|
||||
|
||||
##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
|
||||
# Create imported target jpeg-static
|
||||
add_library(jpeg-static STATIC IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "")
|
||||
add_dependencies (jpeg-static JPEG)
|
||||
set (JPEG_STATIC_LIBRARY "jpeg-static")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}jpeg-static STATIC IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}jpeg-static "jpeg" STATIC "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}jpeg-static JPEG)
|
||||
set (JPEG_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}jpeg-static")
|
||||
set (JPEG_LIBRARIES ${JPEG_STATIC_LIBRARY})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# Create imported target jpeg-shared
|
||||
add_library(jpeg-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
|
||||
add_dependencies (jpeg-shared JPEG)
|
||||
set (JPEG_SHARED_LIBRARY "jpeg-shared")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}jpeg-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}jpeg-shared "jpeg" SHARED "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}jpeg-shared JPEG)
|
||||
set (JPEG_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}jpeg-shared")
|
||||
set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_SHARED_LIBRARY})
|
||||
endif ()
|
||||
|
||||
@ -100,33 +84,14 @@ macro (PACKAGE_JPEG_LIBRARY compress_type)
|
||||
COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
|
||||
)
|
||||
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
|
||||
add_dependencies (JPEG-GenHeader-Copy JPEG)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
|
||||
if (${compress_type} MATCHES "SVN")
|
||||
EXTERNALPROJECT_ADD (SZIP
|
||||
SVN_REPOSITORY ${SZIP_URL}
|
||||
# [SVN_REVISION rev]
|
||||
INSTALL_COMMAND ""
|
||||
CMAKE_ARGS
|
||||
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
|
||||
-DSZIP_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
|
||||
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
|
||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
||||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "GIT")
|
||||
if (${compress_type} MATCHES "GIT")
|
||||
EXTERNALPROJECT_ADD (SZIP
|
||||
GIT_REPOSITORY ${SZIP_URL}
|
||||
GIT_TAG ${SZIP_BRANCH}
|
||||
@ -144,6 +109,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "TGZ")
|
||||
EXTERNALPROJECT_ADD (SZIP
|
||||
@ -163,23 +129,24 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
endif ()
|
||||
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
|
||||
|
||||
##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
|
||||
# Create imported target szip-static
|
||||
add_library(szip-static STATIC IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "")
|
||||
add_dependencies (szip-static SZIP)
|
||||
set (SZIP_STATIC_LIBRARY "szip-static")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}szip-static STATIC IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-static "szip" STATIC "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-static SZIP)
|
||||
set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-static")
|
||||
set (SZIP_LIBRARIES ${SZIP_STATIC_LIBRARY})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# Create imported target szip-shared
|
||||
add_library(szip-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
|
||||
add_dependencies (szip-shared SZIP)
|
||||
set (SZIP_SHARED_LIBRARY "szip-shared")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}szip-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-shared "szip" SHARED "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}szip-shared SZIP)
|
||||
set (SZIP_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}szip-shared")
|
||||
set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_SHARED_LIBRARY})
|
||||
endif ()
|
||||
|
||||
@ -196,32 +163,14 @@ macro (PACKAGE_SZIP_LIBRARY compress_type)
|
||||
COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
|
||||
)
|
||||
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
|
||||
add_dependencies (SZIP-GenHeader-Copy SZIP)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
macro (EXTERNAL_ZLIB_LIBRARY compress_type)
|
||||
if (${compress_type} MATCHES "SVN")
|
||||
EXTERNALPROJECT_ADD (ZLIB
|
||||
SVN_REPOSITORY ${ZLIB_URL}
|
||||
# [SVN_REVISION rev]
|
||||
INSTALL_COMMAND ""
|
||||
CMAKE_ARGS
|
||||
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
|
||||
-DZLIB_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
|
||||
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
|
||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
|
||||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "GIT")
|
||||
if (${compress_type} MATCHES "GIT")
|
||||
EXTERNALPROJECT_ADD (ZLIB
|
||||
GIT_REPOSITORY ${ZLIB_URL}
|
||||
GIT_TAG ${ZLIB_BRANCH}
|
||||
@ -238,6 +187,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
elseif (${compress_type} MATCHES "TGZ")
|
||||
EXTERNALPROJECT_ADD (ZLIB
|
||||
@ -256,6 +206,7 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
|
||||
-DCMAKE_PDB_OUTPUT_DIRECTORY:PATH=${CMAKE_PDB_OUTPUT_DIRECTORY}
|
||||
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
|
||||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE}
|
||||
)
|
||||
endif ()
|
||||
externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
|
||||
@ -267,17 +218,18 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
|
||||
endif ()
|
||||
##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
|
||||
# Create imported target zlib-static
|
||||
add_library(zlib-static STATIC IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "")
|
||||
add_dependencies (zlib-static ZLIB)
|
||||
set (ZLIB_STATIC_LIBRARY "zlib-static")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}zlib-static STATIC IMPORTED)
|
||||
# add_library(${HDF_PACKAGE_NAMESPACE}zlib-static ALIAS zlib-static)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-static ${ZLIB_LIB_NAME} STATIC "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-static ZLIB)
|
||||
set (ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
|
||||
set (ZLIB_LIBRARIES ${ZLIB_STATIC_LIBRARY})
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# Create imported target zlib-shared
|
||||
add_library(zlib-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "")
|
||||
add_dependencies (zlib-shared ZLIB)
|
||||
set (ZLIB_SHARED_LIBRARY "zlib-shared")
|
||||
add_library(${HDF_PACKAGE_NAMESPACE}zlib-shared SHARED IMPORTED)
|
||||
HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}zlib-shared ${ZLIB_LIB_NAME} SHARED "")
|
||||
add_dependencies (${HDF_PACKAGE_NAMESPACE}zlib-shared ZLIB)
|
||||
set (ZLIB_SHARED_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-shared")
|
||||
set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
|
||||
endif ()
|
||||
|
||||
@ -294,7 +246,7 @@ macro (PACKAGE_ZLIB_LIBRARY compress_type)
|
||||
COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
|
||||
)
|
||||
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
|
||||
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "TGZ")
|
||||
add_dependencies (ZLIB-GenHeader-Copy ZLIB)
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
@ -24,7 +24,7 @@ AC_PREREQ([2.69])
|
||||
## NOTE: Do not forget to change the version number here when we do a
|
||||
## release!!!
|
||||
##
|
||||
AC_INIT([HDF5], [1.11.4], [help@hdfgroup.org])
|
||||
AC_INIT([HDF5], [1.11.5], [help@hdfgroup.org])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/H5.c])
|
||||
AC_CONFIG_HEADERS([src/H5config.h])
|
||||
@ -48,7 +48,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # use silent rules where a
|
||||
##
|
||||
## By default, it is enabled. Users can configure with
|
||||
## --disable-maintainer-mode to prevent running the autotools.
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
AM_MAINTAINER_MODE([disable])
|
||||
|
||||
## ----------------------------------------------------------------------
|
||||
## Set prefix default (install directory) to a directory in the build area.
|
||||
|
@ -304,7 +304,7 @@ CONTAINS
|
||||
IMPLICIT NONE
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataset
|
||||
INTEGER , INTENT(in) :: idx ! The dimension
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label
|
||||
INTEGER(SIZE_T), INTENT(in) :: label_len ! Length of label
|
||||
END FUNCTION H5DSset_label_c
|
||||
END INTERFACE
|
||||
@ -337,11 +337,11 @@ CONTAINS
|
||||
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataget
|
||||
INTEGER , INTENT(in) :: idx ! The dimension
|
||||
CHARACTER(LEN=*), INTENT(in) :: label ! The label
|
||||
INTEGER(size_t) , INTENT(inout) :: size ! The length of the label buffer
|
||||
INTEGER :: errcode ! Error code
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataget
|
||||
INTEGER , INTENT(in) :: idx ! The dimension
|
||||
CHARACTER(LEN=*), INTENT(INOUT) :: label ! The label
|
||||
INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the label buffer
|
||||
INTEGER :: errcode ! Error code
|
||||
INTEGER :: c_idx
|
||||
|
||||
INTERFACE
|
||||
@ -352,7 +352,7 @@ CONTAINS
|
||||
IMPLICIT NONE
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataget
|
||||
INTEGER , INTENT(in) :: idx ! The dimension
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: label ! The label
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: label ! The label
|
||||
INTEGER(SIZE_T), INTENT(inout) :: size ! Length of label
|
||||
END FUNCTION H5DSget_label_c
|
||||
END INTERFACE
|
||||
@ -386,8 +386,8 @@ CONTAINS
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataget
|
||||
CHARACTER(LEN=*), INTENT(out) :: name ! The name
|
||||
INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer
|
||||
CHARACTER(LEN=*), INTENT(INOUT) :: name ! The name
|
||||
INTEGER(size_t) , INTENT(INOUT) :: size ! The length of the name buffer
|
||||
INTEGER :: errcode ! Error code
|
||||
|
||||
INTERFACE
|
||||
@ -397,7 +397,7 @@ CONTAINS
|
||||
IMPORT :: HID_T, SIZE_T
|
||||
IMPLICIT NONE
|
||||
INTEGER(hid_t), INTENT(in) :: did ! The dataget
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(out) :: name ! The name
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(INOUT) :: name ! The name
|
||||
INTEGER(SIZE_T), INTENT(inout) :: size ! Length of name
|
||||
END FUNCTION H5DSget_scale_name_c
|
||||
END INTERFACE
|
||||
@ -426,10 +426,10 @@ CONTAINS
|
||||
SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode)
|
||||
|
||||
IMPLICIT NONE
|
||||
INTEGER(hid_t), INTENT(in) :: did ! the dataset
|
||||
INTEGER , INTENT(in) :: idx ! the dimension of did to query
|
||||
INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(hid_t), INTENT(in) :: did ! the dataset
|
||||
INTEGER , INTENT(in) :: idx ! the dimension of did to query
|
||||
INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER :: c_idx
|
||||
|
||||
INTERFACE
|
||||
@ -437,9 +437,9 @@ CONTAINS
|
||||
BIND(C,NAME='h5dsget_num_scales_c')
|
||||
IMPORT :: HID_T
|
||||
IMPLICIT NONE
|
||||
INTEGER(hid_t), INTENT(in) :: did ! the dataset
|
||||
INTEGER , INTENT(in) :: idx ! the dimension of did to query
|
||||
INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did
|
||||
INTEGER(hid_t), INTENT(in) :: did ! the dataset
|
||||
INTEGER , INTENT(in) :: idx ! the dimension of did to query
|
||||
INTEGER , INTENT(INOUT) :: num_scales ! the number of Dimension Scales associated with did
|
||||
END FUNCTION H5DSget_num_scales_c
|
||||
END INTERFACE
|
||||
|
||||
|
@ -293,7 +293,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
@ -354,7 +354,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
@ -414,7 +414,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
@ -510,7 +510,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id'
|
||||
WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
@ -540,7 +540,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id'
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims'
|
||||
WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT)'//TRIM(rank_dim_line(j))//', TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
@ -712,7 +712,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1'
|
||||
@ -778,7 +778,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: start'
|
||||
WRITE(11,'(A)') ' INTEGER(hsize_t), INTENT(in) :: nrecords'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t), INTENT(in) :: type_size'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(INOUT), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode '
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr'
|
||||
@ -809,7 +809,7 @@ PROGRAM H5HL_buildiface
|
||||
WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(in) :: field_name'
|
||||
WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: field_type'
|
||||
WRITE(11,'(A)') ' INTEGER, INTENT(in) :: field_index'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(in), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' REAL(KIND='//TRIM(ADJUSTL(chr2))//'), INTENT(IN), DIMENSION(*), TARGET :: buf'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen'
|
||||
WRITE(11,'(A)') ' INTEGER(size_t) :: namelen1'
|
||||
WRITE(11,'(A)') ' INTEGER :: errcode'
|
||||
|
@ -539,7 +539,7 @@ CONTAINS
|
||||
INTEGER, INTENT(in) :: pal_number ! palette number
|
||||
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
|
||||
INTERFACE
|
||||
INTEGER FUNCTION h5imget_palette_info_c(loc_id,namelen,dset_name,pal_number,dims) &
|
||||
@ -551,7 +551,7 @@ CONTAINS
|
||||
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(in) :: dset_name ! name of the dataset
|
||||
INTEGER, INTENT(in) :: pal_number ! palette number
|
||||
INTEGER(hsize_t), DIMENSION(*), INTENT(inout) :: dims ! dimensions
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
END FUNCTION h5imget_palette_info_c
|
||||
END INTERFACE
|
||||
|
||||
|
@ -532,7 +532,7 @@ CONTAINS
|
||||
INTEGER(hsize_t), INTENT(in) :: start ! start record
|
||||
INTEGER(hsize_t), INTENT(in) :: nrecords ! records
|
||||
INTEGER(size_t), INTENT(in) :: type_size ! type size
|
||||
INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
INTEGER(size_t) :: namelen1
|
||||
@ -564,7 +564,7 @@ CONTAINS
|
||||
INTEGER(hsize_t), INTENT(in) :: start ! start record
|
||||
INTEGER(hsize_t), INTENT(in) :: nrecords ! records
|
||||
INTEGER(size_t), INTENT(in) :: type_size ! type size
|
||||
CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
INTEGER(size_t) :: namelen1 ! name length
|
||||
@ -687,7 +687,7 @@ CONTAINS
|
||||
INTEGER(hsize_t), INTENT(in) :: start ! start record
|
||||
INTEGER(hsize_t), INTENT(in) :: nrecords ! records
|
||||
INTEGER(size_t), INTENT(in) :: type_size ! type size
|
||||
INTEGER, INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER, INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
TYPE(C_PTR) :: f_ptr
|
||||
@ -716,7 +716,7 @@ CONTAINS
|
||||
INTEGER(hsize_t), INTENT(in) :: start ! start record
|
||||
INTEGER(hsize_t), INTENT(in) :: nrecords ! records
|
||||
INTEGER(size_t), INTENT(in) :: type_size ! type size
|
||||
CHARACTER(LEN=*), INTENT(in), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
CHARACTER(LEN=*), INTENT(INOUT), DIMENSION(*), TARGET :: buf ! data buffer
|
||||
INTEGER :: errcode ! error code
|
||||
INTEGER(size_t) :: namelen ! name length
|
||||
TYPE(C_PTR) :: f_ptr
|
||||
|
@ -88,18 +88,26 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes
|
||||
|
||||
macro (ADD_H5_ERR_TEST resultfile resultcode)
|
||||
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
add_test (
|
||||
NAME H5WATCH_ARGS-h5watch-${resultfile}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
|
||||
-D "TEST_ARGS:STRING=${ARGN}"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
|
||||
-D "TEST_OUTPUT=${resultfile}.out"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_REFERENCE=${resultfile}.mty"
|
||||
-D "TEST_ERRREF=${resultfile}.err"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
if (SKIP_ERROR_STACK_TESTS)
|
||||
add_test (
|
||||
NAME H5WATCH_ARGS-h5watch-${resultfile}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "SKIP Error Stack Test"
|
||||
)
|
||||
set_property(TEST H5WATCH_ARGS-h5watch-${resultfile} PROPERTY DISABLED)
|
||||
else ()
|
||||
add_test (
|
||||
NAME H5WATCH_ARGS-h5watch-${resultfile}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5watch>"
|
||||
-D "TEST_ARGS:STRING=${ARGN}"
|
||||
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
|
||||
-D "TEST_OUTPUT=${resultfile}.out"
|
||||
-D "TEST_EXPECT=${resultcode}"
|
||||
-D "TEST_REFERENCE=${resultfile}.mty"
|
||||
-D "TEST_ERRREF=${resultfile}.err"
|
||||
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
|
||||
)
|
||||
endif ()
|
||||
set_tests_properties (H5WATCH_ARGS-h5watch-${resultfile} PROPERTIES DEPENDS ${last_test})
|
||||
set (last_test "H5WATCH_ARGS-h5watch-${resultfile}")
|
||||
endif ()
|
||||
|
@ -212,7 +212,7 @@ import hdf.hdf5lib.structs.H5O_info_t;
|
||||
* exception handlers to print out the HDF-5 error stack.
|
||||
* <hr>
|
||||
*
|
||||
* @version HDF5 1.11.4 <BR>
|
||||
* @version HDF5 1.11.5 <BR>
|
||||
* <b>See also: <a href ="./hdf.hdf5lib.HDFArray.html"> hdf.hdf5lib.HDFArray</a> </b><BR>
|
||||
* <a href ="./hdf.hdf5lib.HDF5Constants.html"> hdf.hdf5lib.HDF5Constants</a><BR>
|
||||
* <a href ="./hdf.hdf5lib.HDF5CDataTypes.html"> hdf.hdf5lib.HDF5CDataTypes</a><BR>
|
||||
@ -235,7 +235,7 @@ public class H5 implements java.io.Serializable {
|
||||
*
|
||||
* Make sure to update the versions number when a different library is used.
|
||||
*/
|
||||
public final static int LIB_VERSION[] = { 1, 11, 4 };
|
||||
public final static int LIB_VERSION[] = { 1, 11, 5 };
|
||||
|
||||
public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib";
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class TestH5 {
|
||||
*/
|
||||
@Test
|
||||
public void testH5get_libversion() {
|
||||
int libversion[] = { 1, 11, 4 };
|
||||
int libversion[] = { 1, 11, 5 };
|
||||
|
||||
try {
|
||||
H5.H5get_libversion(libversion);
|
||||
@ -201,7 +201,7 @@ public class TestH5 {
|
||||
*/
|
||||
@Test
|
||||
public void testH5check_version() {
|
||||
int majnum = 1, minnum = 11, relnum = 4;
|
||||
int majnum = 1, minnum = 11, relnum = 5;
|
||||
|
||||
try {
|
||||
H5.H5check_version(majnum, minnum, relnum);
|
||||
|
@ -652,6 +652,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
|
||||
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
|
||||
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
|
||||
HDF5_TEST_VOL "Execute tests with different VOL connectors" OFF
|
||||
SKIP_ERROR_STACK_TESTS "Skip tests that check the error stack" OFF
|
||||
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
|
||||
HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
|
||||
HDF5_USE_110_API_DEFAULT "Use the HDF5 1.10.x API by default" OFF
|
||||
|
@ -1,4 +1,4 @@
|
||||
version 1.11.4 currently under development
|
||||
HDF5 version 1.11.5 currently under development
|
||||
================================================================================
|
||||
|
||||
|
||||
@ -48,6 +48,14 @@ New Features
|
||||
|
||||
Configuration:
|
||||
-------------
|
||||
- Skip tools test that test the error stack
|
||||
|
||||
There are some use cases which can cause the error stack of tools to be
|
||||
different then the expected. An option, SKIP_ERROR_STACK_TESTS, was added
|
||||
that will skip over tests that test the error stack.
|
||||
|
||||
(ADB - 2019/03/26, HDFFV-10741)
|
||||
|
||||
- Keep stderr and stdout separate in tests
|
||||
|
||||
Changed test handling of output capture. Tests now keep the stderr
|
||||
@ -135,14 +143,22 @@ New Features
|
||||
|
||||
(DER - 2018/12/08, HDFFV-10252)
|
||||
|
||||
- Added the ability to open files with UTF-8 file names on Windows.
|
||||
|
||||
The POSIX open(2) API call on Windows is limited to ASCII
|
||||
file names. The library has been updated to convert incoming file
|
||||
names to UTF-16 (via MultiByteToWideChar(CP_UTF8, ...) and use
|
||||
_wopen() instead.
|
||||
|
||||
(DER - 2019/03/15, HDFFV-2714, HDFFV-3914, HDFFV-3895, HDFFV-8237, HDFFV-10413, HDFFV-10691)
|
||||
|
||||
Parallel Library:
|
||||
-----------------
|
||||
- Changed the default behavior in parallel when reading the same dataset in its entirely
|
||||
(i.e. H5S_ALL dataset selection) which is being read by all the processes collectively.
|
||||
The dataset mush be contiguous, less than 2GB, and of an atomic datatype.
|
||||
The new behavior is the HDF5 library will use an MPI_Bcast to pass the data read from
|
||||
the disk by the root process to the remain processes in the MPI communicator associated
|
||||
The new behavior is the HDF5 library will use an MPI_Bcast to pass the data read from
|
||||
the disk by the root process to the remain processes in the MPI communicator associated
|
||||
with the HDF5 file.
|
||||
|
||||
(MSB - 2019/01/02, HDFFV-10652)
|
||||
@ -157,10 +173,10 @@ New Features
|
||||
|
||||
- Added new Fortran API, H5gmtime, which converts (C) 'time_t' structure
|
||||
to Fortran DATE AND TIME storage format.
|
||||
|
||||
|
||||
(MSB, 2019/01/08, HDFFV-10443)
|
||||
|
||||
- Added new Fortran 'fields' optional parameter to: h5ovisit_f, h5oget_info_by_name_f,
|
||||
- Added new Fortran 'fields' optional parameter to: h5ovisit_f, h5oget_info_by_name_f,
|
||||
h5oget_info, h5oget_info_by_idx and h5ovisit_by_name_f.
|
||||
|
||||
(MSB, 2019/01/08, HDFFV-10443)
|
||||
@ -224,15 +240,27 @@ Bug Fixes since HDF5-1.10.3 release
|
||||
|
||||
Library
|
||||
-------
|
||||
- Fixed a bug that would cause an error or cause fill values to be
|
||||
incorrectly read from a chunked dataset using the "single chunk" index if
|
||||
the data was held in cache and there was no data on disk.
|
||||
|
||||
(NAF - 2019/03/06)
|
||||
|
||||
- Fixed a bug that could cause an error or cause fill values to be
|
||||
incorrectly read from a dataset that was written to using H5Dwrite_chunk
|
||||
if the dataset was not closed after writing.
|
||||
|
||||
(NAF - 2019/03/06, HDFFV-10716)
|
||||
|
||||
- Fixed memory leak in scale offset filter
|
||||
|
||||
In a special case where the MinBits is the same as the number of bits in
|
||||
the datatype's precision, the filter's data buffer was not freed, causing
|
||||
the datatype's precision, the filter's data buffer was not freed, causing
|
||||
the memory usage to grow. In general the buffer was freed correctly. The
|
||||
Minbits are the minimal number of bits to store the data values. Please
|
||||
Minbits are the minimal number of bits to store the data values. Please
|
||||
see the reference manual for H5Pset_scaleoffset for the detail.
|
||||
|
||||
(RL - 2019/3/4, HDFFV-10705)
|
||||
(RL - 2019/3/4, HDFFV-10705)
|
||||
|
||||
- Fix hangs with collective metadata reads during chunked dataset I/O
|
||||
|
||||
@ -273,8 +301,8 @@ Bug Fixes since HDF5-1.10.3 release
|
||||
|
||||
When deleting the attribute nodes from the name index v2 B-tree,
|
||||
if an attribute is found in the intermediate B-tree nodes,
|
||||
which may be merged/redistributed in the process, we need to
|
||||
free the dynamically allocated spaces for the intermediate
|
||||
which may be merged/redistributed in the process, we need to
|
||||
free the dynamically allocated spaces for the intermediate
|
||||
decoded attribute.
|
||||
|
||||
(VC - 2018/12/26, HDFFV-10659)
|
||||
@ -351,10 +379,10 @@ Bug Fixes since HDF5-1.10.3 release
|
||||
Fortran
|
||||
--------
|
||||
- Added symbolic links libhdf5_hl_fortran.so to libhdf5hl_fortran.so and
|
||||
libhdf5_hl_fortran.a to libhdf5hl_fortran.a in hdf5/lib directory for
|
||||
autotools installs. These were added to match the name of the files
|
||||
installed by cmake and the general pattern of hl lib files. We will
|
||||
change the names of the installed lib files to the matching name in
|
||||
libhdf5_hl_fortran.a to libhdf5hl_fortran.a in hdf5/lib directory for
|
||||
autotools installs. These were added to match the name of the files
|
||||
installed by cmake and the general pattern of hl lib files. We will
|
||||
change the names of the installed lib files to the matching name in
|
||||
the next major release.
|
||||
|
||||
(LRK - 2019/01/04, HDFFV-10596)
|
||||
@ -365,7 +393,7 @@ Bug Fixes since HDF5-1.10.3 release
|
||||
|
||||
(MSB, 2018/12/04, HDFFV-10511)
|
||||
|
||||
- Fixed issue with Fortran not returning h5o_info_t field values
|
||||
- Fixed issue with Fortran not returning h5o_info_t field values
|
||||
meta_size%attr%index_size and meta_size%attr%heap_size.
|
||||
|
||||
(MSB, 2018/1/8, HDFFV-10443)
|
||||
@ -648,10 +676,10 @@ Bug Fixes since HDF5-1.10.2 release
|
||||
conversions from or to long double types, especially when special values
|
||||
such as infinity or NAN were involved. In some cases the results differed
|
||||
by extremely small amounts from those on other machines, while some other
|
||||
tests resulted in segmentation faults. These conversion tests with long
|
||||
double types have been disabled for ppc64 machines until the problems are
|
||||
tests resulted in segmentation faults. These conversion tests with long
|
||||
double types have been disabled for ppc64 machines until the problems are
|
||||
better understood and can be properly addressed.
|
||||
|
||||
|
||||
(SRL - 2019/01/07, TRILAB-98)
|
||||
|
||||
Supported Platforms
|
||||
|
@ -38,12 +38,14 @@ II. Building HDF5 Examples with CMake
|
||||
|
||||
Files in the HDF5 install directory:
|
||||
HDF5Examples folder
|
||||
CTestScript.cmake
|
||||
HDF5_Examples.cmake
|
||||
HDF5_Examples_options.cmake
|
||||
|
||||
Default installation process:
|
||||
Create a directory to run the examples, i.e. \test_hdf5.
|
||||
Copy HDF5Examples folder to this directory.
|
||||
Copy CTestScript.cmake to this directory.
|
||||
Copy HDF5_Examples.cmake to this directory.
|
||||
Copy HDF5_Examples_options.cmake to this directory.
|
||||
The default source folder is defined as "HDF5Examples". It can be changed
|
||||
|
@ -1120,7 +1120,7 @@ target_link_libraries (${HDF5_LIB_TARGET}
|
||||
)
|
||||
if (NOT WIN32)
|
||||
target_link_libraries (${HDF5_LIB_TARGET}
|
||||
PUBLIC $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
|
||||
PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
|
||||
)
|
||||
endif ()
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
|
||||
@ -1152,8 +1152,8 @@ if (BUILD_SHARED_LIBS)
|
||||
)
|
||||
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED)
|
||||
target_link_libraries (${HDF5_LIBSH_TARGET}
|
||||
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
||||
PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}> $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
|
||||
PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
|
||||
PUBLIC $<$<NOT:$<PLATFORM_ID:Windows>>:${CMAKE_DL_LIBS}>
|
||||
)
|
||||
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}")
|
||||
H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED "LIB")
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Apkg.h" /* Attributes */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5SMprivate.h" /* Shared object header messages */
|
||||
|
||||
|
||||
@ -318,7 +319,7 @@ H5A__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_U
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Encode the record's fields */
|
||||
HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
|
||||
raw += H5O_FHEAP_ID_LEN;
|
||||
*raw++ = nrecord->flags;
|
||||
UINT32ENCODE(raw, nrecord->corder)
|
||||
@ -349,7 +350,7 @@ H5A__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Decode the record's fields */
|
||||
HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
|
||||
raw += H5O_FHEAP_ID_LEN;
|
||||
nrecord->flags = *raw++;
|
||||
UINT32DECODE(raw, nrecord->corder)
|
||||
@ -477,7 +478,7 @@ H5A__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Encode the record's fields */
|
||||
HDmemcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
|
||||
raw += H5O_FHEAP_ID_LEN;
|
||||
*raw++ = nrecord->flags;
|
||||
UINT32ENCODE(raw, nrecord->corder)
|
||||
@ -507,7 +508,7 @@ H5A__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Decode the record's fields */
|
||||
HDmemcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
|
||||
raw += H5O_FHEAP_ID_LEN;
|
||||
nrecord->flags = *raw++;
|
||||
UINT32DECODE(raw, nrecord->corder)
|
||||
|
20
src/H5Aint.c
20
src/H5Aint.c
@ -646,21 +646,21 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
/* Copy the attribute data into the buffer for conversion */
|
||||
HDmemcpy(tconv_buf, attr->shared->data, (src_type_size * nelmts));
|
||||
H5MM_memcpy(tconv_buf, attr->shared->data, (src_type_size * nelmts));
|
||||
|
||||
/* Perform datatype conversion. */
|
||||
if(H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < 0)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "datatype conversion failed")
|
||||
|
||||
/* Copy the converted data into the user's buffer */
|
||||
HDmemcpy(buf, tconv_buf, (dst_type_size * nelmts));
|
||||
H5MM_memcpy(buf, tconv_buf, (dst_type_size * nelmts));
|
||||
} /* end if */
|
||||
/* No type conversion necessary */
|
||||
else {
|
||||
HDassert(dst_type_size == src_type_size);
|
||||
|
||||
/* Copy the attribute data into the user's buffer */
|
||||
HDmemcpy(buf, attr->shared->data, (dst_type_size * nelmts));
|
||||
H5MM_memcpy(buf, attr->shared->data, (dst_type_size * nelmts));
|
||||
} /* end else */
|
||||
} /* end else */
|
||||
} /* end if */
|
||||
@ -747,7 +747,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, FAIL, "memory allocation failed")
|
||||
|
||||
/* Copy the user's data into the buffer for conversion */
|
||||
HDmemcpy(tconv_buf, buf, (src_type_size * nelmts));
|
||||
H5MM_memcpy(tconv_buf, buf, (src_type_size * nelmts));
|
||||
|
||||
/* Perform datatype conversion */
|
||||
if(H5T_convert(tpath, src_id, dst_id, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < 0)
|
||||
@ -771,7 +771,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
/* Copy the attribute data into the user's buffer */
|
||||
HDmemcpy(attr->shared->data, buf, (dst_type_size * nelmts));
|
||||
H5MM_memcpy(attr->shared->data, buf, (dst_type_size * nelmts));
|
||||
} /* end else */
|
||||
|
||||
/* Modify the attribute in the object header */
|
||||
@ -827,7 +827,7 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf)
|
||||
|
||||
/* Copy all/some of the name */
|
||||
if(buf && copy_len > 0) {
|
||||
HDmemcpy(buf, attr->shared->name, copy_len);
|
||||
H5MM_memcpy(buf, attr->shared->name, copy_len);
|
||||
|
||||
/* Terminate the string */
|
||||
buf[copy_len]='\0';
|
||||
@ -2240,7 +2240,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
|
||||
if(NULL == (buf = H5FL_BLK_MALLOC(attr_buf, buf_size)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk")
|
||||
|
||||
HDmemcpy(buf, attr_src->shared->data, attr_src->shared->data_size);
|
||||
H5MM_memcpy(buf, attr_src->shared->data, attr_src->shared->data_size);
|
||||
|
||||
/* Allocate background memory */
|
||||
if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst))
|
||||
@ -2251,7 +2251,7 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
|
||||
if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed")
|
||||
|
||||
HDmemcpy(reclaim_buf, buf, buf_size);
|
||||
H5MM_memcpy(reclaim_buf, buf, buf_size);
|
||||
|
||||
/* Set background buffer to all zeros */
|
||||
if(bkg_buf)
|
||||
@ -2261,14 +2261,14 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s
|
||||
if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "datatype conversion NULLed")
|
||||
|
||||
HDmemcpy(attr_dst->shared->data, buf, attr_dst->shared->data_size);
|
||||
H5MM_memcpy(attr_dst->shared->data, buf, attr_dst->shared->data_size);
|
||||
|
||||
if(H5D_vlen_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, NULL, "unable to reclaim variable-length data")
|
||||
} /* end if */
|
||||
else {
|
||||
HDassert(attr_dst->shared->data_size == attr_src->shared->data_size);
|
||||
HDmemcpy(attr_dst->shared->data, attr_src->shared->data, attr_src->shared->data_size);
|
||||
H5MM_memcpy(attr_dst->shared->data, attr_src->shared->data, attr_src->shared->data_size);
|
||||
} /* end else */
|
||||
} /* end if(attr_src->shared->data) */
|
||||
|
||||
|
53
src/H5B.c
53
src/H5B.c
@ -107,6 +107,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5Pprivate.h" /* Property lists */
|
||||
|
||||
|
||||
@ -484,10 +485,10 @@ H5B__split(H5F_t *f, H5B_ins_ud_t *bt_ud, unsigned idx,
|
||||
*/
|
||||
|
||||
split_bt_ud->cache_flags = H5AC__DIRTIED_FLAG;
|
||||
HDmemcpy(split_bt_ud->bt->native,
|
||||
H5MM_memcpy(split_bt_ud->bt->native,
|
||||
bt_ud->bt->native + nleft * shared->type->sizeof_nkey,
|
||||
(nright + 1) * shared->type->sizeof_nkey);
|
||||
HDmemcpy(split_bt_ud->bt->child,
|
||||
H5MM_memcpy(split_bt_ud->bt->child,
|
||||
&bt_ud->bt->child[nleft],
|
||||
nright * sizeof(haddr_t));
|
||||
|
||||
@ -612,9 +613,9 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
|
||||
|
||||
/* update left and right keys */
|
||||
if(!lt_key_changed)
|
||||
HDmemcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
|
||||
H5MM_memcpy(lt_key, H5B_NKEY(bt_ud.bt,shared,0), type->sizeof_nkey);
|
||||
if(!rt_key_changed)
|
||||
HDmemcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
|
||||
H5MM_memcpy(rt_key, H5B_NKEY(split_bt_ud.bt,shared,split_bt_ud.bt->nchildren), type->sizeof_nkey);
|
||||
|
||||
/*
|
||||
* Copy the old root node to some other file location and make the new root
|
||||
@ -657,11 +658,11 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata)
|
||||
new_root_bt->nchildren = 2;
|
||||
|
||||
new_root_bt->child[0] = bt_ud.addr;
|
||||
HDmemcpy(H5B_NKEY(new_root_bt, shared, 0), lt_key, shared->type->sizeof_nkey);
|
||||
H5MM_memcpy(H5B_NKEY(new_root_bt, shared, 0), lt_key, shared->type->sizeof_nkey);
|
||||
|
||||
new_root_bt->child[1] = split_bt_ud.addr;
|
||||
HDmemcpy(H5B_NKEY(new_root_bt, shared, 1), md_key, shared->type->sizeof_nkey);
|
||||
HDmemcpy(H5B_NKEY(new_root_bt, shared, 2), rt_key, shared->type->sizeof_nkey);
|
||||
H5MM_memcpy(H5B_NKEY(new_root_bt, shared, 1), md_key, shared->type->sizeof_nkey);
|
||||
H5MM_memcpy(H5B_NKEY(new_root_bt, shared, 2), rt_key, shared->type->sizeof_nkey);
|
||||
|
||||
/* Insert the modified copy of the old root into the file again */
|
||||
if(H5AC_insert_entry(f, H5AC_BT, addr, new_root_bt, H5AC__NO_FLAGS_SET) < 0)
|
||||
@ -726,9 +727,9 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
|
||||
base = H5B_NKEY(bt, shared, (idx + 1));
|
||||
if((idx + 1) == bt->nchildren) {
|
||||
/* Make room for the new key */
|
||||
HDmemcpy(base + shared->type->sizeof_nkey, base,
|
||||
H5MM_memcpy(base + shared->type->sizeof_nkey, base,
|
||||
shared->type->sizeof_nkey); /* No overlap possible - memcpy() OK */
|
||||
HDmemcpy(base, md_key, shared->type->sizeof_nkey);
|
||||
H5MM_memcpy(base, md_key, shared->type->sizeof_nkey);
|
||||
|
||||
/* The MD_KEY is the left key of the new node */
|
||||
if(H5B_INS_RIGHT == anchor)
|
||||
@ -741,7 +742,7 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
|
||||
/* Make room for the new key */
|
||||
HDmemmove(base + shared->type->sizeof_nkey, base,
|
||||
(bt->nchildren - idx) * shared->type->sizeof_nkey);
|
||||
HDmemcpy(base, md_key, shared->type->sizeof_nkey);
|
||||
H5MM_memcpy(base, md_key, shared->type->sizeof_nkey);
|
||||
|
||||
/* The MD_KEY is the left key of the new node */
|
||||
if(H5B_INS_RIGHT == anchor)
|
||||
@ -915,7 +916,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
|
||||
* node. This node is not empty (handled above).
|
||||
*/
|
||||
my_ins = H5B_INS_LEFT;
|
||||
HDmemcpy(md_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey);
|
||||
H5MM_memcpy(md_key, H5B_NKEY(bt,shared,idx), type->sizeof_nkey);
|
||||
if((type->new_node)(f, H5B_INS_LEFT, H5B_NKEY(bt, shared, idx), udata,
|
||||
md_key, &new_child_bt_ud.addr/*out*/) < 0)
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert minimum leaf node")
|
||||
@ -963,7 +964,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
|
||||
*/
|
||||
idx = bt->nchildren - 1;
|
||||
my_ins = H5B_INS_RIGHT;
|
||||
HDmemcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
H5MM_memcpy(md_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
if((type->new_node)(f, H5B_INS_RIGHT, md_key, udata,
|
||||
H5B_NKEY(bt, shared, idx + 1), &new_child_bt_ud.addr/*out*/) < 0)
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR, "can't insert maximum leaf node")
|
||||
@ -1021,7 +1022,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
|
||||
*lt_key_changed = FALSE;
|
||||
} /* end if */
|
||||
else
|
||||
HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
|
||||
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
|
||||
} /* end if */
|
||||
if(*rt_key_changed) {
|
||||
bt_ud->cache_flags |= H5AC__DIRTIED_FLAG;
|
||||
@ -1031,7 +1032,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
|
||||
*rt_key_changed = FALSE;
|
||||
} /* end if */
|
||||
else
|
||||
HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
} /* end if */
|
||||
|
||||
/*
|
||||
@ -1080,7 +1081,7 @@ H5B__insert_helper(H5F_t *f, H5B_ins_ud_t *bt_ud, const H5B_class_t *type,
|
||||
* by the left and right node).
|
||||
*/
|
||||
if(split_bt_ud->bt) {
|
||||
HDmemcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
|
||||
H5MM_memcpy(md_key, H5B_NKEY(split_bt_ud->bt, shared, 0), type->sizeof_nkey);
|
||||
ret_value = H5B_INS_RIGHT;
|
||||
#ifdef H5B_DEBUG
|
||||
/*
|
||||
@ -1339,7 +1340,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
/* Don't propagate change out of this B-tree node */
|
||||
*lt_key_changed = FALSE;
|
||||
else
|
||||
HDmemcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
|
||||
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, idx), type->sizeof_nkey);
|
||||
} /* end if */
|
||||
if(*rt_key_changed) {
|
||||
HDassert(type->critical_key == H5B_RIGHT);
|
||||
@ -1348,7 +1349,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
/* Don't propagate change out of this B-tree node */
|
||||
*rt_key_changed = FALSE;
|
||||
else
|
||||
HDmemcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, idx + 1), type->sizeof_nkey);
|
||||
} /* end if */
|
||||
|
||||
/*
|
||||
@ -1383,7 +1384,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
* in its left neighbor, but only if it is not the critical
|
||||
* key for the right-most child of the left neighbor */
|
||||
if(type->critical_key == H5B_LEFT)
|
||||
HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
|
||||
H5MM_memcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
|
||||
H5B_NKEY(bt, shared, 1), type->sizeof_nkey);
|
||||
|
||||
sibling->right = bt->right;
|
||||
@ -1400,7 +1401,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
* its right neighbor, but only if it is not the critical
|
||||
* key for the left-most child of the right neighbor */
|
||||
if(type->critical_key == H5B_RIGHT)
|
||||
HDmemcpy(H5B_NKEY(sibling, shared, 0),
|
||||
H5MM_memcpy(H5B_NKEY(sibling, shared, 0),
|
||||
H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
|
||||
|
||||
sibling->left = bt->left;
|
||||
@ -1442,7 +1443,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
/* Slide all keys down 1, update lt_key */
|
||||
HDmemmove(H5B_NKEY(bt, shared, 0), H5B_NKEY(bt, shared, 1),
|
||||
bt->nchildren * type->sizeof_nkey);
|
||||
HDmemcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
|
||||
H5MM_memcpy(lt_key, H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
|
||||
*lt_key_changed = TRUE;
|
||||
} else
|
||||
/* Slide all but the leftmost 2 keys down, leaving the leftmost
|
||||
@ -1471,7 +1472,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey);
|
||||
else {
|
||||
/* Just update rt_key */
|
||||
HDmemcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1),
|
||||
H5MM_memcpy(rt_key, H5B_NKEY(bt, shared, bt->nchildren - 1),
|
||||
type->sizeof_nkey);
|
||||
*rt_key_changed = TRUE;
|
||||
} /* end else */
|
||||
@ -1516,7 +1517,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
if(NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->left, &cache_udata, H5AC__NO_FLAGS_SET)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node")
|
||||
|
||||
HDmemcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
|
||||
H5MM_memcpy(H5B_NKEY(sibling, shared, sibling->nchildren),
|
||||
H5B_NKEY(bt, shared, 0), type->sizeof_nkey);
|
||||
|
||||
if(H5AC_unprotect(f, H5AC_BT, bt->left, sibling, H5AC__DIRTIED_FLAG) < 0)
|
||||
@ -1531,7 +1532,7 @@ H5B__remove_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, int level,
|
||||
if(NULL == (sibling = (H5B_t *)H5AC_protect(f, H5AC_BT, bt->right, &cache_udata, H5AC__NO_FLAGS_SET)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, H5B_INS_ERROR, "unable to protect node")
|
||||
|
||||
HDmemcpy(H5B_NKEY(sibling, shared, 0),
|
||||
H5MM_memcpy(H5B_NKEY(sibling, shared, 0),
|
||||
H5B_NKEY(bt, shared, bt->nchildren), type->sizeof_nkey);
|
||||
|
||||
if(H5AC_unprotect(f, H5AC_BT, bt->right, sibling, H5AC__DIRTIED_FLAG) < 0)
|
||||
@ -1811,7 +1812,7 @@ H5B__copy(const H5B_t *old_bt)
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node")
|
||||
|
||||
/* Copy the main structure */
|
||||
HDmemcpy(new_node, old_bt, sizeof(H5B_t));
|
||||
H5MM_memcpy(new_node, old_bt, sizeof(H5B_t));
|
||||
|
||||
/* Reset cache info */
|
||||
HDmemset(&new_node->cache_info, 0, sizeof(H5AC_info_t));
|
||||
@ -1821,8 +1822,8 @@ H5B__copy(const H5B_t *old_bt)
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, NULL, "memory allocation failed for B-tree root node")
|
||||
|
||||
/* Copy the other structures */
|
||||
HDmemcpy(new_node->native, old_bt->native, shared->sizeof_keys);
|
||||
HDmemcpy(new_node->child, old_bt->child, (sizeof(haddr_t) * shared->two_k));
|
||||
H5MM_memcpy(new_node->native, old_bt->native, shared->sizeof_keys);
|
||||
H5MM_memcpy(new_node->child, old_bt->child, (sizeof(haddr_t) * shared->two_k));
|
||||
|
||||
/* Increment the ref-count on the raw page */
|
||||
H5UC_INC(new_node->rc_shared);
|
||||
|
@ -662,7 +662,7 @@ H5B2_find(H5B2_t *bt2, void *udata, H5B2_found_t op, void *op_data)
|
||||
if(hdr->min_native_rec == NULL)
|
||||
if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
|
||||
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
if(idx == (unsigned)(leaf->nrec - 1)) {
|
||||
@ -670,7 +670,7 @@ H5B2_find(H5B2_t *bt2, void *udata, H5B2_found_t op, void *op_data)
|
||||
if(hdr->max_native_rec == NULL)
|
||||
if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
|
||||
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
@ -1343,7 +1343,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
|
||||
if(hdr->min_native_rec == NULL)
|
||||
if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
|
||||
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
if(idx == (unsigned)(leaf->nrec - 1)) {
|
||||
@ -1351,7 +1351,7 @@ H5B2_modify(H5B2_t *bt2, void *udata, H5B2_modify_t op, void *op_data)
|
||||
if(hdr->max_native_rec == NULL)
|
||||
if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
|
||||
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
@ -391,7 +391,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
|
||||
HDassert(hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -811,7 +811,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
|
||||
HDassert(internal->hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1212,7 +1212,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H
|
||||
HDassert(leaf->hdr);
|
||||
|
||||
/* magic number */
|
||||
HDmemcpy(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* version # */
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5B2pkg.h" /* v2 B-trees */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
|
||||
|
||||
@ -241,17 +242,17 @@ H5B2__split1(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
|
||||
mid_record = old_node_nrec / 2;
|
||||
|
||||
/* Copy "upper half" of records to new child */
|
||||
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0),
|
||||
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, 0),
|
||||
H5B2_NAT_NREC(left_native, hdr, mid_record + (unsigned)1),
|
||||
hdr->cls->nrec_size * (old_node_nrec - (mid_record + (unsigned)1)));
|
||||
|
||||
/* Copy "upper half" of node pointers, if the node is an internal node */
|
||||
if(depth > 1)
|
||||
HDmemcpy(&(right_node_ptrs[0]), &(left_node_ptrs[mid_record + (unsigned)1]),
|
||||
H5MM_memcpy(&(right_node_ptrs[0]), &(left_node_ptrs[mid_record + (unsigned)1]),
|
||||
sizeof(H5B2_node_ptr_t) * (size_t)(old_node_nrec - mid_record));
|
||||
|
||||
/* Copy "middle" record to internal node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, mid_record), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, mid_record), hdr->cls->nrec_size);
|
||||
|
||||
/* Mark nodes as dirty */
|
||||
left_child_flags |= H5AC__DIRTIED_FLAG;
|
||||
@ -510,14 +511,14 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
uint16_t move_nrec = (uint16_t)(*right_nrec - new_right_nrec); /* Number of records to move from right node to left */
|
||||
|
||||
/* Copy record from parent node down into left child */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* See if we need to move records from right node */
|
||||
if(move_nrec > 1)
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, (*left_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, (*left_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
|
||||
|
||||
/* Move record from right node into parent node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), hdr->cls->nrec_size);
|
||||
|
||||
/* Slide records in right node down */
|
||||
HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, move_nrec), hdr->cls->nrec_size * new_right_nrec);
|
||||
@ -534,7 +535,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
right_moved_nrec -= (hssize_t)moved_nrec;
|
||||
|
||||
/* Copy node pointers from right node to left */
|
||||
HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * move_nrec);
|
||||
H5MM_memcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * move_nrec);
|
||||
|
||||
/* Slide node pointers in right node down */
|
||||
HDmemmove(&(right_node_ptrs[0]), &(right_node_ptrs[move_nrec]), sizeof(H5B2_node_ptr_t) * (new_right_nrec + (unsigned)1));
|
||||
@ -569,14 +570,14 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
hdr->cls->nrec_size * (*right_nrec));
|
||||
|
||||
/* Copy record from parent node down into right child */
|
||||
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, (move_nrec - 1)), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* See if we need to move records from left node */
|
||||
if(move_nrec > 1)
|
||||
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, ((*left_nrec - move_nrec) + 1)), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, ((*left_nrec - move_nrec) + 1)), hdr->cls->nrec_size * (size_t)(move_nrec - 1));
|
||||
|
||||
/* Move record from left node into parent node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, (*left_nrec - move_nrec)), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(left_native, hdr, (*left_nrec - move_nrec)), hdr->cls->nrec_size);
|
||||
|
||||
/* Handle node pointers, if we have an internal node */
|
||||
if(depth > 1) {
|
||||
@ -587,7 +588,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
HDmemmove(&(right_node_ptrs[move_nrec]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
|
||||
/* Copy node pointers from left node to right */
|
||||
HDmemcpy(&(right_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * move_nrec);
|
||||
H5MM_memcpy(&(right_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * move_nrec);
|
||||
|
||||
/* Count the number of records being moved */
|
||||
for(u = 0; u < move_nrec; u++)
|
||||
@ -775,16 +776,16 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
uint16_t moved_middle_nrec = 0; /* Number of records moved into left node */
|
||||
|
||||
/* Move left parent record down to left node */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
|
||||
/* Move records from middle node into left node */
|
||||
if((new_left_nrec - 1) > *left_nrec) {
|
||||
moved_middle_nrec = (uint16_t)(new_left_nrec - (*left_nrec + 1));
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * moved_middle_nrec);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * moved_middle_nrec);
|
||||
} /* end if */
|
||||
|
||||
/* Move record from middle node up to parent node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, moved_middle_nrec), hdr->cls->nrec_size);
|
||||
moved_middle_nrec++;
|
||||
|
||||
/* Slide records in middle node down */
|
||||
@ -798,7 +799,7 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
|
||||
/* Move middle node pointers into left node */
|
||||
move_nptrs = (unsigned)(new_left_nrec - *left_nrec);
|
||||
HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t)*move_nptrs);
|
||||
H5MM_memcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t)*move_nptrs);
|
||||
|
||||
/* Count the number of records being moved into the left node */
|
||||
for(u = 0, moved_nrec = 0; u < move_nptrs; u++)
|
||||
@ -832,14 +833,14 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
HDmemmove(H5B2_NAT_NREC(right_native, hdr, right_nrec_move), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
|
||||
|
||||
/* Move right parent record down to right node */
|
||||
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* Move records from middle node into right node */
|
||||
if(right_nrec_move > 1)
|
||||
HDmemcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, ((curr_middle_nrec - right_nrec_move) + 1)), hdr->cls->nrec_size * (right_nrec_move - 1));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, ((curr_middle_nrec - right_nrec_move) + 1)), hdr->cls->nrec_size * (right_nrec_move - 1));
|
||||
|
||||
/* Move record from middle node up to parent node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec - right_nrec_move)), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec - right_nrec_move)), hdr->cls->nrec_size);
|
||||
|
||||
/* Move node pointers also if this is an internal node */
|
||||
if(depth > 1) {
|
||||
@ -850,7 +851,7 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
HDmemmove(&(right_node_ptrs[right_nrec_move]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
|
||||
/* Move middle node pointers into right node */
|
||||
HDmemcpy(&(right_node_ptrs[0]), &(middle_node_ptrs[(curr_middle_nrec - right_nrec_move) + 1]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
|
||||
H5MM_memcpy(&(right_node_ptrs[0]), &(middle_node_ptrs[(curr_middle_nrec - right_nrec_move) + 1]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
|
||||
|
||||
/* Count the number of records being moved into the right node */
|
||||
for(u = 0, moved_nrec = 0; u < right_nrec_move; u++)
|
||||
@ -881,14 +882,14 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
HDmemmove(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * curr_middle_nrec);
|
||||
|
||||
/* Move left parent record down to middle node */
|
||||
HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(middle_native, hdr, left_nrec_move - 1), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
|
||||
/* Move left records to middle node */
|
||||
if(left_nrec_move > 1)
|
||||
HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(left_native, hdr, new_left_nrec + 1), hdr->cls->nrec_size * (left_nrec_move - 1));
|
||||
|
||||
/* Move left parent record up from left node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(left_native, hdr, new_left_nrec), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(left_native, hdr, new_left_nrec), hdr->cls->nrec_size);
|
||||
|
||||
/* Move node pointers also if this is an internal node */
|
||||
if(depth > 1) {
|
||||
@ -899,7 +900,7 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
HDmemmove(&(middle_node_ptrs[left_nrec_move]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(curr_middle_nrec + 1));
|
||||
|
||||
/* Move left node pointers into middle node */
|
||||
HDmemcpy(&(middle_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * left_nrec_move);
|
||||
H5MM_memcpy(&(middle_node_ptrs[0]), &(left_node_ptrs[new_left_nrec + 1]), sizeof(H5B2_node_ptr_t) * left_nrec_move);
|
||||
|
||||
/* Count the number of records being moved into the left node */
|
||||
for(u = 0, moved_nrec = 0; u < left_nrec_move; u++)
|
||||
@ -927,13 +928,13 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
unsigned right_nrec_move = (unsigned)(*right_nrec - new_right_nrec); /* Number of records to move out of right node */
|
||||
|
||||
/* Move right parent record down to middle node */
|
||||
HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, curr_middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(middle_native, hdr, curr_middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* Move right records to middle node */
|
||||
HDmemmove(H5B2_NAT_NREC(middle_native, hdr, (curr_middle_nrec + 1)), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (right_nrec_move - 1));
|
||||
|
||||
/* Move right parent record up from right node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx), H5B2_NAT_NREC(right_native, hdr, right_nrec_move - 1), hdr->cls->nrec_size);
|
||||
|
||||
/* Slide right records down */
|
||||
HDmemmove(H5B2_NAT_NREC(right_native, hdr, 0), H5B2_NAT_NREC(right_native, hdr, right_nrec_move), hdr->cls->nrec_size * new_right_nrec);
|
||||
@ -944,7 +945,7 @@ H5B2__redistribute3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
unsigned u; /* Local index variable */
|
||||
|
||||
/* Move right node pointers into middle node */
|
||||
HDmemcpy(&(middle_node_ptrs[curr_middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
|
||||
H5MM_memcpy(&(middle_node_ptrs[curr_middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * right_nrec_move);
|
||||
|
||||
/* Count the number of records being moved into the right node */
|
||||
for(u = 0, moved_nrec = 0; u < right_nrec_move; u++)
|
||||
@ -1113,14 +1114,14 @@ H5B2__merge2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
|
||||
/* Redistribute records into left node */
|
||||
{
|
||||
/* Copy record from parent node to proper location */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* Copy records from right node to left node */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
|
||||
|
||||
/* Copy node pointers from right node into left node */
|
||||
if(depth > 1)
|
||||
HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
H5MM_memcpy(&(left_node_ptrs[*left_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
|
||||
/* Update flush dependencies for grandchildren, if using SWMR */
|
||||
if(hdr->swmr_write && depth > 1)
|
||||
@ -1304,13 +1305,13 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
|
||||
middle_moved_nrec = middle_nrec_move;
|
||||
|
||||
/* Copy record from parent node to proper location in left node */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec), H5B2_INT_NREC(internal, hdr, idx - 1), hdr->cls->nrec_size);
|
||||
|
||||
/* Copy records from middle node to left node */
|
||||
HDmemcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * (middle_nrec_move - 1));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(left_native, hdr, *left_nrec + 1), H5B2_NAT_NREC(middle_native, hdr, 0), hdr->cls->nrec_size * (middle_nrec_move - 1));
|
||||
|
||||
/* Copy record from middle node to proper location in parent node */
|
||||
HDmemcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, (middle_nrec_move - 1)), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_INT_NREC(internal, hdr, idx - 1), H5B2_NAT_NREC(middle_native, hdr, (middle_nrec_move - 1)), hdr->cls->nrec_size);
|
||||
|
||||
/* Slide records in middle node down */
|
||||
HDmemmove(H5B2_NAT_NREC(middle_native, hdr, 0), H5B2_NAT_NREC(middle_native, hdr, middle_nrec_move), hdr->cls->nrec_size * (*middle_nrec - middle_nrec_move));
|
||||
@ -1320,7 +1321,7 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
|
||||
unsigned u; /* Local index variable */
|
||||
|
||||
/* Copy node pointers from middle node into left node */
|
||||
HDmemcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * middle_nrec_move);
|
||||
H5MM_memcpy(&(left_node_ptrs[*left_nrec + 1]), &(middle_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * middle_nrec_move);
|
||||
|
||||
/* Count the number of records being moved into the left node */
|
||||
for(u = 0; u < middle_nrec_move; u++)
|
||||
@ -1348,15 +1349,15 @@ H5B2__merge3(H5B2_hdr_t *hdr, uint16_t depth, H5B2_node_ptr_t *curr_node_ptr,
|
||||
/* Redistribute records into middle node */
|
||||
{
|
||||
/* Copy record from parent node to proper location in middle node */
|
||||
HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec), H5B2_INT_NREC(internal, hdr, idx), hdr->cls->nrec_size);
|
||||
|
||||
/* Copy records from right node to middle node */
|
||||
HDmemcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
|
||||
H5MM_memcpy(H5B2_NAT_NREC(middle_native, hdr, *middle_nrec + 1), H5B2_NAT_NREC(right_native, hdr, 0), hdr->cls->nrec_size * (*right_nrec));
|
||||
|
||||
/* Move node pointers also if this is an internal node */
|
||||
if(depth > 1)
|
||||
/* Copy node pointers from right node into middle node */
|
||||
HDmemcpy(&(middle_node_ptrs[*middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
H5MM_memcpy(&(middle_node_ptrs[*middle_nrec + 1]), &(right_node_ptrs[0]), sizeof(H5B2_node_ptr_t) * (size_t)(*right_nrec + 1));
|
||||
|
||||
/* Update flush dependencies for grandchildren, if using SWMR */
|
||||
if(hdr->swmr_write && depth > 1)
|
||||
@ -1539,7 +1540,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal node pointers")
|
||||
|
||||
/* Copy the node pointers */
|
||||
HDmemcpy(node_ptrs, internal->node_ptrs, (sizeof(H5B2_node_ptr_t) * (size_t)(curr_node->node_nrec + 1)));
|
||||
H5MM_memcpy(node_ptrs, internal->node_ptrs, (sizeof(H5B2_node_ptr_t) * (size_t)(curr_node->node_nrec + 1)));
|
||||
} /* end if */
|
||||
else {
|
||||
H5B2_leaf_t *leaf; /* Pointer to leaf node */
|
||||
@ -1559,7 +1560,7 @@ H5B2__iterate_node(H5B2_hdr_t *hdr, uint16_t depth, const H5B2_node_ptr_t *curr_
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree internal native keys")
|
||||
|
||||
/* Copy the native keys */
|
||||
HDmemcpy(native, node_native, (hdr->cls->nrec_size * curr_node->node_nrec));
|
||||
H5MM_memcpy(native, node_native, (hdr->cls->nrec_size * curr_node->node_nrec));
|
||||
|
||||
/* Unlock the node */
|
||||
if(H5AC_unprotect(hdr->f, curr_node_class, curr_node->addr, node, (unsigned)(hdr->swmr_write ? H5AC__PIN_ENTRY_FLAG : H5AC__NO_FLAGS_SET)) < 0)
|
||||
|
@ -412,7 +412,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
|
||||
if(hdr->min_native_rec == NULL)
|
||||
if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
|
||||
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
if(idx == (unsigned)(leaf->nrec - 1)) {
|
||||
@ -420,7 +420,7 @@ H5B2__insert_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
|
||||
if(hdr->max_native_rec == NULL)
|
||||
if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
|
||||
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
@ -561,7 +561,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
|
||||
if(hdr->min_native_rec == NULL)
|
||||
if(NULL == (hdr->min_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree min record info")
|
||||
HDmemcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->min_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
if(idx == (unsigned)(leaf->nrec - 1)) {
|
||||
@ -569,7 +569,7 @@ H5B2__update_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
|
||||
if(hdr->max_native_rec == NULL)
|
||||
if(NULL == (hdr->max_native_rec = H5MM_malloc(hdr->cls->nrec_size)))
|
||||
HGOTO_ERROR(H5E_BTREE, H5E_CANTALLOC, FAIL, "memory allocation failed for v2 B-tree max record info")
|
||||
HDmemcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->max_native_rec, H5B2_LEAF_NREC(leaf, hdr, idx), hdr->cls->nrec_size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
@ -664,9 +664,9 @@ H5B2__swap_leaf(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
|
||||
} /* end else */
|
||||
|
||||
/* Swap records (use disk page as temporary buffer) */
|
||||
HDmemcpy(hdr->page, H5B2_NAT_NREC(child_native, hdr, 0), hdr->cls->nrec_size);
|
||||
HDmemcpy(H5B2_NAT_NREC(child_native, hdr, 0), swap_loc, hdr->cls->nrec_size);
|
||||
HDmemcpy(swap_loc, hdr->page, hdr->cls->nrec_size);
|
||||
H5MM_memcpy(hdr->page, H5B2_NAT_NREC(child_native, hdr, 0), hdr->cls->nrec_size);
|
||||
H5MM_memcpy(H5B2_NAT_NREC(child_native, hdr, 0), swap_loc, hdr->cls->nrec_size);
|
||||
H5MM_memcpy(swap_loc, hdr->page, hdr->cls->nrec_size);
|
||||
|
||||
/* Mark parent as dirty */
|
||||
*internal_flags_ptr |= H5AC__DIRTIED_FLAG;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Bpkg.h" /* B-link trees */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -304,7 +305,7 @@ H5B__cache_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len,
|
||||
HDassert(shared->type->encode);
|
||||
|
||||
/* magic number */
|
||||
HDmemcpy(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += 4;
|
||||
|
||||
/* node type and level */
|
||||
|
14
src/H5C.c
14
src/H5C.c
@ -2285,7 +2285,7 @@ H5C_protect(H5F_t * f,
|
||||
if(NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
if(0 == mpi_rank)
|
||||
if(H5C__generate_image(f, cache_ptr, entry_ptr) < 0)
|
||||
@ -6042,7 +6042,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
|
||||
if(NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + entry_ptr->size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
} /* end if */
|
||||
|
||||
@ -6542,7 +6542,7 @@ H5C_load_entry(H5F_t * f,
|
||||
if(NULL == (image = (uint8_t *)H5MM_malloc(len + H5C_IMAGE_EXTRA_SPACE)))
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
@ -6580,7 +6580,7 @@ H5C_load_entry(H5F_t * f,
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()")
|
||||
image = (uint8_t *)new_image;
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(image + len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
} /* end if */
|
||||
|
||||
@ -6624,7 +6624,7 @@ H5C_load_entry(H5F_t * f,
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "image null after H5MM_realloc()")
|
||||
image = (uint8_t *)new_image;
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(image + actual_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(image + actual_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
|
||||
if(actual_len > len) {
|
||||
@ -8456,7 +8456,7 @@ H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry
|
||||
if(NULL == (entry_ptr->image_ptr = H5MM_malloc(entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)) )
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + image_size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
} /* end if */
|
||||
|
||||
@ -8573,7 +8573,7 @@ H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
|
||||
if(NULL == (entry_ptr->image_ptr = H5MM_realloc(entry_ptr->image_ptr, new_len + H5C_IMAGE_EXTRA_SPACE)))
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)entry_ptr->image_ptr) + new_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)entry_ptr->image_ptr) + new_len, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
|
||||
/* Update statistics for resizing the entry */
|
||||
|
12
src/H5CX.c
12
src/H5CX.c
@ -76,7 +76,7 @@
|
||||
#define H5CX_RETRIEVE_PROP_COMMON(PL, DEF_PL, PROP_NAME, PROP_FIELD) \
|
||||
/* Check for default property list */ \
|
||||
if((*head)->ctx.H5_GLUE(PL,_id) == (DEF_PL)) \
|
||||
HDmemcpy(&(*head)->ctx.PROP_FIELD, &H5_GLUE3(H5CX_def_,PL,_cache).PROP_FIELD, sizeof(H5_GLUE3(H5CX_def_,PL,_cache).PROP_FIELD)); \
|
||||
H5MM_memcpy(&(*head)->ctx.PROP_FIELD, &H5_GLUE3(H5CX_def_,PL,_cache).PROP_FIELD, sizeof(H5_GLUE3(H5CX_def_,PL,_cache).PROP_FIELD)); \
|
||||
else { \
|
||||
/* Retrieve the property list */ \
|
||||
H5CX_RETRIEVE_PLIST(PL, FAIL) \
|
||||
@ -776,7 +776,7 @@ H5CX_retrieve_state(H5CX_state_t **api_state)
|
||||
/* Keep a copy of the VOL connector property, if there is one */
|
||||
if((*head)->ctx.vol_connector_prop_valid && (*head)->ctx.vol_connector_prop.connector_id > 0) {
|
||||
/* Get the connector property */
|
||||
HDmemcpy(&(*api_state)->vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
H5MM_memcpy(&(*api_state)->vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
|
||||
/* Check for actual VOL connector property */
|
||||
if((*api_state)->vol_connector_prop.connector_id) {
|
||||
@ -852,7 +852,7 @@ H5CX_restore_state(const H5CX_state_t *api_state)
|
||||
|
||||
/* Restore the VOL connector info */
|
||||
if(api_state->vol_connector_prop.connector_id) {
|
||||
HDmemcpy(&(*head)->ctx.vol_connector_prop, &api_state->vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, &api_state->vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
(*head)->ctx.vol_connector_prop_valid = TRUE;
|
||||
} /* end if */
|
||||
|
||||
@ -1271,7 +1271,7 @@ H5CX_set_vol_connector_prop(const H5VL_connector_prop_t *vol_connector_prop)
|
||||
HDassert(head && *head);
|
||||
|
||||
/* Set the API context value */
|
||||
HDmemcpy(&(*head)->ctx.vol_connector_prop, vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
H5MM_memcpy(&(*head)->ctx.vol_connector_prop, vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
|
||||
/* Mark the value as valid */
|
||||
(*head)->ctx.vol_connector_prop_valid = TRUE;
|
||||
@ -1396,7 +1396,7 @@ H5CX_get_vol_connector_prop(H5VL_connector_prop_t *vol_connector_prop)
|
||||
/* Check for value that was set */
|
||||
if((*head)->ctx.vol_connector_prop_valid)
|
||||
/* Get the value */
|
||||
HDmemcpy(vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
H5MM_memcpy(vol_connector_prop, &(*head)->ctx.vol_connector_prop, sizeof(H5VL_connector_prop_t));
|
||||
else
|
||||
HDmemset(vol_connector_prop, 0, sizeof(H5VL_connector_prop_t));
|
||||
|
||||
@ -1601,7 +1601,7 @@ H5CX_get_btree_split_ratios(double split_ratio[3])
|
||||
H5CX_RETRIEVE_PROP_VALID(dxpl, H5P_DATASET_XFER_DEFAULT, H5D_XFER_BTREE_SPLIT_RATIO_NAME, btree_split_ratio)
|
||||
|
||||
/* Get the B-tree split ratio values */
|
||||
HDmemcpy(split_ratio, &(*head)->ctx.btree_split_ratio, sizeof((*head)->ctx.btree_split_ratio));
|
||||
H5MM_memcpy(split_ratio, &(*head)->ctx.btree_split_ratio, sizeof((*head)->ctx.btree_split_ratio));
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
|
@ -2020,11 +2020,11 @@ H5C__decode_cache_image_entry(const H5F_t *f, const H5C_t *cache_ptr,
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, FAIL, "memory allocation failed for on disk image buffer")
|
||||
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
|
||||
/* Copy the entry image from the cache image block */
|
||||
HDmemcpy(image_ptr, p, size);
|
||||
H5MM_memcpy(image_ptr, p, size);
|
||||
p += size;
|
||||
|
||||
/* Copy data into target */
|
||||
@ -2219,7 +2219,7 @@ H5C__encode_cache_image_header(const H5F_t *f, const H5C_t *cache_ptr,
|
||||
p = *buf;
|
||||
|
||||
/* write signature */
|
||||
HDmemcpy(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN);
|
||||
H5MM_memcpy(p, H5C__MDCI_BLOCK_SIGNATURE, (size_t)H5C__MDCI_BLOCK_SIGNATURE_LEN);
|
||||
p += H5C__MDCI_BLOCK_SIGNATURE_LEN;
|
||||
|
||||
/* write version */
|
||||
@ -2355,7 +2355,7 @@ H5C__encode_cache_image_entry(H5F_t *f, H5C_t *cache_ptr, uint8_t **buf,
|
||||
H5F_addr_encode(f, &p, ie_ptr->fd_parent_addrs[u]);
|
||||
|
||||
/* Copy entry image */
|
||||
HDmemcpy(p, ie_ptr->image_ptr, ie_ptr->size);
|
||||
H5MM_memcpy(p, ie_ptr->image_ptr, ie_ptr->size);
|
||||
p += ie_ptr->size;
|
||||
|
||||
/* Update buffer pointer */
|
||||
@ -3422,11 +3422,11 @@ H5C__reconstruct_cache_entry(const H5F_t *f, H5C_t *cache_ptr,
|
||||
if(NULL == (pf_entry_ptr->image_ptr = H5MM_malloc(pf_entry_ptr->size + H5C_IMAGE_EXTRA_SPACE)))
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed for on disk image buffer")
|
||||
#if H5C_DO_MEMORY_SANITY_CHECKS
|
||||
HDmemcpy(((uint8_t *)pf_entry_ptr->image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
H5MM_memcpy(((uint8_t *)pf_entry_ptr->image_ptr) + size, H5C_IMAGE_SANITY_VALUE, H5C_IMAGE_EXTRA_SPACE);
|
||||
#endif /* H5C_DO_MEMORY_SANITY_CHECKS */
|
||||
|
||||
/* Copy the entry image from the cache image block */
|
||||
HDmemcpy(pf_entry_ptr->image_ptr, p, pf_entry_ptr->size);
|
||||
H5MM_memcpy(pf_entry_ptr->image_ptr, p, pf_entry_ptr->size);
|
||||
p += pf_entry_ptr->size;
|
||||
|
||||
/* Initialize the rest of the fields in the prefetched entry */
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5MFprivate.h" /* File space management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5Oprivate.h" /* Object headers */
|
||||
#include "H5Sprivate.h" /* Dataspaces */
|
||||
#include "H5VMprivate.h" /* Vector and array functions */
|
||||
@ -847,7 +848,7 @@ H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
|
||||
/* Set up the "local" information for this dataset's chunks */
|
||||
if(NULL == (my_layout = H5FL_MALLOC(H5O_layout_chunk_t)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate chunk layout")
|
||||
HDmemcpy(my_layout, layout, sizeof(H5O_layout_chunk_t));
|
||||
H5MM_memcpy(my_layout, layout, sizeof(H5O_layout_chunk_t));
|
||||
shared->udata = my_layout;
|
||||
|
||||
/* Make shared B-tree info reference counted */
|
||||
@ -1087,7 +1088,7 @@ H5D__btree_idx_iterate_cb(H5F_t H5_ATTR_UNUSED *f, const void *_lt_key,
|
||||
HDcompile_assert(sizeof(chunk_rec.filter_mask) == sizeof(lt_key->filter_mask));
|
||||
|
||||
/* Compose generic chunk record for callback */
|
||||
HDmemcpy(&chunk_rec, lt_key, sizeof(*lt_key));
|
||||
H5MM_memcpy(&chunk_rec, lt_key, sizeof(*lt_key));
|
||||
chunk_rec.chunk_addr = addr;
|
||||
|
||||
/* Make "generic chunk" callback */
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "H5Dpkg.h" /* Datasets */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5MFprivate.h" /* File space management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vector and array functions */
|
||||
|
||||
|
||||
@ -248,7 +249,7 @@ H5D__bt2_crt_context(void *_udata)
|
||||
/* Set up the "local" information for this dataset's chunk dimension sizes */
|
||||
if(NULL == (my_dim = (uint32_t *)H5FL_BLK_MALLOC(chunk_dim, H5O_LAYOUT_NDIMS * sizeof(uint32_t))))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, NULL, "can't allocate chunk dims")
|
||||
HDmemcpy(my_dim, udata->dim, H5O_LAYOUT_NDIMS * sizeof(uint32_t));
|
||||
H5MM_memcpy(my_dim, udata->dim, H5O_LAYOUT_NDIMS * sizeof(uint32_t));
|
||||
ctx->dim = my_dim;
|
||||
|
||||
/*
|
||||
|
@ -313,6 +313,7 @@ const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {{
|
||||
H5D__chunk_construct,
|
||||
H5D__chunk_init,
|
||||
H5D__chunk_is_space_alloc,
|
||||
H5D__chunk_is_data_cached,
|
||||
H5D__chunk_io_init,
|
||||
H5D__chunk_read,
|
||||
H5D__chunk_write,
|
||||
@ -340,6 +341,7 @@ const H5D_layout_ops_t H5D_LOPS_NONEXISTENT[1] = {{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
NULL,
|
||||
NULL,
|
||||
@ -394,10 +396,13 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
|
||||
|
||||
FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr)
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(layout->type == H5D_CHUNKED);
|
||||
|
||||
io_info.dset = dset;
|
||||
|
||||
/* Allocate dataspace and initialize it if it hasn't been. */
|
||||
if(!(*layout->ops->is_space_alloc)(&layout->storage))
|
||||
if(!H5D__chunk_is_space_alloc(&layout->storage))
|
||||
/* Allocate storage */
|
||||
if(H5D__alloc_storage(&io_info, H5D_ALLOC_WRITE, FALSE, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
|
||||
@ -435,13 +440,17 @@ H5D__chunk_direct_write(const H5D_t *dset, uint32_t filters, hsize_t *offset,
|
||||
if(0 == idx_info.pline->nused && H5F_addr_defined(old_chunk.offset))
|
||||
/* If there are no filters and we are overwriting the chunk we can just set values */
|
||||
need_insert = FALSE;
|
||||
else
|
||||
else {
|
||||
/* Otherwise, create the chunk it if it doesn't exist, or reallocate the chunk
|
||||
* if its size has changed.
|
||||
*/
|
||||
if(H5D__chunk_file_alloc(&idx_info, &old_chunk, &udata.chunk_block, &need_insert, scaled) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate chunk")
|
||||
|
||||
/* Cache the new chunk information */
|
||||
H5D__chunk_cinfo_cache_update(&dset->shared->cache.chunk.last, &udata);
|
||||
} /* end else */
|
||||
|
||||
/* Make sure the address of the chunk is returned. */
|
||||
if(!H5F_addr_defined(udata.chunk_block.offset))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "chunk address isn't defined")
|
||||
@ -506,7 +515,8 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t* filters,
|
||||
*filters = 0;
|
||||
|
||||
/* Allocate dataspace and initialize it if it hasn't been. */
|
||||
if(!(*layout->ops->is_space_alloc)(&layout->storage))
|
||||
if(!H5D__chunk_is_space_alloc(&layout->storage)
|
||||
&& !H5D__chunk_is_data_cached(dset->shared))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "storage is not initialized")
|
||||
|
||||
/* Calculate the index of this chunk */
|
||||
@ -1017,6 +1027,30 @@ H5D__chunk_is_space_alloc(const H5O_storage_t *storage)
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D__chunk_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__chunk_is_data_cached
|
||||
*
|
||||
* Purpose: Query if raw data is cached for dataset
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Neil Fortner
|
||||
* Wednessday, March 6, 2016
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hbool_t
|
||||
H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset)
|
||||
{
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(shared_dset);
|
||||
|
||||
FUNC_LEAVE_NOAPI(shared_dset->cache.chunk.nused > 0)
|
||||
} /* end H5D__chunk_is_data_cached() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__chunk_io_init
|
||||
@ -1654,7 +1688,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
|
||||
new_chunk_info->mspace_shared = FALSE;
|
||||
|
||||
/* Copy the chunk's scaled coordinates */
|
||||
HDmemcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
H5MM_memcpy(new_chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
new_chunk_info->scaled[fm->f_ndims] = 0;
|
||||
|
||||
/* Insert the new chunk into the skip list */
|
||||
@ -1914,9 +1948,9 @@ H5D__chunk_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type,
|
||||
chunk_info->chunk_points = 0;
|
||||
|
||||
/* Set the chunk's scaled coordinates */
|
||||
HDmemcpy(chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
H5MM_memcpy(chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
chunk_info->scaled[fm->f_ndims] = 0;
|
||||
HDmemcpy(chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
H5MM_memcpy(chunk_info->scaled, scaled, sizeof(hsize_t) * fm->f_ndims);
|
||||
|
||||
/* Insert the new chunk into the skip list */
|
||||
if(H5SL_insert(fm->sel_chunks,chunk_info,&chunk_info->index) < 0) {
|
||||
@ -2157,11 +2191,11 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
HDassert(fm);
|
||||
|
||||
/* Set up "nonexistent" I/O info object */
|
||||
HDmemcpy(&nonexistent_io_info, io_info, sizeof(nonexistent_io_info));
|
||||
H5MM_memcpy(&nonexistent_io_info, io_info, sizeof(nonexistent_io_info));
|
||||
nonexistent_io_info.layout_ops = *H5D_LOPS_NONEXISTENT;
|
||||
|
||||
/* Set up contiguous I/O info object */
|
||||
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
ctg_io_info.store = &ctg_store;
|
||||
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
|
||||
|
||||
@ -2169,7 +2203,7 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size, uint32_t);
|
||||
|
||||
/* Set up compact I/O info object */
|
||||
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
cpt_io_info.store = &cpt_store;
|
||||
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
|
||||
|
||||
@ -2307,7 +2341,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
HDassert(fm);
|
||||
|
||||
/* Set up contiguous I/O info object */
|
||||
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
ctg_io_info.store = &ctg_store;
|
||||
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
|
||||
|
||||
@ -2315,7 +2349,7 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5_CHECKED_ASSIGN(ctg_store.contig.dset_size, hsize_t, io_info->dset->shared->layout.u.chunk.size, uint32_t);
|
||||
|
||||
/* Set up compact I/O info object */
|
||||
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
cpt_io_info.store = &cpt_store;
|
||||
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
|
||||
|
||||
@ -2670,7 +2704,7 @@ H5D__chunk_cinfo_cache_update(H5D_chunk_cached_t *last, const H5D_chunk_ud_t *ud
|
||||
HDassert(udata->common.scaled);
|
||||
|
||||
/* Stored the information to cache */
|
||||
HDmemcpy(last->scaled, udata->common.scaled, sizeof(hsize_t) * udata->common.layout->ndims);
|
||||
H5MM_memcpy(last->scaled, udata->common.scaled, sizeof(hsize_t) * udata->common.layout->ndims);
|
||||
last->addr = udata->chunk_block.offset;
|
||||
H5_CHECKED_ASSIGN(last->nbytes, uint32_t, udata->chunk_block.length, hsize_t);
|
||||
last->chunk_idx = udata->chunk_idx;
|
||||
@ -3039,7 +3073,7 @@ H5D__chunk_flush_entry(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t reset)
|
||||
*/
|
||||
if(NULL == (buf = H5MM_malloc(alloc)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline")
|
||||
HDmemcpy(buf, ent->chunk, alloc);
|
||||
H5MM_memcpy(buf, ent->chunk, alloc);
|
||||
} /* end if */
|
||||
else {
|
||||
/*
|
||||
@ -3452,7 +3486,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
|
||||
*/
|
||||
if(NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
|
||||
HDmemcpy(chunk, ent->chunk, chunk_size);
|
||||
H5MM_memcpy(chunk, ent->chunk, chunk_size);
|
||||
ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline);
|
||||
ent->chunk = (uint8_t *)chunk;
|
||||
chunk = NULL;
|
||||
@ -3478,7 +3512,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
|
||||
*/
|
||||
if(NULL == (chunk = H5D__chunk_mem_alloc(chunk_size, pline)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
|
||||
HDmemcpy(chunk, ent->chunk, chunk_size);
|
||||
H5MM_memcpy(chunk, ent->chunk, chunk_size);
|
||||
|
||||
ent->chunk = (uint8_t *)H5D__chunk_mem_xfree(ent->chunk, old_pline);
|
||||
ent->chunk = (uint8_t *)chunk;
|
||||
@ -3607,7 +3641,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
|
||||
(void)H5D__chunk_mem_xfree(tmp_chunk, old_pline);
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for raw data chunk")
|
||||
} /* end if */
|
||||
HDmemcpy(chunk, tmp_chunk, chunk_size);
|
||||
H5MM_memcpy(chunk, tmp_chunk, chunk_size);
|
||||
(void)H5D__chunk_mem_xfree(tmp_chunk, old_pline);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
@ -3688,7 +3722,7 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata,
|
||||
ent->chunk_block.offset = chunk_addr;
|
||||
ent->chunk_block.length = chunk_alloc;
|
||||
ent->chunk_idx = udata->chunk_idx;
|
||||
HDmemcpy(ent->scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
|
||||
H5MM_memcpy(ent->scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
|
||||
H5_CHECKED_ASSIGN(ent->rd_count, uint32_t, chunk_size, size_t);
|
||||
H5_CHECKED_ASSIGN(ent->wr_count, uint32_t, chunk_size, size_t);
|
||||
ent->chunk = (uint8_t *)chunk;
|
||||
@ -3816,7 +3850,7 @@ H5D__chunk_unlock(const H5D_io_info_t *io_info, const H5D_chunk_ud_t *udata,
|
||||
fake_ent.edge_chunk_state = H5D_RDCC_DISABLE_FILTERS;
|
||||
if(udata->new_unfilt_chunk)
|
||||
fake_ent.edge_chunk_state |= H5D_RDCC_NEWLY_DISABLED_FILTERS;
|
||||
HDmemcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
|
||||
H5MM_memcpy(fake_ent.scaled, udata->common.scaled, sizeof(hsize_t) * layout->u.chunk.ndims);
|
||||
HDassert(layout->u.chunk.size > 0);
|
||||
fake_ent.chunk_idx = udata->chunk_idx;
|
||||
fake_ent.chunk_block.offset = udata->chunk_block.offset;
|
||||
@ -4103,7 +4137,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
|
||||
if(has_unfilt_edge_chunks) {
|
||||
if(NULL == (unfilt_fill_buf = H5D__chunk_mem_alloc(orig_chunk_size, &def_pline)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for raw data chunk")
|
||||
HDmemcpy(unfilt_fill_buf, fb_info.fill_buf, orig_chunk_size);
|
||||
H5MM_memcpy(unfilt_fill_buf, fb_info.fill_buf, orig_chunk_size);
|
||||
} /* end if */
|
||||
|
||||
/* Retrieve filter settings from API context */
|
||||
@ -5637,7 +5671,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
|
||||
|
||||
if(udata->chunk_in_cache && udata->chunk) {
|
||||
HDassert(!H5F_addr_defined(chunk_rec->chunk_addr));
|
||||
HDmemcpy(buf, udata->chunk, nbytes);
|
||||
H5MM_memcpy(buf, udata->chunk, nbytes);
|
||||
udata->chunk = NULL;
|
||||
}
|
||||
else {
|
||||
@ -5671,7 +5705,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
|
||||
HDassert(H5F_addr_defined(ent->chunk_block.offset));
|
||||
|
||||
H5_CHECKED_ASSIGN(nbytes, size_t, shared_fo->layout.u.chunk.size, uint32_t);
|
||||
HDmemcpy(buf, ent->chunk, nbytes);
|
||||
H5MM_memcpy(buf, ent->chunk, nbytes);
|
||||
}
|
||||
else {
|
||||
/* read chunk data from the source file */
|
||||
@ -5705,7 +5739,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed")
|
||||
|
||||
/* Copy into another buffer, to reclaim memory later */
|
||||
HDmemcpy(reclaim_buf, buf, reclaim_buf_size);
|
||||
H5MM_memcpy(reclaim_buf, buf, reclaim_buf_size);
|
||||
|
||||
/* Set background buffer to all zeros */
|
||||
HDmemset(bkg, 0, buf_size);
|
||||
@ -5736,7 +5770,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
|
||||
} /* end if */
|
||||
|
||||
/* After fix ref, copy the new reference elements to the buffer to write out */
|
||||
HDmemcpy(buf, bkg, buf_size);
|
||||
H5MM_memcpy(buf, bkg, buf_size);
|
||||
} /* end if */
|
||||
|
||||
/* Set up destination chunk callback information for insertion */
|
||||
@ -6036,7 +6070,7 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
|
||||
|
||||
for(ent = shared_fo->cache.chunk.head; ent; ent = next) {
|
||||
if(!H5F_addr_defined(ent->chunk_block.offset)) {
|
||||
HDmemcpy(chunk_rec.scaled, ent->scaled, sizeof(chunk_rec.scaled));
|
||||
H5MM_memcpy(chunk_rec.scaled, ent->scaled, sizeof(chunk_rec.scaled));
|
||||
udata.chunk = ent->chunk;
|
||||
udata.chunk_in_cache = TRUE;
|
||||
if(H5D__chunk_copy_cb(&chunk_rec, &udata) < 0)
|
||||
|
@ -80,6 +80,7 @@ const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
|
||||
H5D__compact_construct,
|
||||
NULL,
|
||||
H5D__compact_is_space_alloc,
|
||||
NULL,
|
||||
H5D__compact_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
@ -528,7 +529,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
|
||||
if(NULL == (buf = H5FL_BLK_MALLOC(type_conv, buf_size)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
HDmemcpy(buf, storage_src->buf, storage_src->size);
|
||||
H5MM_memcpy(buf, storage_src->buf, storage_src->size);
|
||||
|
||||
/* allocate temporary bkg buff for data conversion */
|
||||
if(NULL == (bkg = H5FL_BLK_MALLOC(type_conv, buf_size)))
|
||||
@ -539,7 +540,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
|
||||
|
||||
/* Copy into another buffer, to reclaim memory later */
|
||||
HDmemcpy(reclaim_buf, buf, buf_size);
|
||||
H5MM_memcpy(reclaim_buf, buf, buf_size);
|
||||
|
||||
/* Set background buffer to all zeros */
|
||||
HDmemset(bkg, 0, buf_size);
|
||||
@ -548,7 +549,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
|
||||
if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
|
||||
|
||||
HDmemcpy(storage_dst->buf, buf, storage_dst->size);
|
||||
H5MM_memcpy(storage_dst->buf, buf, storage_dst->size);
|
||||
|
||||
if(H5D_vlen_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data")
|
||||
@ -573,11 +574,11 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds
|
||||
} /* end if */
|
||||
else
|
||||
/* Type conversion not necessary */
|
||||
HDmemcpy(storage_dst->buf, storage_src->buf, storage_src->size);
|
||||
H5MM_memcpy(storage_dst->buf, storage_src->buf, storage_src->size);
|
||||
} /* end if */
|
||||
else
|
||||
/* Type conversion not necessary */
|
||||
HDmemcpy(storage_dst->buf, storage_src->buf, storage_src->size);
|
||||
H5MM_memcpy(storage_dst->buf, storage_src->buf, storage_src->size);
|
||||
|
||||
/* Mark destination buffer as dirty */
|
||||
storage_dst->dirty = TRUE;
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5FOprivate.h" /* File objects */
|
||||
#include "H5Oprivate.h" /* Object headers */
|
||||
#include "H5Pprivate.h" /* Property lists */
|
||||
@ -118,6 +119,7 @@ const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
|
||||
H5D__contig_construct,
|
||||
H5D__contig_init,
|
||||
H5D__contig_is_space_alloc,
|
||||
H5D__contig_is_data_cached,
|
||||
H5D__contig_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
@ -536,6 +538,30 @@ H5D__contig_is_space_alloc(const H5O_storage_t *storage)
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D__contig_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__contig_is_data_cached
|
||||
*
|
||||
* Purpose: Query if raw data is cached for dataset
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Neil Fortner
|
||||
* Wednessday, March 6, 2016
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hbool_t
|
||||
H5D__contig_is_data_cached(const H5D_shared_t *shared_dset)
|
||||
{
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(shared_dset);
|
||||
|
||||
FUNC_LEAVE_NOAPI(shared_dset->cache.contig.sieve_size > 0)
|
||||
} /* end H5D__contig_is_data_cached() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__contig_io_init
|
||||
@ -751,7 +777,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
|
||||
|
||||
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
|
||||
HDmemcpy(buf, dset_contig->sieve_buf, len);
|
||||
H5MM_memcpy(buf, dset_contig->sieve_buf, len);
|
||||
|
||||
/* Reset sieve buffer dirty flag */
|
||||
dset_contig->sieve_dirty = FALSE;
|
||||
@ -766,7 +792,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
|
||||
|
||||
/* Grab the data out of the buffer */
|
||||
HDmemcpy(buf, base_sieve_buf, len);
|
||||
H5MM_memcpy(buf, base_sieve_buf, len);
|
||||
} /* end if */
|
||||
/* Entire request is not within this data sieve buffer */
|
||||
else {
|
||||
@ -825,7 +851,7 @@ H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "block read failed")
|
||||
|
||||
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
|
||||
HDmemcpy(buf, dset_contig->sieve_buf, len);
|
||||
H5MM_memcpy(buf, dset_contig->sieve_buf, len);
|
||||
|
||||
/* Reset sieve buffer dirty flag */
|
||||
dset_contig->sieve_dirty = FALSE;
|
||||
@ -1023,7 +1049,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
} /* end if */
|
||||
|
||||
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
|
||||
HDmemcpy(dset_contig->sieve_buf, buf, len);
|
||||
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
|
||||
|
||||
/* Set sieve buffer dirty flag */
|
||||
dset_contig->sieve_dirty = TRUE;
|
||||
@ -1043,7 +1069,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
unsigned char *base_sieve_buf = dset_contig->sieve_buf + (addr - sieve_start);
|
||||
|
||||
/* Put the data into the sieve buffer */
|
||||
HDmemcpy(base_sieve_buf, buf, len);
|
||||
H5MM_memcpy(base_sieve_buf, buf, len);
|
||||
|
||||
/* Set sieve buffer dirty flag */
|
||||
dset_contig->sieve_dirty = TRUE;
|
||||
@ -1086,7 +1112,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
HDmemmove(dset_contig->sieve_buf + len, dset_contig->sieve_buf, dset_contig->sieve_size);
|
||||
|
||||
/* Copy in new information (must be first in sieve buffer) */
|
||||
HDmemcpy(dset_contig->sieve_buf, buf, len);
|
||||
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
|
||||
|
||||
/* Adjust sieve location */
|
||||
dset_contig->sieve_loc = addr;
|
||||
@ -1095,7 +1121,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
/* Append to existing sieve buffer */
|
||||
else {
|
||||
/* Copy in new information */
|
||||
HDmemcpy(dset_contig->sieve_buf + sieve_size, buf, len);
|
||||
H5MM_memcpy(dset_contig->sieve_buf + sieve_size, buf, len);
|
||||
} /* end else */
|
||||
|
||||
/* Adjust sieve size */
|
||||
@ -1139,7 +1165,7 @@ H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
} /* end if */
|
||||
|
||||
/* Grab the data out of the buffer (must be first piece of data in buffer ) */
|
||||
HDmemcpy(dset_contig->sieve_buf, buf, len);
|
||||
H5MM_memcpy(dset_contig->sieve_buf, buf, len);
|
||||
|
||||
/* Set sieve buffer dirty flag */
|
||||
dset_contig->sieve_dirty = TRUE;
|
||||
@ -1494,7 +1520,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
if(try_sieve && (addr_src >= sieve_start) && ((addr_src + src_nbytes -1) < sieve_end)) {
|
||||
unsigned char *base_sieve_buf = shared_fo->cache.contig.sieve_buf + (addr_src - sieve_start);
|
||||
|
||||
HDmemcpy(buf, base_sieve_buf, src_nbytes);
|
||||
H5MM_memcpy(buf, base_sieve_buf, src_nbytes);
|
||||
} else
|
||||
/* Read raw data from source file */
|
||||
if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, buf) < 0)
|
||||
@ -1507,7 +1533,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
|
||||
|
||||
/* Copy into another buffer, to reclaim memory later */
|
||||
HDmemcpy(reclaim_buf, buf, mem_nbytes);
|
||||
H5MM_memcpy(reclaim_buf, buf, mem_nbytes);
|
||||
|
||||
/* Set background buffer to all zeros */
|
||||
HDmemset(bkg, 0, buf_size);
|
||||
@ -1533,7 +1559,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute")
|
||||
|
||||
/* After fix ref, copy the new reference elements to the buffer to write out */
|
||||
HDmemcpy(buf, bkg, buf_size);
|
||||
H5MM_memcpy(buf, bkg, buf_size);
|
||||
} /* end if */
|
||||
else
|
||||
/* Reset value to zero */
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "H5EAprivate.h" /* Extensible arrays */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5MFprivate.h" /* File space management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vector functions */
|
||||
|
||||
|
||||
@ -1197,11 +1198,11 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout)
|
||||
hsize_t swizzled_max_chunks[H5O_LAYOUT_NDIMS]; /* Swizzled form of max # of chunks in each dimension */
|
||||
|
||||
/* Get the swizzled chunk dimensions */
|
||||
HDmemcpy(layout->u.earray.swizzled_dim, layout->dim, (layout->ndims - 1) * sizeof(layout->dim[0]));
|
||||
H5MM_memcpy(layout->u.earray.swizzled_dim, layout->dim, (layout->ndims - 1) * sizeof(layout->dim[0]));
|
||||
H5VM_swizzle_coords(uint32_t, layout->u.earray.swizzled_dim, layout->u.earray.unlim_dim);
|
||||
|
||||
/* Get the swizzled number of chunks in each dimension */
|
||||
HDmemcpy(swizzled_chunks, layout->chunks, (layout->ndims - 1) * sizeof(swizzled_chunks[0]));
|
||||
H5MM_memcpy(swizzled_chunks, layout->chunks, (layout->ndims - 1) * sizeof(swizzled_chunks[0]));
|
||||
H5VM_swizzle_coords(hsize_t, swizzled_chunks, layout->u.earray.unlim_dim);
|
||||
|
||||
/* Get the swizzled "down" sizes for each dimension */
|
||||
@ -1209,7 +1210,7 @@ H5D__earray_idx_resize(H5O_layout_chunk_t *layout)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute swizzled 'down' chunk size value")
|
||||
|
||||
/* Get the swizzled max number of chunks in each dimension */
|
||||
HDmemcpy(swizzled_max_chunks, layout->max_chunks, (layout->ndims - 1) * sizeof(swizzled_max_chunks[0]));
|
||||
H5MM_memcpy(swizzled_max_chunks, layout->max_chunks, (layout->ndims - 1) * sizeof(swizzled_max_chunks[0]));
|
||||
H5VM_swizzle_coords(hsize_t, swizzled_max_chunks, layout->u.earray.unlim_dim);
|
||||
|
||||
/* Get the swizzled max "down" sizes for each dimension */
|
||||
|
@ -91,6 +91,7 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
|
||||
H5D__efl_construct,
|
||||
NULL,
|
||||
H5D__efl_is_space_alloc,
|
||||
NULL,
|
||||
H5D__efl_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
@ -226,7 +227,7 @@ H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t H5_ATTR_UNU
|
||||
{
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDmemcpy(&io_info->store->efl, &(io_info->dset->shared->dcpl_cache.efl), sizeof(H5O_efl_t));
|
||||
H5MM_memcpy(&io_info->store->efl, &(io_info->dset->shared->dcpl_cache.efl), sizeof(H5O_efl_t));
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D__efl_io_init() */
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vector and array functions */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
@ -300,7 +301,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_NOSPACE, FAIL, "can't get actual buffer")
|
||||
|
||||
/* Copy the user's data into the buffer for conversion */
|
||||
HDmemcpy(elem_ptr, fill, src_type_size);
|
||||
H5MM_memcpy(elem_ptr, fill, src_type_size);
|
||||
|
||||
/* If there's no VL type of data, do conversion first then fill the data into
|
||||
* the memory buffer. */
|
||||
@ -577,7 +578,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
|
||||
HDassert(fb_info->fill_buf);
|
||||
|
||||
/* Make a copy of the (disk-based) fill value into the buffer */
|
||||
HDmemcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
|
||||
H5MM_memcpy(fb_info->fill_buf, fb_info->fill->buf, fb_info->file_elmt_size);
|
||||
|
||||
/* Reset first element of background buffer, if necessary */
|
||||
if(H5T_path_bkg(fb_info->fill_to_mem_tpath))
|
||||
@ -603,7 +604,7 @@ H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts)
|
||||
if(!buf)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed for temporary fill buffer")
|
||||
|
||||
HDmemcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
|
||||
H5MM_memcpy(buf, fb_info->fill_buf, fb_info->fill_buf_size);
|
||||
|
||||
/* Type convert the dataset buffer, to copy any VL components */
|
||||
if(H5T_convert(fb_info->mem_to_dset_tpath, fb_info->mem_tid, fb_info->file_tid, nelmts, (size_t)0, (size_t)0, fb_info->fill_buf, fb_info->bkg_buf) < 0)
|
||||
|
17
src/H5Dint.c
17
src/H5Dint.c
@ -470,7 +470,7 @@ H5D__new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Copy the default dataset information */
|
||||
HDmemcpy(new_dset, &H5D_def_dset, sizeof(H5D_shared_t));
|
||||
H5MM_memcpy(new_dset, &H5D_def_dset, sizeof(H5D_shared_t));
|
||||
|
||||
/* If we are using the default dataset creation property list, during creation
|
||||
* don't bother to copy it, just increment the reference count
|
||||
@ -774,7 +774,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
|
||||
|
||||
/* Shallow copy the fill value property */
|
||||
/* guards against shared component modification */
|
||||
HDmemcpy(&old_fill_prop, fill_prop, sizeof(old_fill_prop));
|
||||
H5MM_memcpy(&old_fill_prop, fill_prop, sizeof(old_fill_prop));
|
||||
|
||||
if (H5O_msg_reset_share(H5O_FILL_ID, &old_fill_prop) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't reset the copied fill property")
|
||||
@ -1000,7 +1000,7 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
|
||||
|
||||
/* Shallow copy the fill value property */
|
||||
/* (we only want to make certain that the shared component isn't modified) */
|
||||
HDmemcpy(&old_fill_prop, fill_prop, sizeof(old_fill_prop));
|
||||
H5MM_memcpy(&old_fill_prop, fill_prop, sizeof(old_fill_prop));
|
||||
|
||||
/* Reset shared component info */
|
||||
H5O_msg_reset_share(H5O_FILL_ID, &old_fill_prop);
|
||||
@ -1642,7 +1642,7 @@ H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id)
|
||||
dset->shared->append_flush.ndims = info.ndims;
|
||||
dset->shared->append_flush.func = info.func;
|
||||
dset->shared->append_flush.udata = info.udata;
|
||||
HDmemcpy(dset->shared->append_flush.boundary, info.boundary, sizeof(info.boundary));
|
||||
H5MM_memcpy(dset->shared->append_flush.boundary, info.boundary, sizeof(info.boundary));
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
@ -2778,7 +2778,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
|
||||
|
||||
/* Keep the current dataspace dimensions for later */
|
||||
HDcompile_assert(sizeof(curr_dims) == sizeof(dset->shared->curr_dims));
|
||||
HDmemcpy(curr_dims, dset->shared->curr_dims, H5S_MAX_RANK * sizeof(curr_dims[0]));
|
||||
H5MM_memcpy(curr_dims, dset->shared->curr_dims, H5S_MAX_RANK * sizeof(curr_dims[0]));
|
||||
|
||||
/* Modify the size of the dataspace */
|
||||
if((changed = H5S_set_extent(dset->shared->space, size)) < 0)
|
||||
@ -2898,7 +2898,8 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
if(H5D_CHUNKED == dset->shared->layout.type) {
|
||||
if(shrink && (*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage))
|
||||
if(shrink && ((*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)
|
||||
|| (dset->shared->layout.ops->is_data_cached && (*dset->shared->layout.ops->is_data_cached)(dset->shared))))
|
||||
/* Remove excess chunks */
|
||||
if(H5D__chunk_prune_by_extent(dset, curr_dims) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks")
|
||||
@ -3062,7 +3063,7 @@ H5D__format_convert(H5D_t *dataset)
|
||||
idx_info.storage = &dataset->shared->layout.storage.u.chunk;
|
||||
|
||||
/* Copy the current layout info to the new layout */
|
||||
HDmemcpy(newlayout, &dataset->shared->layout, sizeof(H5O_layout_t));
|
||||
H5MM_memcpy(newlayout, &dataset->shared->layout, sizeof(H5O_layout_t));
|
||||
|
||||
/* Set up info for version 1 B-tree in the new layout */
|
||||
newlayout->version = H5O_LAYOUT_VERSION_3;
|
||||
@ -3113,7 +3114,7 @@ H5D__format_convert(H5D_t *dataset)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
|
||||
|
||||
/* Copy the new layout to the dataset's layout */
|
||||
HDmemcpy(&dataset->shared->layout, newlayout, sizeof(H5O_layout_t));
|
||||
H5MM_memcpy(&dataset->shared->layout, newlayout, sizeof(H5O_layout_t));
|
||||
|
||||
break;
|
||||
|
||||
|
@ -518,7 +518,8 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
* has been overwritten. So just proceed in reading.
|
||||
*/
|
||||
if(nelmts > 0 && dataset->shared->dcpl_cache.efl.nused == 0 &&
|
||||
!(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)) {
|
||||
!(*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage) &&
|
||||
!(dataset->shared->layout.ops->is_data_cached && (*dataset->shared->layout.ops->is_data_cached)(dataset->shared))) {
|
||||
H5D_fill_value_t fill_status; /* Whether/How the fill value is defined */
|
||||
|
||||
/* Retrieve dataset's fill-value properties */
|
||||
@ -550,6 +551,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
/* Sanity check that space is allocated, if there are elements */
|
||||
if(nelmts > 0)
|
||||
HDassert((*dataset->shared->layout.ops->is_space_alloc)(&dataset->shared->layout.storage)
|
||||
|| (dataset->shared->layout.ops->is_data_cached && (*dataset->shared->layout.ops->is_data_cached)(dataset->shared))
|
||||
|| dataset->shared->dcpl_cache.efl.nused > 0
|
||||
|| dataset->shared->layout.type == H5D_COMPACT);
|
||||
|
||||
|
@ -1427,7 +1427,7 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
|
||||
for (i = 0, offset = 0; i < (size_t) mpi_rank; i++)
|
||||
offset += num_chunks_selected_array[i];
|
||||
|
||||
HDmemcpy(chunk_list, &collective_chunk_list[offset], num_chunks_selected_array[mpi_rank] * sizeof(H5D_filtered_collective_io_info_t));
|
||||
H5MM_memcpy(chunk_list, &collective_chunk_list[offset], num_chunks_selected_array[mpi_rank] * sizeof(H5D_filtered_collective_io_info_t));
|
||||
|
||||
/* Create single MPI type encompassing each selection in the dataspace */
|
||||
if (H5D__mpio_filtered_collective_write_type(chunk_list, chunk_list_num_entries,
|
||||
@ -1553,7 +1553,7 @@ if(H5DEBUG(D))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "unable to obtain MPIO mode")
|
||||
|
||||
/* Set up contiguous I/O info object */
|
||||
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
ctg_io_info.store = &ctg_store;
|
||||
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
|
||||
|
||||
@ -1561,7 +1561,7 @@ if(H5DEBUG(D))
|
||||
ctg_store.contig.dset_size = (hsize_t)io_info->dset->shared->layout.u.chunk.size;
|
||||
|
||||
/* Set up compact I/O info object */
|
||||
HDmemcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
H5MM_memcpy(&cpt_io_info, io_info, sizeof(cpt_io_info));
|
||||
cpt_io_info.store = &cpt_store;
|
||||
cpt_io_info.layout_ops = *H5D_LOPS_COMPACT;
|
||||
|
||||
@ -1788,7 +1788,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list")
|
||||
|
||||
/* Set up contiguous I/O info object */
|
||||
HDmemcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
H5MM_memcpy(&ctg_io_info, io_info, sizeof(ctg_io_info));
|
||||
ctg_io_info.store = &ctg_store;
|
||||
ctg_io_info.layout_ops = *H5D_LOPS_CONTIG;
|
||||
|
||||
@ -1893,7 +1893,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
|
||||
|
||||
/* Collect the new chunk info back to the local copy, since only the record in the
|
||||
* collective array gets updated by the chunk re-allocation */
|
||||
HDmemcpy(&chunk_list[i].chunk_states.new_chunk, &collective_chunk_list[offset].chunk_states.new_chunk, sizeof(chunk_list[i].chunk_states.new_chunk));
|
||||
H5MM_memcpy(&chunk_list[i].chunk_states.new_chunk, &collective_chunk_list[offset].chunk_states.new_chunk, sizeof(chunk_list[i].chunk_states.new_chunk));
|
||||
|
||||
H5_CHECKED_ASSIGN(mpi_type_count, int, chunk_list[i].chunk_states.new_chunk.length, hsize_t);
|
||||
|
||||
@ -2517,8 +2517,8 @@ H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
|
||||
|
||||
/* merge buffer io_mode info and chunk addr into one */
|
||||
HDmemcpy(mergebuf, assign_io_mode, total_chunks);
|
||||
HDmemcpy(tempbuf, chunk_addr, sizeof(haddr_t) * total_chunks);
|
||||
H5MM_memcpy(mergebuf, assign_io_mode, total_chunks);
|
||||
H5MM_memcpy(tempbuf, chunk_addr, sizeof(haddr_t) * total_chunks);
|
||||
|
||||
H5MM_free(nproc_per_chunk);
|
||||
} /* end if */
|
||||
@ -2527,8 +2527,8 @@ H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
if(MPI_SUCCESS != (mpi_code = MPI_Bcast(mergebuf, ((sizeof(haddr_t) + 1) * total_chunks), MPI_BYTE, root, comm)))
|
||||
HMPI_GOTO_ERROR(FAIL, "MPI_BCast failed", mpi_code)
|
||||
|
||||
HDmemcpy(assign_io_mode, mergebuf, total_chunks);
|
||||
HDmemcpy(chunk_addr, tempbuf, sizeof(haddr_t) * total_chunks);
|
||||
H5MM_memcpy(assign_io_mode, mergebuf, total_chunks);
|
||||
H5MM_memcpy(chunk_addr, tempbuf, sizeof(haddr_t) * total_chunks);
|
||||
|
||||
#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
|
||||
{
|
||||
@ -2630,7 +2630,7 @@ H5D__construct_filtered_io_info_list(const H5D_io_info_t *io_info, const H5D_typ
|
||||
local_info_array[i].async_info.receive_buffer_array = NULL;
|
||||
local_info_array[i].async_info.receive_requests_array = NULL;
|
||||
|
||||
HDmemcpy(local_info_array[i].scaled, chunk_info->scaled, sizeof(chunk_info->scaled));
|
||||
H5MM_memcpy(local_info_array[i].scaled, chunk_info->scaled, sizeof(chunk_info->scaled));
|
||||
|
||||
if ((select_npoints = H5S_GET_SELECT_NPOINTS(chunk_info->mspace)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOUNT, FAIL, "dataspace is invalid")
|
||||
|
@ -113,12 +113,14 @@ typedef struct H5D_type_info_t {
|
||||
/* Forward declaration of structs used below */
|
||||
struct H5D_io_info_t;
|
||||
struct H5D_chunk_map_t;
|
||||
typedef struct H5D_shared_t H5D_shared_t;
|
||||
|
||||
/* Function pointers for I/O on particular types of dataset layouts */
|
||||
typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, H5D_t *dset);
|
||||
typedef herr_t (*H5D_layout_init_func_t)(H5F_t *f, const H5D_t *dset,
|
||||
hid_t dapl_id);
|
||||
typedef hbool_t (*H5D_layout_is_space_alloc_func_t)(const H5O_storage_t *storage);
|
||||
typedef hbool_t (*H5D_layout_is_data_cached_func_t)(const H5D_shared_t *shared_dset);
|
||||
typedef herr_t (*H5D_layout_io_init_func_t)(const struct H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
@ -144,6 +146,7 @@ typedef struct H5D_layout_ops_t {
|
||||
H5D_layout_construct_func_t construct; /* Layout constructor for new datasets */
|
||||
H5D_layout_init_func_t init; /* Layout initializer for dataset */
|
||||
H5D_layout_is_space_alloc_func_t is_space_alloc; /* Query routine to determine if storage is allocated */
|
||||
H5D_layout_is_data_cached_func_t is_data_cached; /* Query routine to determine if any raw data is cached. If routine is not present then the layout type never caches raw data. */
|
||||
H5D_layout_io_init_func_t io_init; /* I/O initialization routine */
|
||||
H5D_layout_read_func_t ser_read; /* High-level I/O routine for reading data in serial */
|
||||
H5D_layout_write_func_t ser_write; /* High-level I/O routine for writing data in serial */
|
||||
@ -429,7 +432,7 @@ typedef struct H5D_rdcdc_t {
|
||||
* created once for a given dataset. Thus, if a dataset is opened twice,
|
||||
* there will be two IDs and two H5D_t structs, both sharing one H5D_shared_t.
|
||||
*/
|
||||
typedef struct H5D_shared_t {
|
||||
struct H5D_shared_t {
|
||||
size_t fo_count; /* Reference count */
|
||||
hbool_t closing; /* Flag to indicate dataset is closing */
|
||||
hid_t type_id; /* ID for dataset's datatype */
|
||||
@ -459,7 +462,7 @@ typedef struct H5D_shared_t {
|
||||
H5D_append_flush_t append_flush; /* Append flush property information */
|
||||
char *extfile_prefix; /* expanded external file prefix */
|
||||
char *vds_prefix; /* expanded vds prefix */
|
||||
} H5D_shared_t;
|
||||
};
|
||||
|
||||
struct H5D_t {
|
||||
H5O_loc_t oloc; /* Object header location */
|
||||
@ -618,6 +621,7 @@ H5_DLL herr_t H5D__layout_oh_write(const H5D_t *dataset, H5O_t *oh, unsigned upd
|
||||
/* Functions that operate on contiguous storage */
|
||||
H5_DLL herr_t H5D__contig_alloc(H5F_t *f, H5O_storage_contig_t *storage);
|
||||
H5_DLL hbool_t H5D__contig_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL hbool_t H5D__contig_is_data_cached(const H5D_shared_t *shared_dset);
|
||||
H5_DLL herr_t H5D__contig_fill(const H5D_io_info_t *io_info);
|
||||
H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
@ -636,6 +640,7 @@ H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
|
||||
H5_DLL herr_t H5D__chunk_create(const H5D_t *dset /*in,out*/);
|
||||
H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
|
||||
H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL hbool_t H5D__chunk_is_data_cached(const H5D_shared_t *shared_dset);
|
||||
H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled,
|
||||
H5D_chunk_ud_t *udata);
|
||||
H5_DLL herr_t H5D__chunk_allocated(const H5D_t *dset, hsize_t *nbytes);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -117,7 +118,7 @@ H5D__scatter_file(const H5D_io_info_t *_io_info,
|
||||
HDassert(_buf);
|
||||
|
||||
/* Set up temporary I/O info object */
|
||||
HDmemcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
|
||||
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
|
||||
tmp_io_info.op_type = H5D_IO_OP_WRITE;
|
||||
tmp_io_info.u.wbuf = _buf;
|
||||
|
||||
@ -220,7 +221,7 @@ H5D__gather_file(const H5D_io_info_t *_io_info,
|
||||
HDassert(_buf);
|
||||
|
||||
/* Set up temporary I/O info object */
|
||||
HDmemcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
|
||||
H5MM_memcpy(&tmp_io_info, _io_info, sizeof(*_io_info));
|
||||
tmp_io_info.op_type = H5D_IO_OP_READ;
|
||||
tmp_io_info.u.rbuf = _buf;
|
||||
|
||||
@ -337,7 +338,7 @@ H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
|
||||
/* Get the number of bytes in sequence */
|
||||
curr_len = len[curr_seq];
|
||||
|
||||
HDmemcpy(buf + off[curr_seq], tscat_buf, curr_len);
|
||||
H5MM_memcpy(buf + off[curr_seq], tscat_buf, curr_len);
|
||||
|
||||
/* Advance offset in destination buffer */
|
||||
tscat_buf += curr_len;
|
||||
@ -425,7 +426,7 @@ H5D__gather_mem(const void *_buf, const H5S_t *space,
|
||||
/* Get the number of bytes in sequence */
|
||||
curr_len = len[curr_seq];
|
||||
|
||||
HDmemcpy(tgath_buf, buf + off[curr_seq], curr_len);
|
||||
H5MM_memcpy(tgath_buf, buf + off[curr_seq], curr_len);
|
||||
|
||||
/* Advance offset in gather buffer */
|
||||
tgath_buf += curr_len;
|
||||
|
@ -227,6 +227,8 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
||||
|
||||
/* Decrement number of elements left to process */
|
||||
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
|
||||
if(elmt_size == 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "Resulted in division by zero")
|
||||
nelmts -= ((size_t)tmp_file_len / elmt_size);
|
||||
} /* end while */
|
||||
} /* end else */
|
||||
|
@ -78,6 +78,7 @@
|
||||
/********************/
|
||||
|
||||
/* Layout operation callbacks */
|
||||
static hbool_t H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset);
|
||||
static herr_t H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t
|
||||
*type_info, hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *fm);
|
||||
@ -121,6 +122,7 @@ const H5D_layout_ops_t H5D_LOPS_VIRTUAL[1] = {{
|
||||
NULL,
|
||||
H5D__virtual_init,
|
||||
H5D__virtual_is_space_alloc,
|
||||
H5D__virtual_is_data_cached,
|
||||
NULL,
|
||||
H5D__virtual_read,
|
||||
H5D__virtual_write,
|
||||
@ -491,11 +493,11 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
|
||||
/* Encode each entry */
|
||||
for(i = 0; i < layout->storage.u.virt.list_nused; i++) {
|
||||
/* Source file name */
|
||||
HDmemcpy((char *)heap_block_p, layout->storage.u.virt.list[i].source_file_name, str_size[2 * i]);
|
||||
H5MM_memcpy((char *)heap_block_p, layout->storage.u.virt.list[i].source_file_name, str_size[2 * i]);
|
||||
heap_block_p += str_size[2 * i];
|
||||
|
||||
/* Source dataset name */
|
||||
HDmemcpy((char *)heap_block_p, layout->storage.u.virt.list[i].source_dset_name, str_size[(2 * i) + 1]);
|
||||
H5MM_memcpy((char *)heap_block_p, layout->storage.u.virt.list[i].source_dset_name, str_size[(2 * i) + 1]);
|
||||
heap_block_p += str_size[(2 * i) + 1];
|
||||
|
||||
/* Source selection */
|
||||
@ -1107,7 +1109,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf,
|
||||
|
||||
/* Copy string to *p. Note that since src in not NULL terminated, we must
|
||||
* use memcpy */
|
||||
(void)HDmemcpy(*p, src, src_len);
|
||||
(void)H5MM_memcpy(*p, src, src_len);
|
||||
|
||||
/* Advance *p */
|
||||
*p += src_len;
|
||||
@ -2206,6 +2208,54 @@ H5D__virtual_is_space_alloc(const H5O_storage_t H5_ATTR_UNUSED *storage)
|
||||
} /* end H5D__virtual_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__virtual_is_data_cached
|
||||
*
|
||||
* Purpose: Query if raw data is cached for dataset
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Neil Fortner
|
||||
* Wednessday, March 6, 2016
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static hbool_t
|
||||
H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
|
||||
{
|
||||
const H5O_storage_virtual_t *storage; /* Convenience pointer */
|
||||
size_t i, j; /* Local index variables */
|
||||
hbool_t ret_value = FALSE; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(shared_dset);
|
||||
storage = &shared_dset->layout.storage.u.virt;
|
||||
|
||||
/* Iterate over mappings */
|
||||
for(i = 0; i < storage->list_nused; i++)
|
||||
/* Check for "printf" source dataset resolution */
|
||||
if(storage->list[i].psfn_nsubs || storage->list[i].psdn_nsubs) {
|
||||
/* Iterate over sub-source dsets */
|
||||
for(j = storage->list[i].sub_dset_io_start; j < storage->list[i].sub_dset_io_end; j++)
|
||||
/* Check for cahced data in source dset */
|
||||
if(storage->list[i].sub_dset[j].dset
|
||||
&& storage->list[i].sub_dset[j].dset->shared->layout.ops->is_data_cached
|
||||
&& storage->list[i].sub_dset[j].dset->shared->layout.ops->is_data_cached(storage->list[i].sub_dset[j].dset->shared))
|
||||
HGOTO_DONE(TRUE);
|
||||
} /* end if */
|
||||
else
|
||||
if(storage->list[i].source_dset.dset
|
||||
&& storage->list[i].source_dset.dset->shared->layout.ops->is_data_cached
|
||||
&& storage->list[i].source_dset.dset->shared->layout.ops->is_data_cached(storage->list[i].source_dset.dset->shared))
|
||||
HGOTO_DONE(TRUE);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D__virtual_is_data_cached() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__virtual_pre_io
|
||||
*
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vector functions */
|
||||
|
||||
|
||||
@ -693,7 +694,7 @@ H5EA_set(const H5EA_t *ea, hsize_t idx, const void *elmt))
|
||||
HDassert(thing_unprot_func);
|
||||
|
||||
/* Set element in thing's element buffer */
|
||||
HDmemcpy(thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
thing_cache_flags |= H5AC__DIRTIED_FLAG;
|
||||
|
||||
/* Update max. element set in array, if appropriate */
|
||||
@ -765,7 +766,7 @@ H5EA_get(const H5EA_t *ea, hsize_t idx, void *elmt))
|
||||
} /* end if */
|
||||
else
|
||||
/* Get element from thing's element buffer */
|
||||
HDmemcpy(elmt, thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(elmt, thing_elmt_buf + (hdr->cparam.cls->nat_elmt_size * thing_elmt_idx), hdr->cparam.cls->nat_elmt_size);
|
||||
} /* end else */
|
||||
|
||||
CATCH
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
@ -479,7 +480,7 @@ H5EA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
|
||||
HDassert(hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -867,7 +868,7 @@ H5EA__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
/* Get temporary pointer to serialized info */
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1179,7 +1180,7 @@ H5EA__cache_sblock_deserialize(const void *_image, size_t len,
|
||||
size_t tot_page_init_size = sblock->ndblks * sblock->dblk_page_init_size; /* Compute total size of 'page init' buffer */
|
||||
|
||||
/* Retrieve the 'page init' bitmasks */
|
||||
HDmemcpy(sblock->page_init, image, tot_page_init_size);
|
||||
H5MM_memcpy(sblock->page_init, image, tot_page_init_size);
|
||||
image += tot_page_init_size;
|
||||
} /* end if */
|
||||
|
||||
@ -1276,7 +1277,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
HDassert(sblock->hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1298,7 +1299,7 @@ H5EA__cache_sblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
size_t tot_page_init_size = sblock->ndblks * sblock->dblk_page_init_size; /* Compute total size of 'page init' buffer */
|
||||
|
||||
/* Store the 'page init' bitmasks */
|
||||
HDmemcpy(image, sblock->page_init, tot_page_init_size);
|
||||
H5MM_memcpy(image, sblock->page_init, tot_page_init_size);
|
||||
image += tot_page_init_size;
|
||||
} /* end if */
|
||||
|
||||
@ -1690,7 +1691,7 @@ H5EA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
HDassert(dblock->hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
|
||||
|
||||
@ -407,7 +408,7 @@ H5EA__hdr_create(H5F_t *f, const H5EA_create_t *cparam, void *ctx_udata))
|
||||
hdr->idx_blk_addr = HADDR_UNDEF;
|
||||
|
||||
/* Set the creation parameters for the array */
|
||||
HDmemcpy(&hdr->cparam, cparam, sizeof(hdr->cparam));
|
||||
H5MM_memcpy(&hdr->cparam, cparam, sizeof(hdr->cparam));
|
||||
|
||||
/* Finish initializing extensible array header */
|
||||
if(H5EA__hdr_init(hdr, ctx_udata) < 0)
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -108,7 +109,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
|
||||
HDassert(stats);
|
||||
|
||||
/* Copy extensible array statistics */
|
||||
HDmemcpy(stats, &ea->hdr->stats, sizeof(ea->hdr->stats));
|
||||
H5MM_memcpy(stats, &ea->hdr->stats, sizeof(ea->hdr->stats));
|
||||
|
||||
END_FUNC(PRIV) /* end H5EA_get_stats() */
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vector functions */
|
||||
|
||||
|
||||
@ -371,7 +372,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt))
|
||||
/* Check for paging data block */
|
||||
if(!dblock->npages) {
|
||||
/* Set element in data block */
|
||||
HDmemcpy(((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
dblock_cache_flags |= H5AC__DIRTIED_FLAG;
|
||||
} /* end if */
|
||||
else { /* paging */
|
||||
@ -410,7 +411,7 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt))
|
||||
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr)
|
||||
|
||||
/* Set the element in the data block page */
|
||||
HDmemcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), elmt, hdr->cparam.cls->nat_elmt_size);
|
||||
dblk_page_cache_flags |= H5AC__DIRTIED_FLAG;
|
||||
} /* end else */
|
||||
|
||||
@ -474,7 +475,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt))
|
||||
/* Check for paged data block */
|
||||
if(!dblock->npages)
|
||||
/* Retrieve element from data block */
|
||||
HDmemcpy(elmt, ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(elmt, ((uint8_t *)dblock->elmts) + (hdr->cparam.cls->nat_elmt_size * idx), hdr->cparam.cls->nat_elmt_size);
|
||||
else { /* paging */
|
||||
size_t page_idx; /* Index of page within data block */
|
||||
|
||||
@ -512,7 +513,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt))
|
||||
H5E_THROW(H5E_CANTPROTECT, "unable to protect fixed array data block page, address = %llu", (unsigned long long)dblk_page_addr)
|
||||
|
||||
/* Retrieve element from data block */
|
||||
HDmemcpy(elmt, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), hdr->cparam.cls->nat_elmt_size);
|
||||
H5MM_memcpy(elmt, ((uint8_t *)dblk_page->elmts) + (hdr->cparam.cls->nat_elmt_size * elmt_idx), hdr->cparam.cls->nat_elmt_size);
|
||||
} /* end else */
|
||||
} /* end else */
|
||||
} /* end else */
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
@ -409,7 +410,7 @@ H5FA__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
|
||||
HDassert(hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -693,7 +694,7 @@ H5FA__cache_dblock_deserialize(const void *_image, size_t len,
|
||||
|
||||
/* Page initialization flags */
|
||||
if(dblock->npages > 0) {
|
||||
HDmemcpy(dblock->dblk_page_init, image, dblock->dblk_page_init_size);
|
||||
H5MM_memcpy(dblock->dblk_page_init, image, dblock->dblk_page_init_size);
|
||||
image += dblock->dblk_page_init_size;
|
||||
} /* end if */
|
||||
|
||||
@ -797,7 +798,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
HDassert(dblock->hdr);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -812,7 +813,7 @@ H5FA__cache_dblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED
|
||||
/* Page init flags */
|
||||
if(dblock->npages > 0) {
|
||||
/* Store the 'page init' bitmasks */
|
||||
HDmemcpy(image, dblock->dblk_page_init, dblock->dblk_page_init_size);
|
||||
H5MM_memcpy(image, dblock->dblk_page_init, dblock->dblk_page_init_size);
|
||||
image += dblock->dblk_page_init_size;
|
||||
} /* end if */
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -207,7 +208,7 @@ H5FA__hdr_create(H5F_t *f, const H5FA_create_t *cparam, void *ctx_udata))
|
||||
hdr->dblk_addr = HADDR_UNDEF;
|
||||
|
||||
/* Set the creation parameters for the array */
|
||||
HDmemcpy(&hdr->cparam, cparam, sizeof(hdr->cparam));
|
||||
H5MM_memcpy(&hdr->cparam, cparam, sizeof(hdr->cparam));
|
||||
|
||||
/* Finish initializing fixed array header */
|
||||
if(H5FA__hdr_init(hdr, ctx_udata) < 0)
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -105,7 +106,7 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
|
||||
HDassert(stats);
|
||||
|
||||
/* Copy fixed array statistics */
|
||||
HDmemcpy(stats, &fa->hdr->stats, sizeof(fa->hdr->stats));
|
||||
H5MM_memcpy(stats, &fa->hdr->stats, sizeof(fa->hdr->stats));
|
||||
|
||||
END_FUNC(PRIV) /* end H5FA_get_stats() */
|
||||
|
||||
|
@ -293,7 +293,7 @@ H5FD_register(const void *_cls, size_t size, hbool_t app_ref)
|
||||
/* Copy the class structure so the caller can reuse or free it */
|
||||
if(NULL == (saved = (H5FD_class_t *)H5MM_malloc(size)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed for file driver class struct")
|
||||
HDmemcpy(saved, cls, size);
|
||||
H5MM_memcpy(saved, cls, size);
|
||||
|
||||
/* Create the new class ID */
|
||||
if((ret_value = H5I_register(H5I_VFL, saved, app_ref)) < 0)
|
||||
@ -1367,7 +1367,7 @@ H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
|
||||
} /* end if */
|
||||
else
|
||||
/* Copy class's default free space type mapping */
|
||||
HDmemcpy(type_map, file->cls->fl_map, sizeof(file->cls->fl_map));
|
||||
H5MM_memcpy(type_map, file->cls->fl_map, sizeof(file->cls->fl_map));
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
|
@ -848,7 +848,7 @@ H5FD__core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, NULL, "image_memcpy callback failed")
|
||||
} /* end if */
|
||||
else
|
||||
HDmemcpy(file->mem, file_image_info.buffer, size);
|
||||
H5MM_memcpy(file->mem, file_image_info.buffer, size);
|
||||
} /* end if */
|
||||
/* Read in existing data from the file if there is no image */
|
||||
else {
|
||||
@ -1300,7 +1300,7 @@ H5FD__core_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNU
|
||||
nbytes = MIN(size,(size_t)(file->eof-addr));
|
||||
#endif /* NDEBUG */
|
||||
|
||||
HDmemcpy(buf, file->mem + addr, nbytes);
|
||||
H5MM_memcpy(buf, file->mem + addr, nbytes);
|
||||
size -= nbytes;
|
||||
addr += nbytes;
|
||||
buf = (char *)buf + nbytes;
|
||||
@ -1386,7 +1386,7 @@ H5FD__core_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
|
||||
}
|
||||
|
||||
/* Write from BUF to memory */
|
||||
HDmemcpy(file->mem + addr, buf, size);
|
||||
H5MM_memcpy(file->mem + addr, buf, size);
|
||||
|
||||
/* Mark memory buffer as modified */
|
||||
file->dirty = TRUE;
|
||||
|
@ -422,7 +422,7 @@ H5FD_direct_fapl_copy(const void *_old_fa)
|
||||
HDassert(new_fa);
|
||||
|
||||
/* Copy the general information */
|
||||
HDmemcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
|
||||
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
|
||||
|
||||
FUNC_LEAVE_NOAPI(new_fa)
|
||||
} /* end H5FD_direct_fapl_copy() */
|
||||
@ -976,12 +976,12 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
|
||||
* next section of data. */
|
||||
p2 = (unsigned char*)copy_buf + copy_offset;
|
||||
if((copy_size + copy_offset) <= alloc_size) {
|
||||
HDmemcpy(buf, p2, copy_size);
|
||||
H5MM_memcpy(buf, p2, copy_size);
|
||||
buf = (unsigned char *)buf + copy_size;
|
||||
copy_size = 0;
|
||||
} /* end if */
|
||||
else {
|
||||
HDmemcpy(buf, p2, alloc_size - copy_offset);
|
||||
H5MM_memcpy(buf, p2, alloc_size - copy_offset);
|
||||
buf = (unsigned char*)buf + alloc_size - copy_offset;
|
||||
copy_size -= alloc_size - copy_offset;
|
||||
copy_offset = 0;
|
||||
@ -1189,11 +1189,11 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
|
||||
*/
|
||||
p1 = (unsigned char *)copy_buf + copy_offset;
|
||||
if((copy_size + copy_offset) <= alloc_size) {
|
||||
HDmemcpy(p1, p3, copy_size);
|
||||
H5MM_memcpy(p1, p3, copy_size);
|
||||
copy_size = 0;
|
||||
} /* end if */
|
||||
else {
|
||||
HDmemcpy(p1, p3, alloc_size - copy_offset);
|
||||
H5MM_memcpy(p1, p3, alloc_size - copy_offset);
|
||||
p3 = (const unsigned char *)p3 + (alloc_size - copy_offset);
|
||||
copy_size -= alloc_size - copy_offset;
|
||||
copy_offset = 0;
|
||||
|
@ -411,7 +411,7 @@ H5FD_family_fapl_copy(const void *_old_fa)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Copy the fields of the structure */
|
||||
HDmemcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t));
|
||||
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_family_fapl_t));
|
||||
|
||||
/* Deep copy the property list objects in the structure */
|
||||
if(old_fa->memb_fapl_id==H5P_FILE_ACCESS_DEFAULT) {
|
||||
|
@ -405,7 +405,7 @@ H5FD_log_fapl_copy(const void *_old_fa)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, NULL, "unable to allocate log file FAPL")
|
||||
|
||||
/* Copy the general information */
|
||||
HDmemcpy(new_fa, old_fa, sizeof(H5FD_log_fapl_t));
|
||||
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_log_fapl_t));
|
||||
|
||||
/* Deep copy the log file name */
|
||||
if(old_fa->logfile != NULL)
|
||||
|
@ -745,7 +745,7 @@ if(H5FD_mpio_Debug[(int)'t'])
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Copy the general information */
|
||||
HDmemcpy(new_fa, old_fa, sizeof(H5FD_mpio_fapl_t));
|
||||
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_mpio_fapl_t));
|
||||
|
||||
/* Duplicate communicator and Info object. */
|
||||
if(H5FD_mpi_comm_info_dup(old_fa->comm, old_fa->info, &new_fa->comm, &new_fa->info) < 0)
|
||||
|
@ -1142,7 +1142,7 @@ H5FL_blk_realloc(H5FL_blk_head_t *head, void *block, size_t new_size H5FL_TRACK_
|
||||
if((ret_value=H5FL_blk_malloc(head,new_size H5FL_TRACK_INFO_INT))==NULL)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for block")
|
||||
blk_size=MIN(new_size,temp->size);
|
||||
HDmemcpy(ret_value,block,blk_size);
|
||||
H5MM_memcpy(ret_value,block,blk_size);
|
||||
H5FL_blk_free(head,block);
|
||||
} /* end if */
|
||||
else {
|
||||
@ -1630,7 +1630,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
|
||||
|
||||
/* Copy the appropriate amount of elements */
|
||||
blk_size = head->list_arr[MIN(temp->nelem, new_elem)].size;
|
||||
HDmemcpy(ret_value, obj, blk_size);
|
||||
H5MM_memcpy(ret_value, obj, blk_size);
|
||||
|
||||
/* Free the old block */
|
||||
H5FL_arr_free(head, obj);
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FSpkg.h" /* File free space */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -615,7 +616,7 @@ H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes
|
||||
HDassert(u == classes[u]->type);
|
||||
|
||||
/* Copy the class information into the free space manager */
|
||||
HDmemcpy(&fspace->sect_cls[u], classes[u], sizeof(H5FS_section_class_t));
|
||||
H5MM_memcpy(&fspace->sect_cls[u], classes[u], sizeof(H5FS_section_class_t));
|
||||
|
||||
/* Call the class initialization routine, if there is one */
|
||||
if(fspace->sect_cls[u].init_cls)
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "H5Fprivate.h" /* File */
|
||||
#include "H5FSpkg.h" /* File free space */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
@ -707,7 +708,7 @@ H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
(fspace->alloc_sect_size == (size_t)fspace->sect_size)));
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1265,7 +1266,7 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
HDassert(fspace->sect_cls);
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Fpkg.h" /* File access */
|
||||
#include "H5FDprivate.h" /* File drivers */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
|
||||
|
||||
@ -198,7 +199,7 @@ H5F__accum_read(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
} /* end if */
|
||||
|
||||
/* Copy the data out of the buffer */
|
||||
HDmemcpy(buf, accum->buf + (addr - new_addr), size);
|
||||
H5MM_memcpy(buf, accum->buf + (addr - new_addr), size);
|
||||
|
||||
/* Adjust the accumulator address & size */
|
||||
accum->loc = new_addr;
|
||||
@ -250,7 +251,7 @@ H5F__accum_read(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
} /* end else */
|
||||
|
||||
/* Copy the dirty region to buffer */
|
||||
HDmemcpy((unsigned char *)buf + buf_off, (unsigned char *)accum->buf + accum->dirty_off + dirty_off, overlap_size);
|
||||
H5MM_memcpy((unsigned char *)buf + buf_off, (unsigned char *)accum->buf + accum->dirty_off + dirty_off, overlap_size);
|
||||
} /* end if */
|
||||
} /* end else */
|
||||
} /* end if */
|
||||
@ -457,7 +458,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
HDmemmove(accum->buf + size, accum->buf, accum->size);
|
||||
|
||||
/* Copy the new metadata at the front */
|
||||
HDmemcpy(accum->buf, buf, size);
|
||||
H5MM_memcpy(accum->buf, buf, size);
|
||||
|
||||
/* Set the new size & location of the metadata accumulator */
|
||||
accum->loc = addr;
|
||||
@ -479,7 +480,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTRESIZE, FAIL, "can't adjust metadata accumulator")
|
||||
|
||||
/* Copy the new metadata to the end */
|
||||
HDmemcpy(accum->buf + accum->size, buf, size);
|
||||
H5MM_memcpy(accum->buf + accum->size, buf, size);
|
||||
|
||||
/* Adjust the dirty region and mark accumulator dirty */
|
||||
if(accum->dirty)
|
||||
@ -502,7 +503,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
size_t dirty_off = (size_t)(addr - accum->loc);
|
||||
|
||||
/* Copy the new metadata to the proper location within the accumulator */
|
||||
HDmemcpy(accum->buf + dirty_off, buf, size);
|
||||
H5MM_memcpy(accum->buf + dirty_off, buf, size);
|
||||
|
||||
/* Adjust the dirty region and mark accumulator dirty */
|
||||
if(accum->dirty) {
|
||||
@ -545,7 +546,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
HDmemmove(accum->buf + size, accum->buf + old_offset, (accum->size - old_offset));
|
||||
|
||||
/* Copy the new metadata at the front */
|
||||
HDmemcpy(accum->buf, buf, size);
|
||||
H5MM_memcpy(accum->buf, buf, size);
|
||||
|
||||
/* Set the new size & location of the metadata accumulator */
|
||||
accum->loc = addr;
|
||||
@ -582,7 +583,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
dirty_off = (size_t)(addr - accum->loc);
|
||||
|
||||
/* Copy the new metadata to the end */
|
||||
HDmemcpy(accum->buf + dirty_off, buf, size);
|
||||
H5MM_memcpy(accum->buf + dirty_off, buf, size);
|
||||
|
||||
/* Set the new size of the metadata accumulator */
|
||||
accum->size += add_size;
|
||||
@ -625,7 +626,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
} /* end if */
|
||||
|
||||
/* Copy the new metadata to the buffer */
|
||||
HDmemcpy(accum->buf, buf, size);
|
||||
H5MM_memcpy(accum->buf, buf, size);
|
||||
|
||||
/* Set the new size & location of the metadata accumulator */
|
||||
accum->loc = addr;
|
||||
@ -688,7 +689,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
accum->size = size;
|
||||
|
||||
/* Store the piece of metadata in the accumulator */
|
||||
HDmemcpy(accum->buf, buf, size);
|
||||
H5MM_memcpy(accum->buf, buf, size);
|
||||
|
||||
/* Adjust the dirty region and mark accumulator dirty */
|
||||
accum->dirty_off = 0;
|
||||
@ -721,7 +722,7 @@ H5F__accum_write(H5F_t *f, H5FD_mem_t map_type, haddr_t addr,
|
||||
accum->size = size;
|
||||
|
||||
/* Store the piece of metadata in the accumulator */
|
||||
HDmemcpy(accum->buf, buf, size);
|
||||
H5MM_memcpy(accum->buf, buf, size);
|
||||
|
||||
/* Adjust the dirty region and mark accumulator dirty */
|
||||
accum->dirty_off = 0;
|
||||
|
@ -3245,7 +3245,7 @@ H5F_get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
/* Copy the information */
|
||||
HDmemcpy(info->retries[j], file->shared->retries[i], tot_size);
|
||||
H5MM_memcpy(info->retries[j], file->shared->retries[i], tot_size);
|
||||
}
|
||||
|
||||
/* Increment location in info->retries[] array */
|
||||
|
@ -28,6 +28,7 @@ typedef struct H5F_t H5F_t;
|
||||
#include "H5FDpublic.h" /* File drivers */
|
||||
|
||||
/* Private headers needed by this file */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
#include "H5Pprivate.h" /* Property lists */
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
@ -134,7 +135,7 @@ typedef struct H5F_t H5F_t;
|
||||
\
|
||||
HDcompile_assert(sizeof(double) == 8); \
|
||||
HDcompile_assert(sizeof(double) == sizeof(uint64_t)); \
|
||||
HDmemcpy(&_n, &n, sizeof(double)); \
|
||||
H5MM_memcpy(&_n, &n, sizeof(double)); \
|
||||
for(_u = 0; _u < sizeof(uint64_t); _u++, _n >>= 8) \
|
||||
*_p++ = (uint8_t)(_n & 0xff); \
|
||||
(p) = (uint8_t *)(p) + 8; \
|
||||
@ -240,7 +241,7 @@ typedef struct H5F_t H5F_t;
|
||||
(p) += 8; \
|
||||
for(_u = 0; _u < sizeof(uint64_t); _u++) \
|
||||
_n = (_n << 8) | *(--p); \
|
||||
HDmemcpy(&(n), &_n, sizeof(double)); \
|
||||
H5MM_memcpy(&(n), &_n, sizeof(double)); \
|
||||
(p) += 8; \
|
||||
}
|
||||
|
||||
|
@ -555,7 +555,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
|
||||
/* Set the B-tree internal node values, etc */
|
||||
if(H5P_set(c_plist, H5F_CRT_BTREE_RANK_NAME, udata.btree_k) < 0)
|
||||
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "unable to set rank for btree internal nodes")
|
||||
HDmemcpy(sblock->btree_k, udata.btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID);
|
||||
H5MM_memcpy(sblock->btree_k, udata.btree_k, sizeof(unsigned) * (size_t)H5B_NUM_BTREE_ID);
|
||||
} /* end if */
|
||||
else {
|
||||
/* Get the (default) B-tree internal node values, etc */
|
||||
|
@ -269,7 +269,7 @@ H5F__drvrinfo_prefix_decode(H5O_drvinfo_t *drvrinfo, char *drv_name,
|
||||
|
||||
/* Driver name and/or version */
|
||||
if(drv_name) {
|
||||
HDmemcpy(drv_name, (const char *)image, (size_t)8);
|
||||
H5MM_memcpy(drv_name, (const char *)image, (size_t)8);
|
||||
drv_name[8] = '\0';
|
||||
image += 8; /* advance past name/version */
|
||||
} /* end if */
|
||||
@ -682,7 +682,7 @@ H5F__cache_superblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNU
|
||||
HDassert(sblock->cache_info.flush_me_last);
|
||||
|
||||
/* Encode the common portion of the file superblock for all versions */
|
||||
HDmemcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
|
||||
H5MM_memcpy(image, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
|
||||
image += H5F_SIGNATURE_LEN;
|
||||
*image++ = (uint8_t)sblock->super_vers;
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Gpkg.h" /* Groups */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -206,7 +207,7 @@ H5G_dense_btree2_name_store(void *_nrecord, const void *_udata)
|
||||
|
||||
/* Copy user information info native record */
|
||||
nrecord->hash = udata->common.name_hash;
|
||||
HDmemcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_name_store() */
|
||||
@ -305,7 +306,7 @@ H5G_dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_UN
|
||||
|
||||
/* Encode the record's fields */
|
||||
UINT32ENCODE(raw, nrecord->hash)
|
||||
HDmemcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_name_encode() */
|
||||
@ -333,7 +334,7 @@ H5G_dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_UN
|
||||
|
||||
/* Decode the record's fields */
|
||||
UINT32DECODE(raw, nrecord->hash)
|
||||
HDmemcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_name_decode() */
|
||||
@ -393,7 +394,7 @@ H5G_dense_btree2_corder_store(void *_nrecord, const void *_udata)
|
||||
|
||||
/* Copy user information info native record */
|
||||
nrecord->corder = udata->common.corder;
|
||||
HDmemcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id, udata->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_corder_store() */
|
||||
@ -469,7 +470,7 @@ H5G_dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_
|
||||
|
||||
/* Encode the record's fields */
|
||||
INT64ENCODE(raw, nrecord->corder)
|
||||
HDmemcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_corder_encode() */
|
||||
@ -497,7 +498,7 @@ H5G_dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_
|
||||
|
||||
/* Decode the record's fields */
|
||||
INT64DECODE(raw, nrecord->corder)
|
||||
HDmemcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* H5G_dense_btree2_corder_decode() */
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5Gpkg.h" /* Groups */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
|
||||
@ -287,7 +288,7 @@ H5G__cache_node_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
HDassert(len == sym->node_size);
|
||||
|
||||
/* magic number */
|
||||
HDmemcpy(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* version number */
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "H5FLprivate.h" /* Free Lists */
|
||||
#include "H5Gpkg.h" /* Groups */
|
||||
#include "H5HLprivate.h" /* Local Heaps */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -331,7 +332,7 @@ H5G__ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5_copy_depth_t depth)
|
||||
HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
|
||||
|
||||
/* Copy the top level information */
|
||||
HDmemcpy(dst, src, sizeof(H5G_entry_t));
|
||||
H5MM_memcpy(dst, src, sizeof(H5G_entry_t));
|
||||
|
||||
/* Deep copy the names */
|
||||
if(depth == H5_COPY_DEEP) {
|
||||
|
@ -522,7 +522,7 @@ H5G_name_copy(H5G_name_t *dst, const H5G_name_t *src, H5_copy_depth_t depth)
|
||||
HDassert(depth == H5_COPY_SHALLOW || depth == H5_COPY_DEEP);
|
||||
|
||||
/* Copy the top level information */
|
||||
HDmemcpy(dst, src, sizeof(H5G_name_t));
|
||||
H5MM_memcpy(dst, src, sizeof(H5G_name_t));
|
||||
|
||||
/* Deep copy the names */
|
||||
if(depth == H5_COPY_DEEP) {
|
||||
|
@ -672,7 +672,7 @@ H5G__node_insert(H5F_t *f, haddr_t addr, void H5_ATTR_UNUSED *_lt_key,
|
||||
if(NULL == (snrt = (H5G_node_t *)H5AC_protect(f, H5AC_SNODE, *new_node_p, f, H5AC__NO_FLAGS_SET)))
|
||||
HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, H5B_INS_ERROR, "unable to split symbol table node")
|
||||
|
||||
HDmemcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f),
|
||||
H5MM_memcpy(snrt->entry, sn->entry + H5F_SYM_LEAF_K(f),
|
||||
H5F_SYM_LEAF_K(f) * sizeof(H5G_entry_t));
|
||||
snrt->nsyms = H5F_SYM_LEAF_K(f);
|
||||
snrt_flags |= H5AC__DIRTIED_FLAG;
|
||||
@ -1262,7 +1262,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr,
|
||||
char *link_name; /* Pointer to value of soft link */
|
||||
|
||||
/* Make a temporary copy, so that it will not change the info in the cache */
|
||||
HDmemcpy(&tmp_src_ent, src_ent, sizeof(H5G_entry_t));
|
||||
H5MM_memcpy(&tmp_src_ent, src_ent, sizeof(H5G_entry_t));
|
||||
|
||||
/* Set up group location for soft link to start in */
|
||||
H5G_name_reset(&grp_path);
|
||||
|
@ -555,7 +555,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
|
||||
* Copy the component name into a null-terminated buffer so
|
||||
* we can pass it down to the other symbol table functions.
|
||||
*/
|
||||
HDmemcpy(comp, name, nchars);
|
||||
H5MM_memcpy(comp, name, nchars);
|
||||
comp[nchars] = '\0';
|
||||
|
||||
/*
|
||||
@ -670,7 +670,7 @@ H5G__traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
|
||||
/* Only keep the creation order information from the parent
|
||||
* group's link info
|
||||
*/
|
||||
HDmemcpy(&tmp_linfo, &def_linfo, sizeof(H5O_linfo_t));
|
||||
H5MM_memcpy(&tmp_linfo, &def_linfo, sizeof(H5O_linfo_t));
|
||||
tmp_linfo.track_corder = par_linfo.track_corder;
|
||||
tmp_linfo.index_corder = par_linfo.index_corder;
|
||||
linfo = &tmp_linfo;
|
||||
|
@ -42,6 +42,8 @@
|
||||
#include "H5FOprivate.h" /* File objects */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
@ -104,7 +106,7 @@ H5HF_op_read(const void *obj, size_t obj_len, void *op_data)
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
/* Perform "read", using memcpy() */
|
||||
HDmemcpy(op_data, obj, obj_len);
|
||||
H5MM_memcpy(op_data, obj, obj_len);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5HF_op_read() */
|
||||
@ -129,7 +131,7 @@ H5HF_op_write(const void *obj, size_t obj_len, void *op_data)
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
/* Perform "write", using memcpy() */
|
||||
HDmemcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
|
||||
H5MM_memcpy((void *)obj, op_data, obj_len); /* Casting away const OK -QAK */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5HF_op_write() */
|
||||
|
@ -772,7 +772,7 @@ H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
hdr->f = f;
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1362,7 +1362,7 @@ H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
hdr->f = f;
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -1677,7 +1677,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
|
||||
/* Set up parameters for filter pipeline */
|
||||
nbytes = len;
|
||||
filter_mask = udata->filter_mask;
|
||||
HDmemcpy(read_buf, image, len);
|
||||
H5MM_memcpy(read_buf, image, len);
|
||||
|
||||
/* Push direct block data through I/O filter pipeline */
|
||||
if(H5Z_pipeline(&(hdr->pline), H5Z_FLAG_REVERSE, &filter_mask, H5Z_ENABLE_EDC, filter_cb, &nbytes, &len, &read_buf) < 0)
|
||||
@ -1724,7 +1724,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
/* Copy un-filtered data into block's buffer */
|
||||
HDmemcpy(udata->dblk, read_buf, len);
|
||||
H5MM_memcpy(udata->dblk, read_buf, len);
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
@ -1829,7 +1829,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, NULL, "memory allocation failed for pipeline buffer")
|
||||
|
||||
/* Copy compressed image into buffer */
|
||||
HDmemcpy(read_buf, image, len);
|
||||
H5MM_memcpy(read_buf, image, len);
|
||||
|
||||
/* Push direct block data through I/O filter pipeline */
|
||||
nbytes = len;
|
||||
@ -1841,7 +1841,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
|
||||
HDassert(nbytes == dblock->size);
|
||||
|
||||
/* Copy un-filtered data into block's buffer */
|
||||
HDmemcpy(dblock->blk, read_buf, dblock->size);
|
||||
H5MM_memcpy(dblock->blk, read_buf, dblock->size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
else {
|
||||
@ -1856,7 +1856,7 @@ H5HF__cache_dblock_deserialize(const void *_image, size_t len, void *_udata,
|
||||
|
||||
/* Copy image to dblock->blk */
|
||||
HDassert(dblock->size == len);
|
||||
HDmemcpy(dblock->blk, image, dblock->size);
|
||||
H5MM_memcpy(dblock->blk, image, dblock->size);
|
||||
} /* end else */
|
||||
|
||||
/* Start decoding direct block */
|
||||
@ -2146,7 +2146,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
|
||||
image = dblock->blk;
|
||||
|
||||
/* Magic number */
|
||||
HDmemcpy(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
|
||||
/* Version # */
|
||||
@ -2201,7 +2201,7 @@ H5HF__cache_dblock_pre_serialize(H5F_t *f, void *_thing,
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer")
|
||||
|
||||
/* Copy the direct block's image into the buffer to compress */
|
||||
HDmemcpy(write_buf, dblock->blk, write_size);
|
||||
H5MM_memcpy(write_buf, dblock->blk, write_size);
|
||||
|
||||
/* Push direct block data through I/O filter pipeline */
|
||||
nbytes = write_size;
|
||||
@ -2460,7 +2460,7 @@ H5HF__cache_dblock_serialize(const H5F_t *f, void *image, size_t len,
|
||||
HDassert(dblock->write_size == len);
|
||||
|
||||
/* Copy the image from *(dblock->write_buf) to *image */
|
||||
HDmemcpy(image, dblock->write_buf, dblock->write_size);
|
||||
H5MM_memcpy(image, dblock->write_buf, dblock->write_size);
|
||||
|
||||
/* Free *(dblock->write_buf) if it was allocated by the
|
||||
* pre-serialize function
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5VMprivate.h" /* Vectors and arrays */
|
||||
|
||||
/****************/
|
||||
@ -387,7 +388,7 @@ H5HF_hdr_create(H5F_t *f, const H5HF_create_t *cparam)
|
||||
/* Set the creation parameters for the heap */
|
||||
hdr->max_man_size = cparam->max_man_size;
|
||||
hdr->checksum_dblocks = cparam->checksum_dblocks;
|
||||
HDmemcpy(&(hdr->man_dtable.cparam), &(cparam->managed), sizeof(H5HF_dtable_cparam_t));
|
||||
H5MM_memcpy(&(hdr->man_dtable.cparam), &(cparam->managed), sizeof(H5HF_dtable_cparam_t));
|
||||
|
||||
/* Set root table address to indicate that the heap is empty currently */
|
||||
hdr->man_dtable.table_addr = HADDR_UNDEF;
|
||||
|
@ -355,7 +355,7 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
|
||||
write_size = obj_size;
|
||||
if(NULL == (write_buf = H5MM_malloc(write_size)))
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "memory allocation failed for pipeline buffer")
|
||||
HDmemcpy(write_buf, obj, write_size);
|
||||
H5MM_memcpy(write_buf, obj, write_size);
|
||||
|
||||
/* Push direct block data through I/O filter pipeline */
|
||||
nbytes = write_size;
|
||||
@ -794,7 +794,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read,
|
||||
/* Copy object to user's buffer if there's filters on heap data */
|
||||
/* (if there's no filters, the object was read directly into the user's buffer) */
|
||||
if(hdr->filter_len > 0)
|
||||
HDmemcpy(op_data, read_buf, (size_t)obj_size);
|
||||
H5MM_memcpy(op_data, read_buf, (size_t)obj_size);
|
||||
} /* end if */
|
||||
else {
|
||||
/* Call the user's 'op' callback */
|
||||
|
@ -183,7 +183,7 @@ H5HF__man_insert(H5HF_hdr_t *hdr, size_t obj_size, const void *obj, void *_id)
|
||||
p = dblock->blk + blk_off;
|
||||
|
||||
/* Copy the object's data into the heap */
|
||||
HDmemcpy(p, obj, obj_size);
|
||||
H5MM_memcpy(p, obj, obj_size);
|
||||
p += obj_size;
|
||||
|
||||
/* Sanity check */
|
||||
|
@ -3082,7 +3082,7 @@ H5HF__sect_indirect_reduce_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect,
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for row section pointer array")
|
||||
|
||||
/* Transfer row sections between current & peer sections */
|
||||
HDmemcpy(&peer_sect->u.indirect.dir_rows[0],
|
||||
H5MM_memcpy(&peer_sect->u.indirect.dir_rows[0],
|
||||
§->u.indirect.dir_rows[0],
|
||||
(sizeof(H5HF_free_section_t *) * peer_dir_nrows));
|
||||
HDmemmove(§->u.indirect.dir_rows[0],
|
||||
@ -3321,7 +3321,7 @@ H5HF__sect_indirect_reduce(H5HF_hdr_t *hdr, H5HF_free_section_t *sect,
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, FAIL, "allocation failed for indirect section pointer array")
|
||||
|
||||
/* Transfer child indirect sections between current & peer sections */
|
||||
HDmemcpy(&peer_sect->u.indirect.indir_ents[0],
|
||||
H5MM_memcpy(&peer_sect->u.indirect.indir_ents[0],
|
||||
§->u.indirect.indir_ents[sect->u.indirect.indir_nents - peer_nentries],
|
||||
(sizeof(H5HF_free_section_t *) * peer_nentries));
|
||||
sect->u.indirect.indir_nents -= (peer_nentries + 1); /* Transferred blocks, plus child entry */
|
||||
@ -3636,7 +3636,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1,
|
||||
sect1->u.indirect.dir_rows = new_dir_rows;
|
||||
|
||||
/* Transfer the second section's rows to first section */
|
||||
HDmemcpy(§1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows],
|
||||
H5MM_memcpy(§1->u.indirect.dir_rows[sect1->u.indirect.dir_nrows],
|
||||
§2->u.indirect.dir_rows[src_row2],
|
||||
(sizeof(H5HF_free_section_t *) * nrows_moved2));
|
||||
|
||||
@ -3682,7 +3682,7 @@ H5HF__sect_indirect_merge_row(H5HF_hdr_t *hdr, H5HF_free_section_t *row_sect1,
|
||||
sect1->u.indirect.indir_ents = new_indir_ents;
|
||||
|
||||
/* Transfer the second section's entries to first section */
|
||||
HDmemcpy(§1->u.indirect.indir_ents[sect1->u.indirect.indir_nents],
|
||||
H5MM_memcpy(§1->u.indirect.indir_ents[sect1->u.indirect.indir_nents],
|
||||
§2->u.indirect.indir_ents[0],
|
||||
(sizeof(H5HF_free_section_t *) * sect2->u.indirect.indir_nents));
|
||||
} /* end else */
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
/* Local Macros */
|
||||
@ -100,7 +102,7 @@ H5HF_get_cparam_test(const H5HF_t *fh, H5HF_create_t *cparam)
|
||||
else
|
||||
H5_CHECKED_ASSIGN(cparam->id_len, uint16_t, fh->hdr->id_len, unsigned);
|
||||
cparam->max_man_size = fh->hdr->max_man_size;
|
||||
HDmemcpy(&(cparam->managed), &(fh->hdr->man_dtable.cparam), sizeof(H5HF_dtable_cparam_t));
|
||||
H5MM_memcpy(&(cparam->managed), &(fh->hdr->man_dtable.cparam), sizeof(H5HF_dtable_cparam_t));
|
||||
H5O_msg_copy(H5O_PLINE_ID, &(fh->hdr->pline), &(cparam->pline));
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
|
||||
|
||||
/****************/
|
||||
@ -176,7 +177,7 @@ HDfprintf(stderr, "%s: obj_size = %Zu\n", FUNC, obj_size);
|
||||
*id++ = enc_obj_size & H5HF_TINY_MASK_EXT_2;
|
||||
} /* end else */
|
||||
|
||||
HDmemcpy(id, obj, obj_size);
|
||||
H5MM_memcpy(id, obj, obj_size);
|
||||
HDmemset(id + obj_size, 0, (hdr->id_len - ((size_t)1 + (size_t)hdr->tiny_len_extended + obj_size)));
|
||||
|
||||
/* Update statistics about heap */
|
||||
|
@ -168,7 +168,7 @@ H5HG__create(H5F_t *f, size_t size)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed")
|
||||
|
||||
/* Initialize the header */
|
||||
HDmemcpy(heap->chunk, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(heap->chunk, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
p = heap->chunk + H5_SIZEOF_MAGIC;
|
||||
*p++ = H5HG_VERSION;
|
||||
*p++ = 0; /*reserved*/
|
||||
@ -553,7 +553,7 @@ H5HG_insert(H5F_t *f, size_t size, void *obj, H5HG_t *hobj/*out*/)
|
||||
|
||||
/* Copy data into the heap */
|
||||
if(size > 0) {
|
||||
HDmemcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size);
|
||||
H5MM_memcpy(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f), obj, size);
|
||||
#ifdef OLD_WAY
|
||||
/* Don't bother zeroing out the rest of the info in the heap -QAK */
|
||||
HDmemset(heap->obj[idx].begin + H5HG_SIZEOF_OBJHDR(f) + size, 0,
|
||||
@ -618,7 +618,7 @@ H5HG_read(H5F_t *f, H5HG_t *hobj, void *object/*out*/, size_t *buf_size)
|
||||
/* Allocate a buffer for the object read in, if the user didn't give one */
|
||||
if(!object && NULL == (object = H5MM_malloc(size)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
HDmemcpy(object, p, size);
|
||||
H5MM_memcpy(object, p, size);
|
||||
|
||||
/*
|
||||
* Advance the heap in the CWFS list. We might have done this already
|
||||
|
@ -271,7 +271,7 @@ H5HG__cache_heap_deserialize(const void *_image, size_t len, void *_udata,
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Copy the image buffer into the newly allocate chunk */
|
||||
HDmemcpy(heap->chunk, _image, len);
|
||||
H5MM_memcpy(heap->chunk, _image, len);
|
||||
|
||||
/* Deserialize the heap's header */
|
||||
if(H5HG__hdr_deserialize(heap, (const uint8_t *)heap->chunk, f) < 0)
|
||||
@ -448,7 +448,7 @@ H5HG__cache_heap_serialize(const H5F_t *f, void *image, size_t len,
|
||||
HDassert(heap->chunk);
|
||||
|
||||
/* copy the image into the buffer */
|
||||
HDmemcpy(image, heap->chunk, len);
|
||||
H5MM_memcpy(image, heap->chunk, len);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5HG__cache_heap_serialize() */
|
||||
|
@ -725,7 +725,7 @@ H5HL_insert(H5F_t *f, H5HL_t *heap, size_t buf_size, const void *buf))
|
||||
} /* end if */
|
||||
|
||||
/* Copy the data into the heap */
|
||||
HDmemcpy(heap->dblk_image + offset, buf, buf_size);
|
||||
H5MM_memcpy(heap->dblk_image + offset, buf, buf_size);
|
||||
|
||||
/* Set return value */
|
||||
ret_value = offset;
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5HLpkg.h" /* Local Heaps */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
|
||||
@ -464,7 +465,7 @@ H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata,
|
||||
image = ((const uint8_t *)_image) + heap->prfx_size;
|
||||
|
||||
/* Copy the heap data from the speculative read buffer */
|
||||
HDmemcpy(heap->dblk_image, image, heap->dblk_size);
|
||||
H5MM_memcpy(heap->dblk_image, image, heap->dblk_size);
|
||||
|
||||
/* Build free list */
|
||||
if(H5HL__fl_deserialize(heap) < 0)
|
||||
@ -587,7 +588,7 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
heap->free_block = heap->freelist ? heap->freelist->offset : H5HL_FREE_NULL;
|
||||
|
||||
/* Serialize the heap prefix */
|
||||
HDmemcpy(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(image, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
image += H5_SIZEOF_MAGIC;
|
||||
*image++ = H5HL_VERSION;
|
||||
*image++ = 0; /*reserved*/
|
||||
@ -615,7 +616,7 @@ H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len,
|
||||
H5HL__fl_serialize(heap);
|
||||
|
||||
/* Copy the heap data block into the cache image */
|
||||
HDmemcpy(image, heap->dblk_image, heap->dblk_size);
|
||||
H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
|
||||
|
||||
/* Sanity check */
|
||||
HDassert((size_t)(image - (uint8_t *)_image) + heap->dblk_size == len);
|
||||
@ -756,7 +757,7 @@ H5HL__cache_datablock_deserialize(const void *image, size_t len, void *_udata,
|
||||
HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "can't allocate data block image buffer");
|
||||
|
||||
/* copy the datablock from the read buffer */
|
||||
HDmemcpy(heap->dblk_image, image, len);
|
||||
H5MM_memcpy(heap->dblk_image, image, len);
|
||||
|
||||
/* Build free list */
|
||||
if(FAIL == H5HL__fl_deserialize(heap))
|
||||
@ -851,7 +852,7 @@ H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len,
|
||||
H5HL__fl_serialize(heap);
|
||||
|
||||
/* Copy the heap's data block into the cache's image */
|
||||
HDmemcpy(image, heap->dblk_image, heap->dblk_size);
|
||||
H5MM_memcpy(image, heap->dblk_image, heap->dblk_size);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5HL__cache_datablock_serialize() */
|
||||
|
@ -355,6 +355,9 @@ H5Itype_exists(H5I_type_t type)
|
||||
FUNC_ENTER_API(FAIL)
|
||||
H5TRACE1("t", "It", type);
|
||||
|
||||
if(H5I_IS_LIB_TYPE(type))
|
||||
HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, FAIL, "cannot call public function on library type")
|
||||
|
||||
if (type <= H5I_BADID || type >= H5I_next_type)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid type number")
|
||||
|
||||
|
@ -1676,7 +1676,7 @@ H5L_register(const H5L_class_t *cls)
|
||||
} /* end if */
|
||||
|
||||
/* Copy link class info into table */
|
||||
HDmemcpy(H5L_table_g + i, cls, sizeof(H5L_class_t));
|
||||
H5MM_memcpy(H5L_table_g + i, cls, sizeof(H5L_class_t));
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
@ -2217,7 +2217,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name,
|
||||
/* Fill in UD link-specific information in the link struct*/
|
||||
if(ud_data_size > 0) {
|
||||
lnk.u.ud.udata = H5MM_malloc((size_t)ud_data_size);
|
||||
HDmemcpy(lnk.u.ud.udata, ud_data, (size_t) ud_data_size);
|
||||
H5MM_memcpy(lnk.u.ud.udata, ud_data, (size_t) ud_data_size);
|
||||
} /* end if */
|
||||
else
|
||||
lnk.u.ud.udata = NULL;
|
||||
|
@ -306,7 +306,7 @@ H5L__extern_query(const char H5_ATTR_UNUSED * link_name, const void *_udata, siz
|
||||
buf_size = udata_size;
|
||||
|
||||
/* Copy the udata verbatim up to buf_size */
|
||||
HDmemcpy(buf, udata, buf_size);
|
||||
H5MM_memcpy(buf, udata, buf_size);
|
||||
} /* end if */
|
||||
|
||||
/* Set return value */
|
||||
|
48
src/H5MM.c
48
src/H5MM.c
@ -274,7 +274,7 @@ H5MM_malloc(size_t size)
|
||||
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
|
||||
/* Initialize block list head singleton */
|
||||
if(!H5MM_init_s) {
|
||||
HDmemcpy(H5MM_block_head_s.sig, H5MM_block_signature_s, H5MM_SIG_SIZE);
|
||||
H5MM_memcpy(H5MM_block_head_s.sig, H5MM_block_signature_s, H5MM_SIG_SIZE);
|
||||
H5MM_block_head_s.next = &H5MM_block_head_s;
|
||||
H5MM_block_head_s.prev = &H5MM_block_head_s;
|
||||
H5MM_block_head_s.u.info.size = SIZET_MAX;
|
||||
@ -291,15 +291,15 @@ H5MM_malloc(size_t size)
|
||||
|
||||
if(NULL != (block = (H5MM_block_t *)HDmalloc(alloc_size))) {
|
||||
/* Set up block */
|
||||
HDmemcpy(block->sig, H5MM_block_signature_s, H5MM_SIG_SIZE);
|
||||
H5MM_memcpy(block->sig, H5MM_block_signature_s, H5MM_SIG_SIZE);
|
||||
block->next = H5MM_block_head_s.next;
|
||||
H5MM_block_head_s.next = block;
|
||||
block->next->prev = block;
|
||||
block->prev = &H5MM_block_head_s;
|
||||
block->u.info.size = size;
|
||||
block->u.info.in_use = TRUE;
|
||||
HDmemcpy(block->b, H5MM_block_head_guard_s, H5MM_HEAD_GUARD_SIZE);
|
||||
HDmemcpy(block->b + H5MM_HEAD_GUARD_SIZE + size, H5MM_block_tail_guard_s, H5MM_TAIL_GUARD_SIZE);
|
||||
H5MM_memcpy(block->b, H5MM_block_head_guard_s, H5MM_HEAD_GUARD_SIZE);
|
||||
H5MM_memcpy(block->b + H5MM_HEAD_GUARD_SIZE + size, H5MM_block_tail_guard_s, H5MM_TAIL_GUARD_SIZE);
|
||||
|
||||
/* Update statistics */
|
||||
H5MM_total_alloc_bytes_s += size;
|
||||
@ -417,7 +417,7 @@ H5MM_realloc(void *mem, size_t size)
|
||||
H5MM__sanity_check(mem);
|
||||
|
||||
ret_value = H5MM_malloc(size);
|
||||
HDmemcpy(ret_value, mem, MIN(size, old_size));
|
||||
H5MM_memcpy(ret_value, mem, MIN(size, old_size));
|
||||
H5MM_xfree(mem);
|
||||
} /* end if */
|
||||
else
|
||||
@ -564,3 +564,41 @@ H5MM_xfree(void *mem)
|
||||
FUNC_LEAVE_NOAPI(NULL)
|
||||
} /* end H5MM_xfree() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5MM_memcpy
|
||||
*
|
||||
* Purpose: Like memcpy(3) but with sanity checks on the parameters,
|
||||
* particularly buffer overlap.
|
||||
*
|
||||
* Return: Success: pointer to dest
|
||||
* Failure: NULL
|
||||
*
|
||||
* Programmer: Dana Robinson
|
||||
* Spring 2019
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void *
|
||||
H5MM_memcpy(void *dest, const void *src, size_t n)
|
||||
{
|
||||
void *ret = NULL;
|
||||
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
HDassert(dest);
|
||||
HDassert(src);
|
||||
#if 0
|
||||
/* Commented out while we investigate overlapping buffers in the
|
||||
* parallel filter code (HDFFV-10735).
|
||||
*/
|
||||
HDassert((char *)dest >= (const char *)src + n || (const char *)src >= (char *)dest + n);
|
||||
#endif
|
||||
|
||||
ret = HDmemcpy(dest, src, n);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret)
|
||||
|
||||
} /* end H5MM_memcpy() */
|
||||
|
||||
|
@ -45,6 +45,7 @@ H5_DLL void *H5MM_realloc(void *mem, size_t size);
|
||||
H5_DLL char *H5MM_xstrdup(const char *s);
|
||||
H5_DLL char *H5MM_strdup(const char *s);
|
||||
H5_DLL void *H5MM_xfree(void *mem);
|
||||
H5_DLL void *H5MM_memcpy(void *dest, const void *src, size_t n);
|
||||
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
|
||||
H5_DLL void H5MM_sanity_check_all(void);
|
||||
H5_DLL void H5MM_final_sanity_check(void);
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FLprivate.h" /* Free lists */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5Opkg.h" /* Object headers */
|
||||
|
||||
/****************/
|
||||
@ -949,7 +950,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
|
||||
* # at the beginning of the chunk image.
|
||||
*/
|
||||
if(oh->version > H5O_VERSION_1) {
|
||||
HDmemcpy(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
H5MM_memcpy(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC);
|
||||
p += H5_SIZEOF_MAGIC;
|
||||
} /* end if */
|
||||
|
||||
@ -988,7 +989,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
|
||||
HDassert(curr_msg->type->id != H5O_CONT_ID);
|
||||
|
||||
/* Copy the raw data */
|
||||
HDmemcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
|
||||
H5MM_memcpy(p, curr_msg->raw - (size_t)H5O_SIZEOF_MSGHDR_OH(oh),
|
||||
curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
|
||||
|
||||
/* Update the message info */
|
||||
@ -1044,7 +1045,7 @@ H5O__alloc_chunk(H5F_t *f, H5O_t *oh, size_t size, size_t found_null,
|
||||
null_msg->chunkno = oh->mesg[found_msg->msgno].chunkno;
|
||||
|
||||
/* Copy the message to move (& its prefix) to its new location */
|
||||
HDmemcpy(p, oh->mesg[found_msg->msgno].raw - H5O_SIZEOF_MSGHDR_OH(oh),
|
||||
H5MM_memcpy(p, oh->mesg[found_msg->msgno].raw - H5O_SIZEOF_MSGHDR_OH(oh),
|
||||
oh->mesg[found_msg->msgno].raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
|
||||
|
||||
/* Switch moved message to point to new location */
|
||||
@ -1519,7 +1520,7 @@ H5O__move_cont(H5F_t *f, H5O_t *oh, unsigned cont_u)
|
||||
move_size = curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh);
|
||||
|
||||
/* Move message out of deleted chunk */
|
||||
HDmemcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
|
||||
H5MM_memcpy(move_start, curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), move_size);
|
||||
curr_msg->raw = move_start + H5O_SIZEOF_MSGHDR_OH(oh);
|
||||
curr_msg->chunkno = cont_chunkno;
|
||||
chk_dirtied = TRUE;
|
||||
@ -1791,7 +1792,7 @@ H5O__move_msgs_forward(H5F_t *f, H5O_t *oh)
|
||||
} /* end if */
|
||||
|
||||
/* Copy raw data for non-null message to new chunk */
|
||||
HDmemcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
|
||||
H5MM_memcpy(null_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw - H5O_SIZEOF_MSGHDR_OH(oh), curr_msg->raw_size + (size_t)H5O_SIZEOF_MSGHDR_OH(oh));
|
||||
|
||||
/* Point non-null message at null message's space */
|
||||
curr_msg->chunkno = null_msg->chunkno;
|
||||
|
@ -208,7 +208,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
|
||||
HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace")
|
||||
|
||||
/* Copy the extent information to the dataspace */
|
||||
HDmemcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t));
|
||||
H5MM_memcpy(&(attr->shared->ds->extent), extent, sizeof(H5S_extent_t));
|
||||
|
||||
/* Release temporary extent information */
|
||||
extent = H5FL_FREE(H5S_extent_t, extent);
|
||||
@ -240,7 +240,7 @@ H5O_attr_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags,
|
||||
if(attr->shared->data_size) {
|
||||
if(NULL == (attr->shared->data = H5FL_BLK_MALLOC(attr_buf, attr->shared->data_size)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
HDmemcpy(attr->shared->data, p, attr->shared->data_size);
|
||||
H5MM_memcpy(attr->shared->data, p, attr->shared->data_size);
|
||||
} /* end if */
|
||||
|
||||
/* Increment the reference count for this object header message in cache(compact
|
||||
@ -336,7 +336,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
|
||||
*p++ = attr->shared->encoding;
|
||||
|
||||
/* Write the name including null terminator */
|
||||
HDmemcpy(p, attr->shared->name, name_len);
|
||||
H5MM_memcpy(p, attr->shared->name, name_len);
|
||||
if(attr->shared->version < H5O_ATTR_VERSION_2) {
|
||||
/* Pad to the correct number of bytes */
|
||||
HDmemset(p + name_len, 0, H5O_ALIGN_OLD(name_len) - name_len);
|
||||
@ -369,7 +369,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
|
||||
|
||||
/* Store attribute data. If there's no data, store 0 as fill value. */
|
||||
if(attr->shared->data)
|
||||
HDmemcpy(p, attr->shared->data, attr->shared->data_size);
|
||||
H5MM_memcpy(p, attr->shared->data, attr->shared->data_size);
|
||||
else
|
||||
HDmemset(p, 0, attr->shared->data_size);
|
||||
|
||||
|
@ -862,7 +862,7 @@ H5O__attr_write_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/,
|
||||
|
||||
/* (Needs to occur before updating the shared message, or the hash
|
||||
* value on the old & new messages will be the same) */
|
||||
HDmemcpy(((H5A_t *)mesg->native)->shared->data, udata->attr->shared->data, udata->attr->shared->data_size);
|
||||
H5MM_memcpy(((H5A_t *)mesg->native)->shared->data, udata->attr->shared->data, udata->attr->shared->data_size);
|
||||
} /* end if */
|
||||
|
||||
/* Mark the message as modified */
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5FLprivate.h" /* Free lists */
|
||||
#include "H5MFprivate.h" /* File memory management */
|
||||
#include "H5MMprivate.h" /* Memory management */
|
||||
#include "H5Opkg.h" /* Object headers */
|
||||
#include "H5WBprivate.h" /* Wrapped Buffers */
|
||||
|
||||
@ -542,7 +543,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
|
||||
* Can we rework things so that the object header and the cache
|
||||
* share a buffer?
|
||||
*/
|
||||
HDmemcpy(image, oh->chunk[0].image, len);
|
||||
H5MM_memcpy(image, oh->chunk[0].image, len);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
@ -900,7 +901,7 @@ H5O__cache_chk_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
|
||||
/* copy the chunk into the image -- this is potentially expensive.
|
||||
* Can we rework things so that the chunk and the cache share a buffer?
|
||||
*/
|
||||
HDmemcpy(image, chk_proxy->oh->chunk[chk_proxy->chunkno].image, len);
|
||||
H5MM_memcpy(image, chk_proxy->oh->chunk[chk_proxy->chunkno].image, len);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
@ -1352,7 +1353,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image
|
||||
oh->chunk[chunkno].chunk_proxy = NULL;
|
||||
|
||||
/* Copy disk image into chunk's image */
|
||||
HDmemcpy(oh->chunk[chunkno].image, image, oh->chunk[chunkno].size);
|
||||
H5MM_memcpy(oh->chunk[chunkno].image, image, oh->chunk[chunkno].size);
|
||||
|
||||
/* Point into chunk image to decode */
|
||||
chunk_image = oh->chunk[chunkno].image;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user