summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
commit7c742a851847997f5e931f3d448b368c3179de32 (patch)
tree8908e35a0110298e3fc3e29120481e05798d5500
parent43ce4b5e6e5eb4e848bf1726252f1ca17212e545 (diff)
downloadhdf5-7c742a851847997f5e931f3d448b368c3179de32.zip
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.gz
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.bz2
Add clang-format changes from develop.
-rw-r--r--.clang-format62
-rw-r--r--.github/CODEOWNERS42
-rw-r--r--.github/workflows/clang-format-check.yml16
-rw-r--r--.github/workflows/main.yml62
-rw-r--r--.github/workflows/pr-check.yml134
-rw-r--r--CMakeLists.txt3
-rw-r--r--MANIFEST7
-rwxr-xr-xbin/format_source6
-rwxr-xr-xbin/format_source_patch14
-rw-r--r--c++/examples/CMakeLists.txt14
-rw-r--r--c++/src/CMakeLists.txt11
-rw-r--r--c++/test/CMakeLists.txt9
-rw-r--r--config/sanitizer/formatting.cmake144
-rw-r--r--config/sanitizer/tools.cmake11
-rw-r--r--examples/CMakeLists.txt14
-rw-r--r--examples/h5_dtransform.c52
-rw-r--r--fortran/src/CMakeLists.txt23
-rw-r--r--fortran/src/H5Pf.c92
-rw-r--r--fortran/test/CMakeLists.txt15
-rw-r--r--hl/CMakeLists.txt6
-rw-r--r--hl/c++/examples/CMakeLists.txt7
-rw-r--r--hl/c++/src/CMakeLists.txt13
-rw-r--r--hl/c++/test/CMakeLists.txt7
-rw-r--r--hl/examples/CMakeLists.txt7
-rw-r--r--hl/examples/pal_rgb.h515
-rw-r--r--hl/fortran/src/CMakeLists.txt15
-rw-r--r--hl/src/CMakeLists.txt19
-rw-r--r--hl/src/H5LT.c277
-rw-r--r--hl/test/CMakeLists.txt28
-rw-r--r--hl/test/pal_rgb.h521
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt29
-rw-r--r--hl/tools/h5watch/CMakeLists.txt32
-rw-r--r--java/src/jni/CMakeLists.txt8
-rw-r--r--java/src/jni/h5Constants.c12
-rw-r--r--release_docs/RELEASE.txt10
-rw-r--r--src/CMakeLists.txt68
-rw-r--r--src/H5ACprivate.h126
-rw-r--r--src/H5C.c1904
-rw-r--r--src/H5Cpkg.h1796
-rw-r--r--src/H5Cprivate.h1830
-rw-r--r--src/H5FDfamily.c542
-rw-r--r--src/H5FDmulti.c1167
-rw-r--r--src/H5FDprivate.h24
-rw-r--r--src/H5FSsection.c2
-rw-r--r--src/H5Fprivate.h8
-rw-r--r--src/H5Gpkg.h2
-rw-r--r--src/H5Gprivate.h4
-rw-r--r--src/H5Lprivate.h19
-rw-r--r--src/H5Lpublic.h16
-rw-r--r--src/H5MF.c6
-rw-r--r--src/H5MFpkg.h13
-rw-r--r--src/H5Oattribute.c2
-rw-r--r--src/H5Odeprec.c2
-rw-r--r--src/H5Omtime.c6
-rw-r--r--src/H5Opline.c4
-rw-r--r--src/H5PLint.c18
-rw-r--r--src/H5PLplugin_cache.c14
-rw-r--r--src/H5Pdapl.c2
-rw-r--r--src/H5Pencdec.c2
-rw-r--r--src/H5Tcompound.c4
-rw-r--r--src/H5Tconv.c3786
-rw-r--r--src/H5Tenum.c10
-rw-r--r--src/H5Tnative.c76
-rw-r--r--src/H5VMprivate.h88
-rw-r--r--src/H5private.h2
-rw-r--r--src/H5public.h45
-rw-r--r--src/H5system.c38
-rw-r--r--test/CMakeLists.txt159
-rw-r--r--test/CMakeTests.cmake7
-rw-r--r--test/big.c208
-rw-r--r--test/cache.c26
-rw-r--r--test/error_test.c4
-rw-r--r--test/fheap.c2418
-rw-r--r--test/file_image.c72
-rw-r--r--test/h5test.c10
-rw-r--r--test/ntypes.c401
-rw-r--r--test/tvlstr.c4
-rw-r--r--test/vfd.c14
-rw-r--r--testpar/CMakeLists.txt18
-rw-r--r--testpar/testphdf5.h5
-rw-r--r--tools/lib/CMakeLists.txt13
-rw-r--r--tools/libtest/CMakeLists.txt7
-rw-r--r--tools/src/h5copy/CMakeLists.txt11
-rw-r--r--tools/src/h5diff/CMakeLists.txt13
-rw-r--r--tools/src/h5dump/CMakeLists.txt21
-rw-r--r--tools/src/h5format_convert/CMakeLists.txt11
-rw-r--r--tools/src/h5import/CMakeLists.txt15
-rw-r--r--tools/src/h5jam/CMakeLists.txt13
-rw-r--r--tools/src/h5ls/CMakeLists.txt11
-rw-r--r--tools/src/h5repack/CMakeLists.txt12
-rw-r--r--tools/src/h5stat/CMakeLists.txt11
-rw-r--r--tools/src/misc/CMakeLists.txt17
-rw-r--r--tools/test/h5copy/CMakeLists.txt15
-rw-r--r--tools/test/h5diff/CMakeLists.txt14
-rw-r--r--tools/test/h5dump/CMakeLists.txt14
-rw-r--r--tools/test/h5format_convert/CMakeLists.txt14
-rw-r--r--tools/test/h5import/CMakeLists.txt7
-rw-r--r--tools/test/h5jam/CMakeLists.txt15
-rw-r--r--tools/test/h5ls/CMakeLists.txt8
-rw-r--r--tools/test/h5repack/CMakeLists.txt16
-rw-r--r--tools/test/h5stat/CMakeLists.txt7
-rw-r--r--tools/test/misc/CMakeLists.txt28
-rw-r--r--tools/test/misc/vds/CMakeLists.txt11
-rw-r--r--tools/test/perform/CMakeLists.txt109
-rw-r--r--tools/test/perform/sio_engine.c4
-rw-r--r--utils/mirror_vfd/CMakeLists.txt18
106 files changed, 9556 insertions, 8088 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..36f326d
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,62 @@
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AlignConsecutiveMacros: true
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+AlwaysBreakAfterReturnType: AllDefinitions
+BraceWrapping:
+ AfterFunction: true
+ BeforeCatch: true
+ BeforeElse: true
+BreakBeforeBraces: Stroustrup
+BreakAfterJavaFieldAnnotations: true
+BreakStringLiterals: true
+ColumnLimit: 110
+IncludeCategories:
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ Priority: 3
+ SortPriority: 0
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
+ Priority: 4
+ SortPriority: 0
+ - Regex: '.*'
+ Priority: 0
+ SortPriority: 0
+ - Regex: '^H5*.*'
+ Priority: 1
+ SortPriority: 0
+ - Regex: 'private.*'
+ Priority: 2
+ SortPriority: 0
+IncludeIsMainRegex: '(public)?$'
+IndentCaseLabels: true
+IndentGotoLabels: false
+IndentWidth: 4
+ObjCBlockIndentWidth: 4
+ReflowComments: true
+SortIncludes: false
+StatementMacros:
+ - FUNC_ENTER_API
+ - FUNC_LEAVE_API
+ - FUNC_ENTER_NOAPI_NOINIT_NOERR
+ - FUNC_LEAVE_NOAPI
+ - H5_BEGIN_TAG
+ - HGOTO_DONE_TAG
+ - H5_END_TAG
+ - HSYS_DONE_ERROR
+ - HSYS_GOTO_ERROR
+ - HDONE_ERROR
+ - HERROR
+ - H5_LEAVE
+ - H5E_PRINTF
+ - H5E_THROW
+ - HGOTO_DONE
+ - HGOTO_ERROR
+ - HMPI_ERROR
+ - HMPI_DONE_ERROR
+ - HMPI_GOTO_ERROR
+ - H5_GCC_DIAG_OFF
+ - H5_GCC_DIAG_ON
+...
+
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..31b194f
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,42 @@
+# Lines starting with '#' are comments.
+# Each line is a file pattern followed by one or more owners.
+
+# These owners will be the default owners for everything in the repo.
+* @lrknox
+
+# Order is important. The last matching pattern has the most precedence.
+# So if a pull request only touches javascript files, only these owners
+# will be requested to review.
+*.cmake @byrnHDF
+CMakeLists.txt @byrnHDF
+CMakeTests.* @byrnHDF
+
+/bin/ @lrknox @derobins @byrnHDF
+
+/c++/ bmribler@hdfgroup.org
+
+/config/ @lrknox @derobins @byrnHDF
+
+/doc/ @gnuoyd mainzer@hdfgroup.org
+
+/examples/ @lrknox @derobins bljones@hdfgroup.org
+
+/fortran/ @brtnfld @epourmal
+
+/hl/ bmribler@hdfgroup.org
+
+/java/ @jhendersonHDF @byrnHDF
+
+/m4/ @lrknox @derobins
+
+/release_docs/ @lrknox bljones@hdfgroup.org @byrnHDF
+
+/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup mainzer@hdfgroup.org
+
+/test/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup mainzer@hdfgroup.org
+
+/testpar/ @jhendersonHDF @rawarren mainzer@hdfgroup.org
+
+/tools/ @byrnHDF
+
+/utils/ @lrknox @byrnHDF
diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml
new file mode 100644
index 0000000..5b5222b
--- /dev/null
+++ b/.github/workflows/clang-format-check.yml
@@ -0,0 +1,16 @@
+name: clang-format Check
+on: [push, pull_request]
+jobs:
+ formatting-check:
+ name: Formatting Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Run clang-format style check for C programs.
+ uses: DoozyX/clang-format-lint-action@v0.8
+ with:
+ source: '.'
+ extensions: 'c,h,cpp'
+ clangFormatVersion: 10
+ style: file
+ exclude: './config ./hl/src/H5LTanalyze.c'
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 60e21c7..355e2e6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,8 +4,6 @@ name: hdf5 dev CI
on:
push:
branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
- pull_request:
- branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -14,7 +12,7 @@ jobs:
strategy:
# fail-fast: false
matrix:
- name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "macOS Latest Clang"]
+ name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
@@ -27,16 +25,47 @@ jobs:
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
+ cpp: ON
fortran: OFF
+ parallel: OFF
toolchain: "config/toolchain/GCC.cmake"
generator: "-G Ninja"
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-latest
build_type: "Release"
+ cpp: ON
fortran: OFF
+ parallel: OFF
toolchain: "config/toolchain/clang.cmake"
generator: "-G Ninja"
+ - name: "Ubuntu Debug GCC"
+ artifact: "LinuxDBG.tar.xz"
+ os: ubuntu-latest
+ build_type: "Debug"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Autotools GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: enable
+ fortran: enable
+ parallel: disable
+ toolchain: ""
+ generator: "autogen"
+# - name: "Ubuntu Parallel GCC"
+# artifact: "LinuxPar.tar.xz"
+# os: ubuntu-latest
+# build_type: "Release"
+# cpp: OFF
+# fortran: OFF
+# parallel: ON
+# toolchain: "config/toolchain/GCC.cmake"
+# generator: "-G Ninja"
name: ${{ matrix.name }}
# The type of runner that the job will run on
@@ -47,6 +76,9 @@ jobs:
- name: Install Dependencies (Linux)
run: sudo apt-get install ninja-build
if: matrix.os == 'ubuntu-latest'
+ - name: Install Autotools Dependencies (Linux)
+ run: sudo apt-get install automake autoconf libtool libtool-bin
+ if: matrix.generator == 'autogen'
- name: Install Dependencies (Windows)
run: choco install ninja
if: matrix.os == 'windows-latest'
@@ -64,17 +96,39 @@ jobs:
- name: Get Sources
uses: actions/checkout@v2
+ - name: Autotools Configure
+ if: matrix.generator == 'autogen'
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
+ shell: bash
+
- name: Configure
+ if: matrix.generator != 'autogen'
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
- cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
+ cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
shell: bash
+ - name: Autotools Build
+ if: matrix.generator == 'autogen'
+ run: make
+ working-directory: ${{ runner.workspace }}/build
+
- name: Build
+ if: matrix.generator != 'autogen'
run: cmake --build . --config ${{ matrix.build_type }}
working-directory: ${{ runner.workspace }}/build
+ - name: Autotools Test
+ if: matrix.generator == 'autogen'
+ run: make check
+ working-directory: ${{ runner.workspace }}/build
+
- name: Test
+ if: matrix.generator != 'autogen'
run: ctest --build . -C ${{ matrix.build_type }} -V
working-directory: ${{ runner.workspace }}/build
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
new file mode 100644
index 0000000..e3b9d9b
--- /dev/null
+++ b/.github/workflows/pr-check.yml
@@ -0,0 +1,134 @@
+name: hdf5 dev CI
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ pull_request:
+ branches: [ develop, hdf5_1_12, hdf5_1_10, hdf5_1_8 ]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "build"
+ build:
+ strategy:
+# fail-fast: false
+ matrix:
+ name: ["Windows Latest MSVC", "Ubuntu Latest GCC", "Ubuntu Debug GCC", "macOS Latest Clang", "Ubuntu Autotools GCC"]
+ include:
+ - name: "Windows Latest MSVC"
+ artifact: "Windows-MSVC.tar.xz"
+ os: windows-latest
+ build_type: "Release"
+ toolchain: ""
+ fortran: OFF
+ generator: "-G \"Visual Studio 16 2019\" -A x64"
+ - name: "Ubuntu Latest GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "macOS Latest Clang"
+ artifact: "macOS.tar.xz"
+ os: macos-latest
+ build_type: "Release"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/clang.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Debug GCC"
+ artifact: "LinuxDBG.tar.xz"
+ os: ubuntu-latest
+ build_type: "Debug"
+ cpp: ON
+ fortran: OFF
+ parallel: OFF
+ toolchain: "config/toolchain/GCC.cmake"
+ generator: "-G Ninja"
+ - name: "Ubuntu Autotools GCC"
+ artifact: "Linux.tar.xz"
+ os: ubuntu-latest
+ build_type: "Release"
+ cpp: enable
+ fortran: enable
+ parallel: disable
+ toolchain: ""
+ generator: "autogen"
+# - name: "Ubuntu Parallel GCC"
+# artifact: "LinuxPar.tar.xz"
+# os: ubuntu-latest
+# build_type: "Release"
+# cpp: OFF
+# fortran: OFF
+# parallel: ON
+# toolchain: "config/toolchain/GCC.cmake"
+# generator: "-G Ninja"
+
+ name: ${{ matrix.name }}
+ # The type of runner that the job will run on
+ runs-on: ${{ matrix.os }}
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Install Dependencies (Linux)
+ run: sudo apt-get install ninja-build
+ if: matrix.os == 'ubuntu-latest'
+ - name: Install Autotools Dependencies (Linux)
+ run: sudo apt-get install automake autoconf libtool libtool-bin
+ if: matrix.generator == 'autogen'
+ - name: Install Dependencies (Windows)
+ run: choco install ninja
+ if: matrix.os == 'windows-latest'
+ - name: Install Dependencies (macOS)
+ run: brew install ninja
+ if: matrix.os == 'macos-latest'
+ - name: Set environment for MSVC (Windows)
+ if: matrix.os == 'windows-latest'
+ run: |
+ # Set these env vars so cmake picks the correct compiler
+ echo "::set-env name=CXX::cl.exe"
+ echo "::set-env name=CC::cl.exe"
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - name: Get Sources
+ uses: actions/checkout@v2
+
+ - name: Autotools Configure
+ if: matrix.generator == 'autogen'
+ run: |
+ sh ./autogen.sh
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ $GITHUB_WORKSPACE/configure --enable-shared --${{ matrix.parallel }}-parallel --${{ matrix.cpp }}-cxx --${{ matrix.fortran }}-fortran --enable-java
+ shell: bash
+
+ - name: Configure
+ if: matrix.generator != 'autogen'
+ run: |
+ mkdir "${{ runner.workspace }}/build"
+ cd "${{ runner.workspace }}/build"
+ cmake ${{ matrix.generator }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DBUILD_SHARED_LIBS=ON -DHDF5_ENABLE_ALL_WARNINGS=ON -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} -DHDF5_BUILD_CPP_LIB:BOOL=${{ matrix.cpp }} -DHDF5_BUILD_FORTRAN=${{ matrix.fortran }} -DHDF5_BUILD_JAVA=ON $GITHUB_WORKSPACE
+ shell: bash
+
+ - name: Autotools Build
+ if: matrix.generator == 'autogen'
+ run: make
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Build
+ if: matrix.generator != 'autogen'
+ run: cmake --build . --config ${{ matrix.build_type }}
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Autotools Test
+ if: matrix.generator == 'autogen'
+ run: make check
+ working-directory: ${{ runner.workspace }}/build
+
+ - name: Test
+ if: matrix.generator != 'autogen'
+ run: ctest --build . -C ${{ matrix.build_type }} -V
+ working-directory: ${{ runner.workspace }}/build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac35e9e..b48fdd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,6 +497,9 @@ endif ()
if (HDF5_ENABLE_SANITIZERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
endif ()
+if (HDF5_ENABLE_FORMATTERS)
+ include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake)
+endif ()
#-----------------------------------------------------------------------------
# Option to use code coverage
diff --git a/MANIFEST b/MANIFEST
index 9c9ef03..84d942c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -33,7 +33,11 @@
./autogen.sh
./configure.ac
+./.clang-format
+./.github/CODEOWNERS _DO_NOT_DISTRIBUTE_
+./.github/workflows/clang-format-check.yml _DO_NOT_DISTRIBUTE_
./.github/workflows/main.yml _DO_NOT_DISTRIBUTE_
+./.github/workflows/pr-check.yml _DO_NOT_DISTRIBUTE_
./m4/aclocal_cxx.m4
./m4/aclocal_fc.m4
@@ -71,6 +75,8 @@
./bin/deploy
./bin/distdep
./bin/errors _DO_NOT_DISTRIBUTE_
+./bin/format_source
+./bin/format_source_patch
./bin/genparser
./bin/gcov_script _DO_NOT_DISTRIBUTE_
./bin/h5cc.in
@@ -3608,6 +3614,7 @@
# CMake-specific Sanitizer Scripts
./config/sanitizer/code-coverage.cmake
+./config/sanitizer/formatting.cmake
./config/sanitizer/sanitizers.cmake
./config/sanitizer/tools.cmake
./config/sanitizer/LICENSE
diff --git a/bin/format_source b/bin/format_source
new file mode 100755
index 0000000..b0b695c
--- /dev/null
+++ b/bin/format_source
@@ -0,0 +1,6 @@
+#!/bin/bash
+find . -type d \( -path ./config \) -prune \
+ -o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+exit 0 \ No newline at end of file
diff --git a/bin/format_source_patch b/bin/format_source_patch
new file mode 100755
index 0000000..4c531ea
--- /dev/null
+++ b/bin/format_source_patch
@@ -0,0 +1,14 @@
+#!/bin/bash
+find . -type d \( -path ./config \) -prune \
+ -o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
+ | xargs clang-format -style=file -i -fallback-style=none
+
+git diff > clang_format.patch
+
+# Delete if 0 size
+if [ ! -s clang_format.patch ]
+then
+ rm clang_format.patch
+fi
+
+exit 0 \ No newline at end of file
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 890d22d..b56014f 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -48,6 +48,13 @@ foreach (example ${examples})
endif ()
endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
+ endif ()
endforeach ()
foreach (example ${tutr_examples})
@@ -66,6 +73,13 @@ foreach (example ${tutr_examples})
endif ()
endif ()
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_EXAMPLES_${example}_FORMAT cpp_ex_${example})
+ endif ()
endforeach ()
if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 058f457..0b4473f 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -129,6 +129,17 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET})
+ else ()
+ clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index ca2295e..b911424 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -37,7 +37,7 @@ set (CPP_TEST_SOURCES
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} )
+add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ${HDF5_CPP_TEST_SOURCE_DIR}/h5cpputil.h)
target_include_directories (cpp_testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(cpp_testhdf5 PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(cpp_testhdf5
@@ -57,6 +57,13 @@ else ()
endif ()
set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_CPP_TEST_cpp_testhdf5_FORMAT cpp_testhdf5)
+endif ()
+
if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/config/sanitizer/formatting.cmake b/config/sanitizer/formatting.cmake
new file mode 100644
index 0000000..677a69a
--- /dev/null
+++ b/config/sanitizer/formatting.cmake
@@ -0,0 +1,144 @@
+#
+# Copyright (C) 2019 by George Cave - gcave@stablecoder.ca
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+#
+# clang-format
+#
+find_program(CLANG_FORMAT_EXE "clang-format")
+mark_as_advanced(FORCE CLANG_FORMAT_EXE)
+if(CLANG_FORMAT_EXE)
+ message(STATUS "clang-format found: ${CLANG_FORMAT_EXE}")
+else()
+ message(STATUS "clang-format not found!")
+endif()
+
+# Generates a 'format' target using a custom name, files, and include
+# directories all being parameters.
+#
+# Do note that in order for sources to be inherited properly, the source paths
+# must be reachable from where the macro is called, or otherwise require a full
+# path for proper inheritance.
+#
+# ~~~
+# Required:
+# TARGET_NAME - The name of the target to create.
+#
+# Optional: ARGN - The list of targets OR files to format. Relative and absolute
+# paths are accepted.
+# ~~~
+function(clang_format TARGET_NAME)
+ if(CLANG_FORMAT_EXE)
+ set(FORMAT_FILES)
+ # Check through the ARGN's, determine existent files
+ foreach(item IN LISTS ARGN)
+ if(TARGET ${item})
+ # If the item is a target, then we'll attempt to grab the associated
+ # source files from it.
+ get_target_property(_TARGET_TYPE ${item} TYPE)
+ if(NOT
+ _TARGET_TYPE
+ STREQUAL
+ "INTERFACE_LIBRARY")
+ get_property(
+ _TEMP
+ TARGET ${item}
+ PROPERTY SOURCES)
+ foreach(iter IN LISTS _TEMP)
+ if(EXISTS ${iter})
+ set(FORMAT_FILES ${FORMAT_FILES} ${iter})
+ endif()
+ endforeach()
+ endif()
+ elseif(EXISTS ${item})
+ # Check if it's a full file path
+ set(FORMAT_FILES ${FORMAT_FILES} ${item})
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${item})
+ # Check if it's based on the current source dir
+ set(FORMAT_FILES ${FORMAT_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${item})
+ endif()
+ endforeach()
+
+ # Make the target
+ if(FORMAT_FILES)
+ if(TARGET ${TARGET_NAME})
+ message(
+ ERROR
+ "Cannot create clang-format target '${TARGET_NAME}', already exists.")
+ else()
+ add_custom_target(${TARGET_NAME} COMMAND ${CLANG_FORMAT_EXE} -i -style=file ${FORMAT_FILES})
+
+ if(NOT TARGET format)
+ add_custom_target(format)
+ endif()
+
+ add_dependencies(format ${TARGET_NAME})
+ endif()
+ endif()
+
+ endif()
+endfunction()
+
+#
+# cmake-format
+#
+find_program(CMAKE_FORMAT_EXE "cmake-format")
+mark_as_advanced(FORCE CMAKE_FORMAT_EXE)
+if(CMAKE_FORMAT_EXE)
+ message(STATUS "cmake-format found: ${CMAKE_FORMAT_EXE}")
+else()
+ message(STATUS "cmake-format not found!")
+endif()
+
+# When called, this function will call 'cmake-format' program on all listed
+# files (if both the program and the files exist and are found)
+# ~~~
+# Required:
+# TARGET_NAME - The name of the target to create.
+#
+# Optional:
+# ARGN - Any arguments passed in will be considered as 'files' to perform the
+# formatting on. Any items that are not files will be ignored. Both relative and
+# absolute paths are accepted.
+# ~~~
+function(cmake_format TARGET_NAME)
+ if(CMAKE_FORMAT_EXE)
+ set(FORMAT_FILES)
+ # Determine files that exist
+ foreach(iter IN LISTS ARGN)
+ if(EXISTS ${iter})
+ set(FORMAT_FILES ${FORMAT_FILES} ${iter})
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${iter})
+ set(FORMAT_FILES ${FORMAT_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/${iter})
+ endif()
+ endforeach()
+
+ # Generate target
+ if(FORMAT_FILES)
+ if(TARGET ${TARGET_NAME})
+ message(
+ ERROR
+ "Cannot create cmake-format target '${TARGET_NAME}', already exists.")
+ else()
+ add_custom_target(${TARGET_NAME} COMMAND ${CMAKE_FORMAT_EXE} -i
+ ${FORMAT_FILES})
+
+ if(NOT TARGET cmake-format)
+ add_custom_target(cmake-format)
+ endif()
+ add_dependencies(cmake-format ${TARGET_NAME})
+ endif()
+ endif()
+ endif()
+endfunction()
diff --git a/config/sanitizer/tools.cmake b/config/sanitizer/tools.cmake
index a44022f..2f73cce 100644
--- a/config/sanitizer/tools.cmake
+++ b/config/sanitizer/tools.cmake
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2018 by George Cave - gcave@stablecoder.ca
+# Copyright (C) 2018-2020 by George Cave - gcave@stablecoder.ca
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
@@ -29,7 +29,7 @@ endmacro()
# used as the options set.
macro(include_what_you_use)
if(IWYU AND IWYU_EXE)
- set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${IWYU_EXE};${IWYU_STRING}")
+ set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${IWYU_EXE} ${ARGN})
endif()
endmacro()
@@ -37,11 +37,12 @@ endmacro()
# options set.
macro(cppcheck)
if(CPPCHECK AND CPPCHECK_EXE)
- set(CMAKE_CXX_CPPCHECK "${CPPCHECK_EXE};${CPPCHECK_STRING}")
+ set(CMAKE_CXX_CPPCHECK ${CPPCHECK_EXE} ${ARGN})
endif()
endmacro()
find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
+mark_as_advanced(FORCE CLANG_TIDY_EXE)
if(CLANG_TIDY_EXE)
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
if(NOT CLANG_TIDY)
@@ -63,6 +64,7 @@ else()
endif()
find_program(IWYU_EXE NAMES "include-what-you-use")
+mark_as_advanced(FORCE IWYU_EXE)
if(IWYU_EXE)
message(STATUS "include-what-you-use found: ${IWYU_EXE}")
if(NOT IWYU)
@@ -85,6 +87,7 @@ else()
endif()
find_program(CPPCHECK_EXE NAMES "cppcheck")
+mark_as_advanced(FORCE CPPCHECK_EXE)
if(CPPCHECK_EXE)
message(STATUS "cppcheck found: ${CPPCHECK_EXE}")
if(CPPECHECK)
@@ -108,4 +111,4 @@ else()
set(CMAKE_CXX_CPPCHECK
""
CACHE STRING "" FORCE) # delete it
-endif()
+endif() \ No newline at end of file
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 527b11f..b7e7cf0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -53,6 +53,13 @@ foreach (example ${examples})
target_link_libraries (${example} PRIVATE ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (${example} PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_${example}_FORMAT ${example})
+ endif ()
endforeach ()
if (H5_HAVE_PARALLEL)
@@ -66,6 +73,13 @@ if (H5_HAVE_PARALLEL)
target_link_libraries (ph5example PRIVATE ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
endif ()
set_target_properties (ph5example PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_ph5example_FORMAT ph5example)
+ endif ()
endif ()
if (BUILD_TESTING AND HDF5_TEST_EXAMPLES)
diff --git a/examples/h5_dtransform.c b/examples/h5_dtransform.c
index 0b718ad..99cc48e 100644
--- a/examples/h5_dtransform.c
+++ b/examples/h5_dtransform.c
@@ -36,29 +36,31 @@
#define ROWS 12
#define COLS 18
+/* clang-format off */
const float windchillF[ROWS][COLS] =
- { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0 },
- {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0 } ,
- {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0 },
- {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0 },
- {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0 },
- {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0 },
- {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0 },
- {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0 },
- {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0 },
+ { {36.0, 31.0, 25.0, 19.0, 13.0, 7.0, 1.0, -5.0, -11.0, -16.0, -22.0, -28.0, -34.0, -40.0, -46.0, -52.0, -57.0, -63.0},
+ {34.0, 27.0, 21.0, 15.0, 9.0, 3.0, -4.0, -10.0, -16.0, -22.0, -28.0, -35.0, -41.0, -47.0, -53.0, -59.0, -66.0, -72.0},
+ {32.0, 25.0, 19.0, 13.0, 6.0, 0.0, -7.0, -13.0, -19.0, -26.0, -32.0, -39.0, -45.0, -51.0, -58.0, -64.0, -71.0, -77.0},
+ {30.0, 24.0, 17.0, 11.0, 4.0, -2.0, -9.0, -15.0, -22.0, -29.0, -35.0, -42.0, -48.0, -55.0, -61.0, -68.0, -74.0, -81.0},
+ {29.0, 23.0, 16.0, 9.0, 3.0, -4.0, -11.0, -17.0, -24.0, -31.0, -37.0, -44.0, -51.0, -58.0, -64.0, -71.0, -78.0, -84.0},
+ {28.0, 22.0, 15.0, 8.0, 1.0, -5.0, -12.0, -19.0, -26.0, -33.0, -39.0, -46.0, -53.0, -60.0, -67.0, -73.0, -80.0, -87.0},
+ {28.0, 21.0, 14.0, 7.0, 0.0, -7.0, -14.0, -21.0, -27.0, -34.0, -41.0, -48.0, -55.0, -62.0, -69.0, -76.0, -82.0, -89.0},
+ {27.0, 20.0, 13.0, 6.0, -1.0, -8.0, -15.0, -22.0, -29.0, -36.0, -43.0, -50.0, -57.0, -64.0, -71.0, -78.0, -84.0, -91.0},
+ {26.0, 19.0, 12.0, 5.0, -2.0, -9.0, -16.0, -23.0, -30.0, -37.0, -44.0, -51.0, -58.0, -65.0, -72.0, -79.0, -86.0, -93.0},
{26.0, 19.0, 12.0, 4.0, -3.0, -10.0, -17.0, -24.0, -31.0, -38.0, -45.0, -52.0, -60.0, -67.0, -74.0, -81.0, -88.0, -95.0},
{25.0, 18.0, 11.0, 4.0, -3.0, -11.0, -18.0, -25.0, -32.0, -39.0, -46.0, -54.0, -61.0, -68.0, -75.0, -82.0, -89.0, -97.0},
{25.0, 17.0, 10.0, 3.0, -4.0, -11.0, -19.0, -26.0, -33.0, -40.0, -48.0, -55.0, -62.0, -69.0, -76.0, -84.0, -91.0, -98.0}
};
-
-#define PRINT(array) \
-{ \
- for(i=0; i<ROWS; i++) \
- { \
- for(j=0; j<COLS; j++) \
- printf("%6.2f ", array[i][j]); \
- printf("\n"); \
- } \
+/* clang-format on */
+
+#define PRINT(array) \
+{ \
+ for(i=0; i<ROWS; i++) \
+ { \
+ for(j=0; j<COLS; j++) \
+ printf("%6.2f ", array[i][j]); \
+ printf("\n"); \
+ } \
}
@@ -71,12 +73,12 @@ main (void)
hid_t dataspace; /* handles */
hsize_t dimsf[2]; /* dataset dimensions */
herr_t status;
- hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */
+ hid_t dxpl_id_f_to_c, dxpl_id_c_to_f; /* data transform handles */
const char* f_to_c = "(5/9.0)*(x-32)";
const char* c_to_f = "(9/5.0)*x + 32";
- char* transform;
- float windchillC[ROWS][COLS];
- int i,j, transform_size;
+ char* transform;
+ float windchillC[ROWS][COLS];
+ int i,j, transform_size;
/*
* Create a new file using H5F_ACC_TRUNC access,
@@ -110,7 +112,7 @@ main (void)
* Write the data to the dataset using default transfer properties (ie, no transform set)
*/
status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- H5P_DEFAULT, windchillF);
+ H5P_DEFAULT, windchillF);
/* Create the dataset transfer property list */
dxpl_id_f_to_c = H5Pcreate(H5P_DATASET_XFER);
@@ -131,7 +133,7 @@ main (void)
* Write the data to the dataset with the f_to_c transform set
*/
status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- dxpl_id_f_to_c, windchillF);
+ dxpl_id_f_to_c, windchillF);
/* Read out the data with the default transfer list (ie, no transform set) */
H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, windchillC);
@@ -154,7 +156,7 @@ main (void)
* Write the data to the dataset using the f_to_c transform
*/
status = H5Dwrite(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL,
- dxpl_id_f_to_c, windchillF);
+ dxpl_id_f_to_c, windchillF);
/* Read the data with the c_to_f data transform */
H5Dread(dataset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, dxpl_id_c_to_f, windchillC);
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index b1add54..481a4d2 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -180,6 +180,29 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIB_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ else ()
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIBSH_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
set (f90_F_GEN_SOURCES
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 7cb3db8..e65e60f 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -2067,10 +2067,10 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig
* OUTPUTS
*
* degree - possible values are:
- * H5F_CLOSE_DEFAULT
- * H5F_CLOSE_WEAK
- * H5F_CLOSE_SEMI
- * H5F_CLOSE_STRONG
+ * H5F_CLOSE_DEFAULT
+ * H5F_CLOSE_WEAK
+ * H5F_CLOSE_SEMI
+ * H5F_CLOSE_STRONG
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -2105,10 +2105,10 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* INPUTS
* fapl_id - file access identifier
* degree - possible values are:
- * H5F_CLOSE_DEFAULT
- * H5F_CLOSE_WEAK
- * H5F_CLOSE_SEMI
- * H5F_CLOSE_STRONG
+ * H5F_CLOSE_DEFAULT
+ * H5F_CLOSE_WEAK
+ * H5F_CLOSE_SEMI
+ * H5F_CLOSE_STRONG
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -2659,9 +2659,9 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
*/
int_f
h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data)
+ H5P_cls_create_func_t create, void *create_data,
+ H5P_cls_copy_func_t copy, void *copy_data,
+ H5P_cls_close_func_t close, void *close_data)
/******/
{
int ret_value = -1;
@@ -3434,7 +3434,10 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
*/
int_f
-/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */
+/*
+ * h5pset_fapl_multi_c(hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name,
+ * int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag)
+ */
h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag)
/******/
{
@@ -3865,9 +3868,10 @@ DONE:
* Calls H5Pget_attr_phase_change
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * Outputs max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * OUTPUTS
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -3906,8 +3910,9 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens
* Calls H5Ppset_attr_creation_order
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * OUTPUTS
+ * crt_order_flags - Flags specifying whether to track and index attribute creation order
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4068,7 +4073,7 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
* Calls H5Pset_link_creation_order
*
* INPUTS
- * gcpl_id - Group creation property list identifier
+ * gcpl_id - Group creation property list identifier
* crt_order_flags - Creation order flag(s)
* OUTPUTS
*
@@ -4104,9 +4109,10 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
* Calls H5Pget_link_phase_change
*
* INPUTS
- * gcpl_id - Group creation property list identifier
- * Outputs max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * gcpl_id - Group creation property list identifier
+ * OUTPUTS
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4227,10 +4233,10 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
*
* INPUTS
*
- * lcpl_id - Link creation property list identifier
+ * lcpl_id - Link creation property list identifier
* crt_intermed_group - crt_intermed_group specifying whether
- * to create intermediate groups upon the
- * creation of an object
+ * to create intermediate groups upon the
+ * creation of an object
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4311,8 +4317,8 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
*
* plist_id - Property list identifier
* encoding - String encoding character set:
- * H5T_CSET_ASCII_F -> US ASCII
- * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
* OUTPUTS
* NONE
*
@@ -4355,8 +4361,8 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* OUTPUTS
*
* encoding - Encoding character set:
- * H5T_CSET_ASCII_F -> US ASCII
- * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
*
* RETURNS
* 0 on success, -1 on failure
@@ -4484,7 +4490,7 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4546,7 +4552,7 @@ done:
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4595,7 +4601,7 @@ done:
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4637,7 +4643,7 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4682,7 +4688,7 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4722,7 +4728,7 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4792,7 +4798,7 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens
*
* INPUTS
*
- * fapl_id - File access property list identifier
+ * fapl_id - File access property list identifier
* alignment - Required memory alignment boundary
* block_size - File system block size
* cbuf_size - Copy buffer size
@@ -4838,7 +4844,7 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
*
* INPUTS
*
- * fapl_id - File access property list identifier
+ * fapl_id - File access property list identifier
* OUTPUTS
*
* alignment - Required memory alignment boundary
@@ -4890,9 +4896,9 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
* Calls H5Pset_attr_phase_change
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* OUTPUTS
*
* RETURNS
@@ -5072,7 +5078,7 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
*
* INPUTS
*
- * lcpl_id - Link creation property list identifier
+ * lcpl_id - Link creation property list identifier
* crt_intermed_group - Specifying whether to create intermediate groups upon
* the creation of an object
* RETURNS
@@ -5108,7 +5114,8 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
* Name: h5pset_chunk_cache_c
* Purpose: Calls H5Pset_chunk_cache
*
- * Inputs: dapl_id - Link creation property list identifier
+ * Inputs:
+ * dapl_id - Link creation property list identifier
* rdcc_nslots -
* rdcc_nbytes -
* rdcc_w0 -
@@ -5138,7 +5145,8 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby
* Name: h5pget_chunk_cache_c
* Purpose: Calls H5Pget_chunk_cache
*
- * Inputs: dapl_id - Link creation property list identifier
+ * Inputs:
+ * dapl_id - Link creation property list identifier
* Outputs:
* rdcc_nslots -
* rdcc_nbytes -
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index ff7001b..dadf644 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -42,7 +42,7 @@ endif ()
# Add Test Lib
#-----------------------------------------------------------------------------
if (NOT BUILD_SHARED_LIBS)
- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
+ add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -60,7 +60,7 @@ if (NOT BUILD_SHARED_LIBS)
LINKER_LANGUAGE C
)
else ()
- add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
+ add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h)
target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -79,6 +79,17 @@ else ()
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT BUILD_SHARED_LIBS)
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIB_TARGET})
+ else ()
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIBSH_TARGET})
+ endif ()
+endif ()
+
if (NOT BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index 70c458d..083c60e 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -18,8 +18,6 @@ if (HDF5_BUILD_EXAMPLES)
endif ()
#-- Build the Unit testing if requested
-if (NOT HDF5_EXTERNALLY_CONFIGURED)
- if (BUILD_TESTING AND HDF5_TEST_SERIAL)
- add_subdirectory (test)
- endif ()
+if (BUILD_TESTING AND HDF5_TEST_SERIAL)
+ add_subdirectory (test)
endif ()
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 22c9973..037bf8f 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -23,6 +23,13 @@ else ()
endif ()
set_target_properties (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_CPP_EXAMPLES_FORMAT ptExampleFL)
+endif ()
+
if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index fbabc86..e4678fd 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -9,7 +9,7 @@ set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp)
set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h)
if (NOT ONLY_SHARED_LIBS)
- add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES})
+ add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES} ${HDF5_HL_CPP_HDRS})
target_include_directories (${HDF5_HL_CPP_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -40,6 +40,17 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_CPP_SRC_FORMAT ${HDF5_HL_CPP_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 5c224a8..246a670 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -25,6 +25,13 @@ else ()
endif ()
set_target_properties (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_CPP_TEST_FORMAT hl_ptableTest)
+endif ()
+
if (HDF5_TEST_CPP AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 1707ae9..9bce861 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -37,6 +37,13 @@ foreach (example ${examples})
target_link_libraries (hl_ex_${example} PRIVATE ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_EXAMPLES_${example}_FORMAT hl_ex_${example})
+ endif ()
endforeach ()
if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
diff --git a/hl/examples/pal_rgb.h b/hl/examples/pal_rgb.h
index f3905b3..488ee42 100644
--- a/hl/examples/pal_rgb.h
+++ b/hl/examples/pal_rgb.h
@@ -11,263 +11,266 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-const unsigned char pal_rgb[256*3] = {255,255,255,
-0,0,131,
-0,0,135,
-0,0,139,
-0,0,143,
-0,0,147,
-0,0,151,
-0,0,155,
-0,0,159,
-0,0,163,
-0,0,167,
-0,0,171,
-0,0,175,
-0,0,179,
-0,0,183,
-0,0,187,
-0,0,191,
-0,0,195,
-0,0,199,
-0,0,203,
-0,0,207,
-0,0,211,
-0,0,215,
-0,0,219,
-0,0,223,
-0,0,227,
-0,0,231,
-0,0,235,
-0,0,239,
-0,0,243,
-0,0,247,
-0,0,251,
-0,0,255,
-0,0,255,
-0,3,255,
-0,7,255,
-0,11,255,
-0,15,255,
-0,19,255,
-0,23,255,
-0,27,255,
-0,31,255,
-0,35,255,
-0,39,255,
-0,43,255,
-0,47,255,
-0,51,255,
-0,55,255,
-0,59,255,
-0,63,255,
-0,67,255,
-0,71,255,
-0,75,255,
-0,79,255,
-0,83,255,
-0,87,255,
-0,91,255,
-0,95,255,
-0,99,255,
-0,103,255,
-0,107,255,
-0,111,255,
-0,115,255,
-0,119,255,
-0,123,255,
-0,127,255,
-0,131,255,
-0,135,255,
-0,139,255,
-0,143,255,
-0,147,255,
-0,151,255,
-0,155,255,
-0,159,255,
-0,163,255,
-0,167,255,
-0,171,255,
-0,175,255,
-0,179,255,
-0,183,255,
-0,187,255,
-0,191,255,
-0,195,255,
-0,199,255,
-0,203,255,
-0,207,255,
-0,211,255,
-0,215,255,
-0,219,255,
-0,223,255,
-0,227,255,
-0,231,255,
-0,235,255,
-0,239,255,
-0,243,255,
-0,247,255,
-0,251,255,
-0,255,255,
-0,255,255,
-3,255,251,
-7,255,247,
-11,255,243,
-15,255,239,
-19,255,235,
-23,255,231,
-27,255,227,
-31,255,223,
-35,255,219,
-39,255,215,
-43,255,211,
-47,255,207,
-51,255,203,
-55,255,199,
-59,255,195,
-63,255,191,
-67,255,187,
-71,255,183,
-75,255,179,
-79,255,175,
-83,255,171,
-87,255,167,
-91,255,163,
-95,255,159,
-99,255,155,
-103,255,151,
-107,255,147,
-111,255,143,
-115,255,139,
-119,255,135,
-123,255,131,
-127,255,127,
-131,255,123,
-135,255,119,
-139,255,115,
-143,255,111,
-147,255,107,
-151,255,103,
-155,255,99,
-159,255,95,
-163,255,91,
-167,255,87,
-171,255,83,
-175,255,79,
-179,255,75,
-183,255,71,
-187,255,67,
-191,255,63,
-195,255,59,
-199,255,55,
-203,255,51,
-207,255,47,
-211,255,43,
-215,255,39,
-219,255,35,
-223,255,31,
-227,255,27,
-231,255,23,
-235,255,19,
-239,255,15,
-243,255,11,
-247,255,7,
-251,255,3,
-255,255,0,
-255,251,0,
-255,247,0,
-255,243,0,
-255,239,0,
-255,235,0,
-255,231,0,
-255,227,0,
-255,223,0,
-255,219,0,
-255,215,0,
-255,211,0,
-255,207,0,
-255,203,0,
-255,199,0,
-255,195,0,
-255,191,0,
-255,187,0,
-255,183,0,
-255,179,0,
-255,175,0,
-255,171,0,
-255,167,0,
-255,163,0,
-255,159,0,
-255,155,0,
-255,151,0,
-255,147,0,
-255,143,0,
-255,139,0,
-255,135,0,
-255,131,0,
-255,127,0,
-255,123,0,
-255,119,0,
-255,115,0,
-255,111,0,
-255,107,0,
-255,103,0,
-255,99,0,
-255,95,0,
-255,91,0,
-255,87,0,
-255,83,0,
-255,79,0,
-255,75,0,
-255,71,0,
-255,67,0,
-255,63,0,
-255,59,0,
-255,55,0,
-255,51,0,
-255,47,0,
-255,43,0,
-255,39,0,
-255,35,0,
-255,31,0,
-255,27,0,
-255,23,0,
-255,19,0,
-255,15,0,
-255,11,0,
-255,7,0,
-255,3,0,
-255,0,0,
-250,0,0,
-246,0,0,
-241,0,0,
-237,0,0,
-233,0,0,
-228,0,0,
-224,0,0,
-219,0,0,
-215,0,0,
-211,0,0,
-206,0,0,
-202,0,0,
-197,0,0,
-193,0,0,
-189,0,0,
-184,0,0,
-180,0,0,
-175,0,0,
-171,0,0,
-167,0,0,
-162,0,0,
-158,0,0,
-153,0,0,
-149,0,0,
-145,0,0,
-140,0,0,
-136,0,0,
-131,0,0,
-127,0,0
+/* clang-format off */
+const unsigned char pal_rgb[256*3] = {
+ 255,255,255,
+ 0,0,131,
+ 0,0,135,
+ 0,0,139,
+ 0,0,143,
+ 0,0,147,
+ 0,0,151,
+ 0,0,155,
+ 0,0,159,
+ 0,0,163,
+ 0,0,167,
+ 0,0,171,
+ 0,0,175,
+ 0,0,179,
+ 0,0,183,
+ 0,0,187,
+ 0,0,191,
+ 0,0,195,
+ 0,0,199,
+ 0,0,203,
+ 0,0,207,
+ 0,0,211,
+ 0,0,215,
+ 0,0,219,
+ 0,0,223,
+ 0,0,227,
+ 0,0,231,
+ 0,0,235,
+ 0,0,239,
+ 0,0,243,
+ 0,0,247,
+ 0,0,251,
+ 0,0,255,
+ 0,0,255,
+ 0,3,255,
+ 0,7,255,
+ 0,11,255,
+ 0,15,255,
+ 0,19,255,
+ 0,23,255,
+ 0,27,255,
+ 0,31,255,
+ 0,35,255,
+ 0,39,255,
+ 0,43,255,
+ 0,47,255,
+ 0,51,255,
+ 0,55,255,
+ 0,59,255,
+ 0,63,255,
+ 0,67,255,
+ 0,71,255,
+ 0,75,255,
+ 0,79,255,
+ 0,83,255,
+ 0,87,255,
+ 0,91,255,
+ 0,95,255,
+ 0,99,255,
+ 0,103,255,
+ 0,107,255,
+ 0,111,255,
+ 0,115,255,
+ 0,119,255,
+ 0,123,255,
+ 0,127,255,
+ 0,131,255,
+ 0,135,255,
+ 0,139,255,
+ 0,143,255,
+ 0,147,255,
+ 0,151,255,
+ 0,155,255,
+ 0,159,255,
+ 0,163,255,
+ 0,167,255,
+ 0,171,255,
+ 0,175,255,
+ 0,179,255,
+ 0,183,255,
+ 0,187,255,
+ 0,191,255,
+ 0,195,255,
+ 0,199,255,
+ 0,203,255,
+ 0,207,255,
+ 0,211,255,
+ 0,215,255,
+ 0,219,255,
+ 0,223,255,
+ 0,227,255,
+ 0,231,255,
+ 0,235,255,
+ 0,239,255,
+ 0,243,255,
+ 0,247,255,
+ 0,251,255,
+ 0,255,255,
+ 0,255,255,
+ 3,255,251,
+ 7,255,247,
+ 11,255,243,
+ 15,255,239,
+ 19,255,235,
+ 23,255,231,
+ 27,255,227,
+ 31,255,223,
+ 35,255,219,
+ 39,255,215,
+ 43,255,211,
+ 47,255,207,
+ 51,255,203,
+ 55,255,199,
+ 59,255,195,
+ 63,255,191,
+ 67,255,187,
+ 71,255,183,
+ 75,255,179,
+ 79,255,175,
+ 83,255,171,
+ 87,255,167,
+ 91,255,163,
+ 95,255,159,
+ 99,255,155,
+ 103,255,151,
+ 107,255,147,
+ 111,255,143,
+ 115,255,139,
+ 119,255,135,
+ 123,255,131,
+ 127,255,127,
+ 131,255,123,
+ 135,255,119,
+ 139,255,115,
+ 143,255,111,
+ 147,255,107,
+ 151,255,103,
+ 155,255,99,
+ 159,255,95,
+ 163,255,91,
+ 167,255,87,
+ 171,255,83,
+ 175,255,79,
+ 179,255,75,
+ 183,255,71,
+ 187,255,67,
+ 191,255,63,
+ 195,255,59,
+ 199,255,55,
+ 203,255,51,
+ 207,255,47,
+ 211,255,43,
+ 215,255,39,
+ 219,255,35,
+ 223,255,31,
+ 227,255,27,
+ 231,255,23,
+ 235,255,19,
+ 239,255,15,
+ 243,255,11,
+ 247,255,7,
+ 251,255,3,
+ 255,255,0,
+ 255,251,0,
+ 255,247,0,
+ 255,243,0,
+ 255,239,0,
+ 255,235,0,
+ 255,231,0,
+ 255,227,0,
+ 255,223,0,
+ 255,219,0,
+ 255,215,0,
+ 255,211,0,
+ 255,207,0,
+ 255,203,0,
+ 255,199,0,
+ 255,195,0,
+ 255,191,0,
+ 255,187,0,
+ 255,183,0,
+ 255,179,0,
+ 255,175,0,
+ 255,171,0,
+ 255,167,0,
+ 255,163,0,
+ 255,159,0,
+ 255,155,0,
+ 255,151,0,
+ 255,147,0,
+ 255,143,0,
+ 255,139,0,
+ 255,135,0,
+ 255,131,0,
+ 255,127,0,
+ 255,123,0,
+ 255,119,0,
+ 255,115,0,
+ 255,111,0,
+ 255,107,0,
+ 255,103,0,
+ 255,99,0,
+ 255,95,0,
+ 255,91,0,
+ 255,87,0,
+ 255,83,0,
+ 255,79,0,
+ 255,75,0,
+ 255,71,0,
+ 255,67,0,
+ 255,63,0,
+ 255,59,0,
+ 255,55,0,
+ 255,51,0,
+ 255,47,0,
+ 255,43,0,
+ 255,39,0,
+ 255,35,0,
+ 255,31,0,
+ 255,27,0,
+ 255,23,0,
+ 255,19,0,
+ 255,15,0,
+ 255,11,0,
+ 255,7,0,
+ 255,3,0,
+ 255,0,0,
+ 250,0,0,
+ 246,0,0,
+ 241,0,0,
+ 237,0,0,
+ 233,0,0,
+ 228,0,0,
+ 224,0,0,
+ 219,0,0,
+ 215,0,0,
+ 211,0,0,
+ 206,0,0,
+ 202,0,0,
+ 197,0,0,
+ 193,0,0,
+ 189,0,0,
+ 184,0,0,
+ 180,0,0,
+ 175,0,0,
+ 171,0,0,
+ 167,0,0,
+ 162,0,0,
+ 158,0,0,
+ 153,0,0,
+ 149,0,0,
+ 145,0,0,
+ 140,0,0,
+ 136,0,0,
+ 131,0,0,
+ 127,0,0
};
+/* clang-format on */
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index d682d5f..789d2fa 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -15,7 +15,7 @@ endif ()
# Generate the H5LT and H5TB REAL APIs
#-----------------------------------------------------------------------------
-add_executable (H5HL_buildiface ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90 )
+add_executable (H5HL_buildiface ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90)
target_include_directories (H5HL_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
if (WIN32 AND MSVC)
if (BUILD_SHARED_LIBS)
@@ -54,7 +54,7 @@ set (HDF5_HL_F90_C_SOURCES
)
set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C)
-set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
+set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.h)
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
@@ -93,6 +93,17 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_F90_C_SRC_FORMAT ${HDF5_HL_F90_C_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_F90_C_SRC_FORMAT ${HDF5_HL_F90_C_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
set (HDF5_HL_F90_F_BASE_SOURCES
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index c4ddf19..e73c470 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -30,6 +30,14 @@ set (HL_HEADERS
set (HL_PRIVATE_HEADERS
${HDF5_HL_SRC_SOURCE_DIR}/H5LTparse.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5DSprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5IMprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5PTprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5HLprivate2.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5LTprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5PTprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5TBprivate.h
+ ${HDF5_HL_SRC_SOURCE_DIR}/H5LDprivate.h
)
if (NOT ONLY_SHARED_LIBS)
@@ -64,6 +72,17 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_SRC_FORMAT ${HDF5_HL_LIB_TARGET})
+ else ()
+ clang_format (HDF5_HL_SRC_FORMAT ${HDF5_HL_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
install (
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index a631533..0003018 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -11,11 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "H5LTprivate.h"
/* For Lex and Yacc */
@@ -63,17 +58,17 @@ size_t indent = 0;
/* Data structure to pass application data to callbacks. */
typedef struct {
- void *app_image_ptr; /* Pointer to application buffer */
- size_t app_image_size; /* Size of application buffer */
- void *fapl_image_ptr; /* Pointer to FAPL buffer */
- size_t fapl_image_size; /* Size of FAPL buffer */
- int fapl_ref_count; /* Reference counter for FAPL buffer */
- void *vfd_image_ptr; /* Pointer to VFD buffer */
- size_t vfd_image_size; /* Size of VFD buffer */
- int vfd_ref_count; /* Reference counter for VFD buffer */
- unsigned flags; /* Flags indicate how the file image will */
+ void *app_image_ptr; /* Pointer to application buffer */
+ size_t app_image_size; /* Size of application buffer */
+ void *fapl_image_ptr; /* Pointer to FAPL buffer */
+ size_t fapl_image_size; /* Size of FAPL buffer */
+ int fapl_ref_count; /* Reference counter for FAPL buffer */
+ void *vfd_image_ptr; /* Pointer to VFD buffer */
+ size_t vfd_image_size; /* Size of VFD buffer */
+ int vfd_ref_count; /* Reference counter for VFD buffer */
+ unsigned flags; /* Flags indicate how the file image will */
/* be open */
- int ref_count; /* Reference counter on udata struct */
+ int ref_count; /* Reference counter on udata struct */
} H5LT_file_image_ud_t;
/* callbacks prototypes for file image ops */
@@ -86,7 +81,7 @@ static herr_t udata_free(void *udata);
/* Definition of callbacks for file image operations. */
-
+
/*-------------------------------------------------------------------------
* Function: image_malloc
*
@@ -132,9 +127,9 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
udata->fapl_image_size = udata->app_image_size;
return_value = udata->fapl_image_ptr;
udata->fapl_ref_count++;
- break;
+ break;
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
if (udata->fapl_image_ptr == NULL)
goto out;
if (udata->fapl_image_size != size)
@@ -144,7 +139,7 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
return_value = udata->fapl_image_ptr;
udata->fapl_ref_count++;
- break;
+ break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
goto out;
@@ -165,16 +160,16 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
goto out;
udata->vfd_image_ptr = udata->fapl_image_ptr;
- udata->vfd_image_size = size;
+ udata->vfd_image_size = size;
udata->vfd_ref_count++;
return_value = udata->vfd_image_ptr;
break;
- /* added unused labels to shut the compiler up */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
+ /* added unused labels to shut the compiler up */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
default:
goto out;
} /* end switch */
@@ -185,7 +180,7 @@ out:
return NULL;
} /* end image_malloc() */
-
+
/*-------------------------------------------------------------------------
* Function: image_memcpy
*
@@ -256,11 +251,11 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
goto out;
break;
- /* added unused labels to shut the compiler up */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
+ /* added unused labels to shut the compiler up */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
default:
goto out;
} /* end switch */
@@ -271,7 +266,7 @@ out:
return NULL;
} /* end image_memcpy() */
-
+
/*-------------------------------------------------------------------------
* Function: image_realloc
*
@@ -356,7 +351,7 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
switch(file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- if (udata->fapl_image_ptr != ptr)
+ if (udata->fapl_image_ptr != ptr)
goto out;
if (udata->fapl_ref_count == 0)
goto out;
@@ -391,14 +386,14 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
} /* end if */
break;
- /* added unused labels to keep the compiler quite */
- case H5FD_FILE_IMAGE_OP_NO_OP:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
- case H5FD_FILE_IMAGE_OP_FILE_OPEN:
- case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
- default:
+ /* added unused labels to keep the compiler quite */
+ case H5FD_FILE_IMAGE_OP_NO_OP:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
+ case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET:
+ case H5FD_FILE_IMAGE_OP_FILE_OPEN:
+ case H5FD_FILE_IMAGE_OP_FILE_RESIZE:
+ default:
goto out;
} /* end switch */
@@ -408,7 +403,7 @@ out:
return(FAIL);
} /* end image_free() */
-
+
/*-------------------------------------------------------------------------
* Function: udata_copy
*
@@ -504,7 +499,7 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
+* Programmer: Quincey Koziol
*
* Date: October 10, 2007
*
@@ -570,7 +565,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 19, 2001
*
@@ -599,7 +594,7 @@ herr_t H5LTmake_dataset( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -628,7 +623,7 @@ herr_t H5LTmake_dataset_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -657,7 +652,7 @@ herr_t H5LTmake_dataset_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -688,7 +683,7 @@ herr_t H5LTmake_dataset_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -717,7 +712,7 @@ herr_t H5LTmake_dataset_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -748,7 +743,7 @@ herr_t H5LTmake_dataset_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -778,7 +773,7 @@ herr_t H5LTmake_dataset_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: October 05, 2004
*
@@ -848,7 +843,7 @@ out:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5LTopen_file_image
*
@@ -864,9 +859,9 @@ out:
*/
hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
{
- hid_t fapl=-1, file_id=-1; /* HDF5 identifiers */
+ hid_t fapl=-1, file_id=-1; /* HDF5 identifiers */
unsigned file_open_flags; /* Flags for image open */
- char file_name[64]; /* Filename buffer */
+ char file_name[64]; /* Filename buffer */
size_t alloc_incr; /* Buffer allocation increment */
size_t min_incr = 65536; /* Minimum buffer increment */
double buf_prcnt = 0.1f; /* Percentage of buffer size to set
@@ -903,7 +898,7 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* Set callbacks for file image ops ONLY if the file image is NOT copied */
if (flags & H5LT_FILE_IMAGE_DONT_COPY) {
- H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
+ H5LT_file_image_ud_t *udata; /* Pointer to udata structure */
/* Allocate buffer to communicate user data to callbacks */
if (NULL == (udata = (H5LT_file_image_ud_t *)HDmalloc(sizeof(H5LT_file_image_ud_t))))
@@ -970,7 +965,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
+* Programmer: Quincey Koziol
*
* Date: October 8, 2007
*
@@ -1012,7 +1007,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 13, 2001
*
@@ -1035,7 +1030,7 @@ herr_t H5LTread_dataset(hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1056,7 +1051,7 @@ herr_t H5LTread_dataset_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1077,7 +1072,7 @@ herr_t H5LTread_dataset_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1098,7 +1093,7 @@ herr_t H5LTread_dataset_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1119,7 +1114,7 @@ herr_t H5LTread_dataset_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1141,7 +1136,7 @@ herr_t H5LTread_dataset_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1163,7 +1158,7 @@ herr_t H5LTread_dataset_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: October 05, 2004
*
@@ -1216,7 +1211,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -1272,7 +1267,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
* Modified: February 28, 2006: checked for NULL parameters
@@ -1348,7 +1343,7 @@ out:
*
* Purpose: operator function used by H5LTfind_dataset
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -1392,7 +1387,7 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_
* Purpose: Inquires if a dataset named dset_name exists attached
* to the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 15, 2001
*
@@ -1412,13 +1407,13 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info2_t *linfo, void *op_
* modify the op_data buffer (i.e.: dset_name) during the traversal, and the
* library never modifies that buffer.
*/
-H5_GCC_DIAG_OFF(cast-qual)
+H5_GCC_DIAG_OFF("cast-qual")
herr_t
H5LTfind_dataset( hid_t loc_id, const char *dset_name )
{
return H5Literate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name);
}
-H5_GCC_DIAG_ON(cast-qual)
+H5_GCC_DIAG_ON("cast-qual")
/*-------------------------------------------------------------------------
*
@@ -1436,7 +1431,7 @@ H5_GCC_DIAG_ON(cast-qual)
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 23, 2001
*
@@ -1534,7 +1529,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 25, 2001
*
@@ -1613,7 +1608,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1643,7 +1638,7 @@ herr_t H5LTset_attribute_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1674,7 +1669,7 @@ herr_t H5LTset_attribute_uchar( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1705,7 +1700,7 @@ herr_t H5LTset_attribute_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1736,7 +1731,7 @@ herr_t H5LTset_attribute_ushort( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1767,7 +1762,7 @@ herr_t H5LTset_attribute_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1799,7 +1794,7 @@ herr_t H5LTset_attribute_uint( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1829,7 +1824,7 @@ herr_t H5LTset_attribute_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
+* Programmer: Elena Pourmal
*
* Date: June 17, 2005
*
@@ -1861,7 +1856,7 @@ herr_t H5LTset_attribute_long_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1893,7 +1888,7 @@ herr_t H5LTset_attribute_ulong( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 25, 2001
*
@@ -1926,7 +1921,7 @@ herr_t H5LTset_attribute_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1957,7 +1952,7 @@ herr_t H5LTset_attribute_double( hid_t loc_id,
*
* Purpose: operator function used by H5LT_find_attribute
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -1998,7 +1993,7 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
* Purpose: Inquires if an attribute named attr_name exists attached to
* the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: May 17, 2006
*
@@ -2020,7 +2015,7 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
*
* Purpose: Inquires if an attribute named attr_name exists attached to the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -2043,13 +2038,13 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
* modify the op_data buffer (i.e.: attr_name) during the traversal, and the
* library never modifies that buffer.
*/
-H5_GCC_DIAG_OFF(cast-qual)
+H5_GCC_DIAG_OFF("cast-qual")
herr_t
H5LT_find_attribute( hid_t loc_id, const char* attr_name )
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name);
}
-H5_GCC_DIAG_ON(cast-qual)
+H5_GCC_DIAG_ON("cast-qual")
/*-------------------------------------------------------------------------
@@ -2059,7 +2054,7 @@ H5_GCC_DIAG_ON(cast-qual)
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -2129,7 +2124,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -2215,7 +2210,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: October 6, 2004
*
@@ -2265,7 +2260,7 @@ out:
*
* Return: void
*
-* Programmer: Raymond Lu, songyulu@hdfgroup.org
+* Programmer: Raymond Lu
*
* Date: 29 September 2011
*
@@ -2302,13 +2297,13 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str
* extend past the allocated buffer; if it does then truncate the string
*/
if(size_str < *len - 1) {
- if( size_str + size_str_to_add < *len - 1) {
- HDstrncat(buf, str_to_add, size_str_to_add);
- } else {
- HDstrncat(buf, str_to_add, (*len - 1) - size_str);
- }
+ if( size_str + size_str_to_add < *len - 1) {
+ HDstrncat(buf, str_to_add, size_str_to_add);
+ } else {
+ HDstrncat(buf, str_to_add, (*len - 1) - size_str);
+ }
} else {
- buf[*len-1] = '\0'; /* buffer is full, null terminate */
+ buf[*len-1] = '\0'; /* buffer is full, null terminate */
}
}
@@ -2325,7 +2320,7 @@ out:
*
* Return: void
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 6, 2005
*
@@ -2489,7 +2484,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 6, 2005
*
@@ -2536,7 +2531,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 20, 2005
*
@@ -3067,15 +3062,15 @@ next:
HDsnprintf(dt_str, *slen, "H5T_NO_CLASS");
break;
case H5T_REFERENCE:
- if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) {
- HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }");
- }
- else {
- HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }");
- }
- break;
+ if (H5Tequal(dtype, H5T_STD_REF_DSETREG) == TRUE) {
+ HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_DSETREG }");
+ }
+ else {
+ HDsnprintf(dt_str, *slen, " H5T_REFERENCE { H5T_STD_REF_OBJECT }");
+ }
+ break;
case H5T_NCLASSES:
- break;
+ break;
default:
HDsnprintf(dt_str, *slen, "unknown data type");
}
@@ -3101,7 +3096,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3153,7 +3148,7 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3182,7 +3177,7 @@ herr_t H5LTget_attribute_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3213,7 +3208,7 @@ herr_t H5LTget_attribute_uchar( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3242,7 +3237,7 @@ herr_t H5LTget_attribute_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3273,7 +3268,7 @@ herr_t H5LTget_attribute_ushort( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3302,7 +3297,7 @@ herr_t H5LTget_attribute_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3333,7 +3328,7 @@ herr_t H5LTget_attribute_uint( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3362,7 +3357,7 @@ herr_t H5LTget_attribute_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
+* Programmer: Elena Pourmal
*
* Date: June 17, 2005
*
@@ -3392,7 +3387,7 @@ herr_t H5LTget_attribute_long_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3422,7 +3417,7 @@ herr_t H5LTget_attribute_ulong( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3454,7 +3449,7 @@ herr_t H5LTget_attribute_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3486,7 +3481,7 @@ herr_t H5LTget_attribute_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3525,7 +3520,7 @@ herr_t H5LTget_attribute( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3589,7 +3584,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3631,7 +3626,7 @@ out:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5LT_set_attribute_string
*
@@ -3639,7 +3634,7 @@ out:
*
* Return: FAIL on error, SUCCESS on success
*
-* Programmer: pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 04, 2005
*
@@ -3751,12 +3746,12 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
if(HDstrncmp(path, ".", path_length) == 0) {
if(check_object_valid) {
obj_exists = H5Oexists_by_name(loc_id, path, H5P_DEFAULT);
- ret_value = obj_exists;
- goto done;
+ ret_value = obj_exists;
+ goto done;
} else {
- ret_value = TRUE; /* Since the object is the identifier itself,
- * we can only check if loc_id is a valid type */
- goto done;
+ ret_value = TRUE; /* Since the object is the identifier itself,
+ * we can only check if loc_id is a valid type */
+ goto done;
}
}
@@ -3780,20 +3775,20 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
obj_exists = FALSE;
if((link_exists = H5Lexists(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- goto done;
+ ret_value = FAIL;
+ goto done;
}
/* If target link does not exist then no reason to
* continue checking the path */
if(link_exists != TRUE) {
- ret_value = FALSE;
- goto done;
+ ret_value = FALSE;
+ goto done;
}
/* Determine if link resolves to an actual object */
if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
+ ret_value = FAIL;
goto done;
}
@@ -3817,11 +3812,11 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
ret_value = link_exists;
/* Determine if link resolves to an actual object for check_object_valid TRUE */
if(check_object_valid == TRUE && link_exists == TRUE) {
- if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
- ret_value = FAIL;
- } else {
- ret_value = obj_exists;
- }
+ if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
+ ret_value = FAIL;
+ } else {
+ ret_value = obj_exists;
+ }
}
}
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 6349bb3..2fc0c87 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -37,6 +37,13 @@ macro (HL_ADD_EXE hl_name)
)
endif ()
set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_${hl_name}_FORMAT hl_${hl_name})
+ endif ()
endmacro ()
HL_ADD_EXE (test_lite)
@@ -69,6 +76,13 @@ else ()
endif ()
set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_hl_test_packet_FORMAT hl_test_packet)
+endif ()
+
# --------------------------------------------------------------------
# This executable is used to generate test files for the test_ds test.
# It should only be run during development when new test files are needed
@@ -85,6 +99,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
)
set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_hl_gen_test_ds_FORMAT hl_gen_test_ds)
+ endif ()
+
add_executable (hl_gen_test_ld gen_test_ld.c)
target_compile_options(hl_gen_test_ld PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (hl_gen_test_ld PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -95,6 +116,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
${HDF5_LIB_TARGET}
)
set_target_properties (hl_gen_test_ld PROPERTIES FOLDER test/hl/gen)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TEST_hl_gen_test_ld_FORMAT hl_gen_test_ld)
+ endif ()
endif ()
if (HDF5_TEST_SERIAL)
diff --git a/hl/test/pal_rgb.h b/hl/test/pal_rgb.h
index 4b22bea..488ee42 100644
--- a/hl/test/pal_rgb.h
+++ b/hl/test/pal_rgb.h
@@ -11,261 +11,270 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-const unsigned char pal_rgb[256*3] = {255,255,255,
-0,0,131,
-0,0,135,
-0,0,139,
-0,0,143,
-0,0,147,
-0,0,151,
-0,0,155,
-0,0,159,
-0,0,163,
-0,0,167,
-0,0,171,
-0,0,175,
-0,0,179,
-0,0,183,
-0,0,187,
-0,0,191,
-0,0,195,
-0,0,199,
-0,0,203,
-0,0,207,
-0,0,211,
-0,0,215,
-0,0,219,
-0,0,223,
-0,0,227,
-0,0,231,
-0,0,235,
-0,0,239,
-0,0,243,
-0,0,247,
-0,0,251,
-0,0,255,
-0,0,255,
-0,3,255,
-0,7,255,
-0,11,255,
-0,15,255,
-0,19,255,
-0,23,255,
-0,27,255,
-0,31,255,
-0,35,255,
-0,39,255,
-0,43,255,
-0,47,255,
-0,51,255,
-0,55,255,
-0,59,255,
-0,63,255,
-0,67,255,
-0,71,255,
-0,75,255,
-0,79,255,
-0,83,255,
-0,87,255,
-0,91,255,
-0,95,255,
-0,99,255,
-0,103,255,
-0,107,255,
-0,111,255,
-0,115,255,
-0,119,255,
-0,123,255,
-0,127,255,
-0,131,255,
-0,135,255,
-0,139,255,
-0,143,255,
-0,147,255,
-0,151,255,
-0,155,255,
-0,159,255,
-0,163,255,
-0,167,255,
-0,171,255,
-0,175,255,
-0,179,255,
-0,183,255,
-0,187,255,
-0,191,255,
-0,195,255,
-0,199,255,
-0,203,255,
-0,207,255,
-0,211,255,
-0,215,255,
-0,219,255,
-0,223,255,
-0,227,255,
-0,231,255,
-0,235,255,
-0,239,255,
-0,243,255,
-0,247,255,
-0,251,255,
-0,255,255,
-0,255,255,
-3,255,251,
-7,255,247,
-11,255,243,
-15,255,239,
-19,255,235,
-23,255,231,
-27,255,227,
-31,255,223,
-35,255,219,
-39,255,215,
-43,255,211,
-47,255,207,
-51,255,203,
-55,255,199,
-59,255,195,
-63,255,191,
-67,255,187,
-71,255,183,
-75,255,179,
-79,255,175,
-83,255,171,
-87,255,167,
-91,255,163,
-95,255,159,
-99,255,155,
-103,255,151,
-107,255,147,
-111,255,143,
-115,255,139,
-119,255,135,
-123,255,131,
-127,255,127,
-131,255,123,
-135,255,119,
-139,255,115,
-143,255,111,
-147,255,107,
-151,255,103,
-155,255,99,
-159,255,95,
-163,255,91,
-167,255,87,
-171,255,83,
-175,255,79,
-179,255,75,
-183,255,71,
-187,255,67,
-191,255,63,
-195,255,59,
-199,255,55,
-203,255,51,
-207,255,47,
-211,255,43,
-215,255,39,
-219,255,35,
-223,255,31,
-227,255,27,
-231,255,23,
-235,255,19,
-239,255,15,
-243,255,11,
-247,255,7,
-251,255,3,
-255,255,0,
-255,251,0,
-255,247,0,
-255,243,0,
-255,239,0,
-255,235,0,
-255,231,0,
-255,227,0,
-255,223,0,
-255,219,0,
-255,215,0,
-255,211,0,
-255,207,0,
-255,203,0,
-255,199,0,
-255,195,0,
-255,191,0,
-255,187,0,
-255,183,0,
-255,179,0,
-255,175,0,
-255,171,0,
-255,167,0,
-255,163,0,
-255,159,0,
-255,155,0,
-255,151,0,
-255,147,0,
-255,143,0,
-255,139,0,
-255,135,0,
-255,131,0,
-255,127,0,
-255,123,0,
-255,119,0,
-255,115,0,
-255,111,0,
-255,107,0,
-255,103,0,
-255,99,0,
-255,95,0,
-255,91,0,
-255,87,0,
-255,83,0,
-255,79,0,
-255,75,0,
-255,71,0,
-255,67,0,
-255,63,0,
-255,59,0,
-255,55,0,
-255,51,0,
-255,47,0,
-255,43,0,
-255,39,0,
-255,35,0,
-255,31,0,
-255,27,0,
-255,23,0,
-255,19,0,
-255,15,0,
-255,11,0,
-255,7,0,
-255,3,0,
-255,0,0,
-250,0,0,
-246,0,0,
-241,0,0,
-237,0,0,
-233,0,0,
-228,0,0,
-224,0,0,
-219,0,0,
-215,0,0,
-211,0,0,
-206,0,0,
-202,0,0,
-197,0,0,
-193,0,0,
-189,0,0,
-184,0,0,
-180,0,0,
-175,0,0,
-171,0,0,
-167,0,0,
-162,0,0,
-158,0,0,
-153,0,0,
-149,0,0,
-145,0,0,
-140,0,0,
-136,0,0,
-131,0,0,
-127,0,0
+/* clang-format off */
+const unsigned char pal_rgb[256*3] = {
+ 255,255,255,
+ 0,0,131,
+ 0,0,135,
+ 0,0,139,
+ 0,0,143,
+ 0,0,147,
+ 0,0,151,
+ 0,0,155,
+ 0,0,159,
+ 0,0,163,
+ 0,0,167,
+ 0,0,171,
+ 0,0,175,
+ 0,0,179,
+ 0,0,183,
+ 0,0,187,
+ 0,0,191,
+ 0,0,195,
+ 0,0,199,
+ 0,0,203,
+ 0,0,207,
+ 0,0,211,
+ 0,0,215,
+ 0,0,219,
+ 0,0,223,
+ 0,0,227,
+ 0,0,231,
+ 0,0,235,
+ 0,0,239,
+ 0,0,243,
+ 0,0,247,
+ 0,0,251,
+ 0,0,255,
+ 0,0,255,
+ 0,3,255,
+ 0,7,255,
+ 0,11,255,
+ 0,15,255,
+ 0,19,255,
+ 0,23,255,
+ 0,27,255,
+ 0,31,255,
+ 0,35,255,
+ 0,39,255,
+ 0,43,255,
+ 0,47,255,
+ 0,51,255,
+ 0,55,255,
+ 0,59,255,
+ 0,63,255,
+ 0,67,255,
+ 0,71,255,
+ 0,75,255,
+ 0,79,255,
+ 0,83,255,
+ 0,87,255,
+ 0,91,255,
+ 0,95,255,
+ 0,99,255,
+ 0,103,255,
+ 0,107,255,
+ 0,111,255,
+ 0,115,255,
+ 0,119,255,
+ 0,123,255,
+ 0,127,255,
+ 0,131,255,
+ 0,135,255,
+ 0,139,255,
+ 0,143,255,
+ 0,147,255,
+ 0,151,255,
+ 0,155,255,
+ 0,159,255,
+ 0,163,255,
+ 0,167,255,
+ 0,171,255,
+ 0,175,255,
+ 0,179,255,
+ 0,183,255,
+ 0,187,255,
+ 0,191,255,
+ 0,195,255,
+ 0,199,255,
+ 0,203,255,
+ 0,207,255,
+ 0,211,255,
+ 0,215,255,
+ 0,219,255,
+ 0,223,255,
+ 0,227,255,
+ 0,231,255,
+ 0,235,255,
+ 0,239,255,
+ 0,243,255,
+ 0,247,255,
+ 0,251,255,
+ 0,255,255,
+ 0,255,255,
+ 3,255,251,
+ 7,255,247,
+ 11,255,243,
+ 15,255,239,
+ 19,255,235,
+ 23,255,231,
+ 27,255,227,
+ 31,255,223,
+ 35,255,219,
+ 39,255,215,
+ 43,255,211,
+ 47,255,207,
+ 51,255,203,
+ 55,255,199,
+ 59,255,195,
+ 63,255,191,
+ 67,255,187,
+ 71,255,183,
+ 75,255,179,
+ 79,255,175,
+ 83,255,171,
+ 87,255,167,
+ 91,255,163,
+ 95,255,159,
+ 99,255,155,
+ 103,255,151,
+ 107,255,147,
+ 111,255,143,
+ 115,255,139,
+ 119,255,135,
+ 123,255,131,
+ 127,255,127,
+ 131,255,123,
+ 135,255,119,
+ 139,255,115,
+ 143,255,111,
+ 147,255,107,
+ 151,255,103,
+ 155,255,99,
+ 159,255,95,
+ 163,255,91,
+ 167,255,87,
+ 171,255,83,
+ 175,255,79,
+ 179,255,75,
+ 183,255,71,
+ 187,255,67,
+ 191,255,63,
+ 195,255,59,
+ 199,255,55,
+ 203,255,51,
+ 207,255,47,
+ 211,255,43,
+ 215,255,39,
+ 219,255,35,
+ 223,255,31,
+ 227,255,27,
+ 231,255,23,
+ 235,255,19,
+ 239,255,15,
+ 243,255,11,
+ 247,255,7,
+ 251,255,3,
+ 255,255,0,
+ 255,251,0,
+ 255,247,0,
+ 255,243,0,
+ 255,239,0,
+ 255,235,0,
+ 255,231,0,
+ 255,227,0,
+ 255,223,0,
+ 255,219,0,
+ 255,215,0,
+ 255,211,0,
+ 255,207,0,
+ 255,203,0,
+ 255,199,0,
+ 255,195,0,
+ 255,191,0,
+ 255,187,0,
+ 255,183,0,
+ 255,179,0,
+ 255,175,0,
+ 255,171,0,
+ 255,167,0,
+ 255,163,0,
+ 255,159,0,
+ 255,155,0,
+ 255,151,0,
+ 255,147,0,
+ 255,143,0,
+ 255,139,0,
+ 255,135,0,
+ 255,131,0,
+ 255,127,0,
+ 255,123,0,
+ 255,119,0,
+ 255,115,0,
+ 255,111,0,
+ 255,107,0,
+ 255,103,0,
+ 255,99,0,
+ 255,95,0,
+ 255,91,0,
+ 255,87,0,
+ 255,83,0,
+ 255,79,0,
+ 255,75,0,
+ 255,71,0,
+ 255,67,0,
+ 255,63,0,
+ 255,59,0,
+ 255,55,0,
+ 255,51,0,
+ 255,47,0,
+ 255,43,0,
+ 255,39,0,
+ 255,35,0,
+ 255,31,0,
+ 255,27,0,
+ 255,23,0,
+ 255,19,0,
+ 255,15,0,
+ 255,11,0,
+ 255,7,0,
+ 255,3,0,
+ 255,0,0,
+ 250,0,0,
+ 246,0,0,
+ 241,0,0,
+ 237,0,0,
+ 233,0,0,
+ 228,0,0,
+ 224,0,0,
+ 219,0,0,
+ 215,0,0,
+ 211,0,0,
+ 206,0,0,
+ 202,0,0,
+ 197,0,0,
+ 193,0,0,
+ 189,0,0,
+ 184,0,0,
+ 180,0,0,
+ 175,0,0,
+ 171,0,0,
+ 167,0,0,
+ 162,0,0,
+ 158,0,0,
+ 153,0,0,
+ 149,0,0,
+ 145,0,0,
+ 140,0,0,
+ 136,0,0,
+ 131,0,0,
+ 127,0,0
};
+/* clang-format on */
+
+
+
+
+
+
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 0b895a3..e165b54 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -40,6 +40,17 @@ if (BUILD_SHARED_LIBS)
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5)
+ else ()
+ clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5-shared)
+ endif ()
+endif ()
+
#-- Add h52gif program
set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c
@@ -71,6 +82,17 @@ if (BUILD_SHARED_LIBS)
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif)
+ else ()
+ clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif-shared)
+ endif ()
+endif ()
+
if (BUILD_TESTING AND HDF5_TEST_SERIAL)
# --------------------------------------------------------------------
# This executable can generate the actual test files - Currently not
@@ -84,6 +106,13 @@ if (BUILD_TESTING AND HDF5_TEST_SERIAL)
target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_hl_h52gifgentest_FORMAT hl_h52gifgentest)
+ endif ()
+
# add_test (NAME hl_h52gifgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_h52gifgentest>)
endif ()
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index c5ad976..7e04329 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5watch-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch)
+ else ()
+ clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch-shared)
+ endif ()
+endif ()
+
if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
#-- Add swmr_check_compat_vfd program
set (hl_swmr_check_compat_vfd_SOURCES
@@ -45,6 +56,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
endif ()
set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_H5WATCH_hl_swmr_check_compat_vfd_FORMAT hl_swmr_check_compat_vfd)
+ endif ()
+
#-- Add extend_dset program
set (extend_dset_SOURCES
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
@@ -61,6 +79,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
endif ()
set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_H5WATCH_extend_dset_FORMAT extend_dset)
+ endif ()
+
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
target_compile_options(h5watchgentest PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -73,6 +98,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL)
endif ()
set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_HL_TOOLS_H5WATCH_h5watchgentest_FORMAT h5watchgentest)
+ endif ()
+
if (HDF5_TEST_TOOLS)
include (CMakeTests.cmake)
endif ()
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index 3f71122..5e21488 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -45,6 +45,7 @@ set (HDF5_JAVA_JNI_CHDRS
${HDF5_JAVA_JNI_SOURCE_DIR}/h5fImp.h
${HDF5_JAVA_JNI_SOURCE_DIR}/h5gImp.h
${HDF5_JAVA_JNI_SOURCE_DIR}/h5iImp.h
+ ${HDF5_JAVA_JNI_SOURCE_DIR}/h5Imp.h
${HDF5_JAVA_JNI_SOURCE_DIR}/h5jni.h
${HDF5_JAVA_JNI_SOURCE_DIR}/h5lImp.h
${HDF5_JAVA_JNI_SOURCE_DIR}/h5oImp.h
@@ -87,6 +88,13 @@ SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF
H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA")
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_JNI_SRC_FORMAT ${HDF5_JAVA_JNI_LIB_TARGET})
+endif ()
+
+#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
diff --git a/java/src/jni/h5Constants.c b/java/src/jni/h5Constants.c
index a0ca4b6..c07a54b 100644
--- a/java/src/jni/h5Constants.c
+++ b/java/src/jni/h5Constants.c
@@ -26,8 +26,8 @@ extern "C" {
#include <stdlib.h>
#include "h5jni.h"
-H5_GCC_DIAG_OFF(missing-prototypes)
-H5_GCC_DIAG_OFF(unused-parameter)
+H5_GCC_DIAG_OFF("missing-prototypes")
+H5_GCC_DIAG_OFF("unused-parameter")
JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5_1QUARTER_1HADDR_1MAX(JNIEnv *env, jclass cls) { return (hsize_t)HADDR_MAX/4; }
@@ -365,7 +365,7 @@ JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5ES_1STATUS_1CANCELED(JNIEnv *env, jclass cls) { return H5ES_STATUS_CANCELED; }
/* Java does not have unsigned native types */
-H5_GCC_DIAG_OFF(sign-conversion)
+H5_GCC_DIAG_OFF("sign-conversion")
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1CREAT(JNIEnv *env, jclass cls) { return H5F_ACC_CREAT; }
JNIEXPORT jint JNICALL
@@ -382,7 +382,7 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1READ(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_READ; }
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1ACC_1SWMR_1WRITE(JNIEnv *env, jclass cls) { return H5F_ACC_SWMR_WRITE; }
-H5_GCC_DIAG_ON(sign-conversion)
+H5_GCC_DIAG_ON("sign-conversion")
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5F_1CLOSE_1DEFAULT(JNIEnv *env, jclass cls) { return H5F_CLOSE_DEFAULT; }
@@ -1408,8 +1408,8 @@ Java_hdf_hdf5lib_HDF5Constants_H5Z_1SCALEOFFSET_1USER_1NPARMS(JNIEnv *env, jclas
JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_HDF5Constants_H5Z_1FILTER_1ALL(JNIEnv *env, jclass cls) { return H5Z_FILTER_ALL; }
-H5_GCC_DIAG_ON(missing-prototypes)
-H5_GCC_DIAG_ON(unused-parameter)
+H5_GCC_DIAG_ON("missing-prototypes")
+H5_GCC_DIAG_ON("unused-parameter")
#ifdef __cplusplus
} /* end extern "C" */
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 70fbdc4..e9a08ab 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -46,6 +46,16 @@ New Features
Configuration:
-------------
+
+ - Added CMake option to format source files
+
+ HDF5_ENABLE_FORMATTERS option will enable creation of targets using the
+ pattern - HDF5_*_SRC_FORMAT - where * corresponds to the source folder
+ or tool folder. All sources can be formatted by executing the format target;
+ make format
+
+ (ADB - 2020/09/24)
+
- CMake option to link the generated Fortran MOD files into the include
directory.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 022e5a3..1458665 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -713,6 +713,44 @@ set (H5Z_HDRS
)
IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SOURCES}" )
+set (H5_MODULE_HEADERS
+ ${HDF5_SRC_DIR}/H5Amodule.h
+ ${HDF5_SRC_DIR}/H5ACmodule.h
+ ${HDF5_SRC_DIR}/H5Bmodule.h
+ ${HDF5_SRC_DIR}/H5B2module.h
+ ${HDF5_SRC_DIR}/H5Cmodule.h
+ ${HDF5_SRC_DIR}/H5CXmodule.h
+ ${HDF5_SRC_DIR}/H5Dmodule.h
+ ${HDF5_SRC_DIR}/H5Emodule.h
+ ${HDF5_SRC_DIR}/H5EAmodule.h
+ ${HDF5_SRC_DIR}/H5Fmodule.h
+ ${HDF5_SRC_DIR}/H5FAmodule.h
+ ${HDF5_SRC_DIR}/H5FDdrvr_module.h
+ ${HDF5_SRC_DIR}/H5FDmodule.h
+ ${HDF5_SRC_DIR}/H5FLmodule.h
+ ${HDF5_SRC_DIR}/H5FSmodule.h
+ ${HDF5_SRC_DIR}/H5Gmodule.h
+ ${HDF5_SRC_DIR}/H5HFmodule.h
+ ${HDF5_SRC_DIR}/H5HGmodule.h
+ ${HDF5_SRC_DIR}/H5HLmodule.h
+ ${HDF5_SRC_DIR}/H5Imodule.h
+ ${HDF5_SRC_DIR}/H5Lmodule.h
+ ${HDF5_SRC_DIR}/H5Mmodule.h
+ ${HDF5_SRC_DIR}/H5MFmodule.h
+ ${HDF5_SRC_DIR}/H5MPmodule.h
+ ${HDF5_SRC_DIR}/H5Omodule.h
+ ${HDF5_SRC_DIR}/H5Pmodule.h
+ ${HDF5_SRC_DIR}/H5PBmodule.h
+ ${HDF5_SRC_DIR}/H5PLmodule.h
+ ${HDF5_SRC_DIR}/H5Rmodule.h
+ ${HDF5_SRC_DIR}/H5Smodule.h
+ ${HDF5_SRC_DIR}/H5SLmodule.h
+ ${HDF5_SRC_DIR}/H5SMmodule.h
+ ${HDF5_SRC_DIR}/H5Tmodule.h
+ ${HDF5_SRC_DIR}/H5VLmodule.h
+ ${HDF5_SRC_DIR}/H5Zmodule.h
+)
+
set (common_SRCS
${H5_SOURCES}
${H5A_SOURCES}
@@ -873,6 +911,7 @@ set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5Mpkg.h
${HDF5_SRC_DIR}/H5Mprivate.h
+ ${HDF5_SRC_DIR}/H5MFpkg.h
${HDF5_SRC_DIR}/H5MFprivate.h
${HDF5_SRC_DIR}/H5MMprivate.h
@@ -1092,6 +1131,13 @@ else ()
endif ()
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_SRC_DETECT_FORMAT ${HDF5_SRC_DIR}/H5detect.c)
+endif ()
+
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
target_include_directories (H5make_libsettings PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_EXTRA_FLAGS})
@@ -1101,6 +1147,13 @@ target_link_libraries (H5make_libsettings
PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_SRC_LIBSETTINGS_FORMAT H5make_libsettings)
+endif ()
+
add_custom_command (
OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c
${HDF5_BINARY_DIR}/gen_SRCS.stamp2
@@ -1137,7 +1190,7 @@ if (NOT ONLY_SHARED_LIBS)
set (gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIB_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/gen_SRCS.stamp2)
- add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
+ add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>;$<BUILD_INTERFACE:${HDF5_BINARY_DIR}>"
@@ -1173,7 +1226,7 @@ if (BUILD_SHARED_LIBS)
set (shared_gen_SRCS ${HDF5_GENERATED_SOURCE_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
add_custom_target (gen_${HDF5_LIBSH_TARGET} ALL DEPENDS ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp1 ${HDF5_GENERATED_SOURCE_DIR}/shared/shared_gen_SRCS.stamp2)
- add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
+ add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS} ${H5_MODULE_HEADERS})
target_include_directories (${HDF5_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
PUBLIC "$<$<BOOL:${HDF5_ENABLE_HDFS}>:${HDFS_INCLUDE_DIR}>"
@@ -1204,6 +1257,17 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_SRC_FORMAT ${HDF5_LIB_TARGET})
+ else ()
+ clang_format (HDF5_SRC_FORMAT ${HDF5_LIBSH_TARGET})
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index f6c3d6b..d3f037c 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -13,12 +13,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5ACprivate.h
- * Jul 9 1997
- * Robb Matzke
+ * Created: H5ACprivate.h
+ * Jul 9 1997
+ * Robb Matzke
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
*-------------------------------------------------------------------------
*/
@@ -26,14 +26,14 @@
#ifndef _H5ACprivate_H
#define _H5ACprivate_H
-#include "H5ACpublic.h" /*public prototypes */
+#include "H5ACpublic.h" /*public prototypes */
/* Pivate headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Cprivate.h" /* Cache */
-#include "H5Fprivate.h" /* File access */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5SLprivate.h" /* Skip lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5Cprivate.h" /* Cache */
+#include "H5Fprivate.h" /* File access */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5SLprivate.h" /* Skip lists */
/* Global metadata tag values */
#define H5AC__INVALID_TAG (haddr_t)0
@@ -75,7 +75,7 @@ typedef enum {
H5AC_DRVRINFO_ID, /* (26) driver info block (supplements superblock) */
H5AC_EPOCH_MARKER_ID, /* (27) epoch marker - always internal to cache */
H5AC_PROXY_ENTRY_ID, /* (28) cache entry proxy */
- H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */
+ H5AC_PREFETCHED_ENTRY_ID, /* (29) prefetched entry - always internal to cache */
H5AC_NTYPES /* Number of types, must be last */
} H5AC_type_t;
@@ -90,29 +90,29 @@ typedef enum {
*
* NOTE: test/cache plays games with the f->shared->cache, and thus
* setting H5AC_DUMP_STATS_ON_CLOSE will generate constant,
- * irrelevant data when run with that test program. See
- * comments on setup_cache() / takedown_cache() in test/cache_common.c.
+ * irrelevant data when run with that test program. See
+ * comments on setup_cache() / takedown_cache() in test/cache_common.c.
* for details.
*
- * If you need to dump stats at file close in test/cache.c,
- * use the dump_stats parameter to takedown_cache(), or call
- * H5C_stats() directly.
- * JRM -- 4/12/15
+ * If you need to dump stats at file close in test/cache.c,
+ * use the dump_stats parameter to takedown_cache(), or call
+ * H5C_stats() directly.
+ * JRM -- 4/12/15
*
* Added the H5AC_DUMP_IMAGE_STATS_ON_CLOSE #define, which works much
* the same way as H5AC_DUMP_STATS_ON_CLOSE. However, the set of stats
* displayed is much smaller, and directed purely at the cache image feature.
*
- * JRM -- 11/1/15
+ * JRM -- 11/1/15
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0
#else /* H5C_COLLECT_CACHE_STATS */
-#define H5AC_DUMP_STATS_ON_CLOSE 0
+#define H5AC_DUMP_STATS_ON_CLOSE 0
#define H5AC_DUMP_IMAGE_STATS_ON_CLOSE 0
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -121,8 +121,8 @@ typedef enum {
* At present, these are the same as those given in H5Cprivate.h.
*/
-#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
-#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
+#define H5AC__DEFAULT_MAX_CACHE_SIZE H5C__DEFAULT_MAX_CACHE_SIZE
+#define H5AC__DEFAULT_MIN_CLEAN_SIZE H5C__DEFAULT_MIN_CLEAN_SIZE
/* Check if we are sanity checking tagging */
#if H5C_DO_TAGGING_SANITY_CHECKS
@@ -132,18 +132,18 @@ typedef enum {
#endif
/*
- * Class methods pertaining to caching. Each type of cached object will
+ * Class methods pertaining to caching. Each type of cached object will
* have a constant variable with permanent life-span that describes how
* to cache the object.
*/
-#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
-#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
+#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
+#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
/* Cork actions: cork/uncork/get cork status of an object */
-#define H5AC__SET_CORK H5C__SET_CORK
-#define H5AC__UNCORK H5C__UNCORK
-#define H5AC__GET_CORKED H5C__GET_CORKED
+#define H5AC__SET_CORK H5C__SET_CORK
+#define H5AC__UNCORK H5C__UNCORK
+#define H5AC__GET_CORKED H5C__GET_CORKED
/* Aliases for the "ring" type and values */
typedef H5C_ring_t H5AC_ring_t;
@@ -159,7 +159,7 @@ typedef H5C_ring_t H5AC_ring_t;
typedef H5C_notify_action_t H5AC_notify_action_t;
#define H5AC_NOTIFY_ACTION_AFTER_INSERT H5C_NOTIFY_ACTION_AFTER_INSERT
#define H5AC_NOTIFY_ACTION_AFTER_LOAD H5C_NOTIFY_ACTION_AFTER_LOAD
-#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH
+#define H5AC_NOTIFY_ACTION_AFTER_FLUSH H5C_NOTIFY_ACTION_AFTER_FLUSH
#define H5AC_NOTIFY_ACTION_BEFORE_EVICT H5C_NOTIFY_ACTION_BEFORE_EVICT
#define H5AC_NOTIFY_ACTION_ENTRY_DIRTIED H5C_NOTIFY_ACTION_ENTRY_DIRTIED
#define H5AC_NOTIFY_ACTION_ENTRY_CLEANED H5C_NOTIFY_ACTION_ENTRY_CLEANED
@@ -168,36 +168,36 @@ typedef H5C_notify_action_t H5AC_notify_action_t;
#define H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED H5C_NOTIFY_ACTION_CHILD_UNSERIALIZED
#define H5AC_NOTIFY_ACTION_CHILD_SERIALIZED H5C_NOTIFY_ACTION_CHILD_SERIALIZED
-#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET
+#define H5AC__CLASS_NO_FLAGS_SET H5C__CLASS_NO_FLAGS_SET
#define H5AC__CLASS_SPECULATIVE_LOAD_FLAG H5C__CLASS_SPECULATIVE_LOAD_FLAG
/* The following flags should only appear in test code */
#define H5AC__CLASS_SKIP_READS H5C__CLASS_SKIP_READS
#define H5AC__CLASS_SKIP_WRITES H5C__CLASS_SKIP_WRITES
-typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t;
-typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t;
-typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t;
-typedef H5C_deserialize_func_t H5AC_deserialize_func_t;
-typedef H5C_image_len_func_t H5AC_image_len_func_t;
+typedef H5C_get_initial_load_size_func_t H5AC_get_initial_load_size_func_t;
+typedef H5C_get_final_load_size_func_t H5AC_get_final_load_size_func_t;
+typedef H5C_verify_chksum_func_t H5AC_verify_chksum_func_t;
+typedef H5C_deserialize_func_t H5AC_deserialize_func_t;
+typedef H5C_image_len_func_t H5AC_image_len_func_t;
#define H5AC__SERIALIZE_NO_FLAGS_SET H5C__SERIALIZE_NO_FLAGS_SET
#define H5AC__SERIALIZE_RESIZED_FLAG H5C__SERIALIZE_RESIZED_FLAG
#define H5AC__SERIALIZE_MOVED_FLAG H5C__SERIALIZE_MOVED_FLAG
-typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t;
-typedef H5C_serialize_func_t H5AC_serialize_func_t;
-typedef H5C_notify_func_t H5AC_notify_func_t;
-typedef H5C_free_icr_func_t H5AC_free_icr_func_t;
-typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t;
+typedef H5C_pre_serialize_func_t H5AC_pre_serialize_func_t;
+typedef H5C_serialize_func_t H5AC_serialize_func_t;
+typedef H5C_notify_func_t H5AC_notify_func_t;
+typedef H5C_free_icr_func_t H5AC_free_icr_func_t;
+typedef H5C_get_fsf_size_t H5AC_get_fsf_size_t;
-typedef H5C_class_t H5AC_class_t;
+typedef H5C_class_t H5AC_class_t;
/* Cache entry info */
-typedef H5C_cache_entry_t H5AC_info_t;
+typedef H5C_cache_entry_t H5AC_info_t;
/* Typedef for metadata cache (defined in H5Cpkg.h) */
-typedef H5C_t H5AC_t;
+typedef H5C_t H5AC_t;
/* Metadata cache proxy entry type */
typedef struct H5AC_proxy_entry_t {
@@ -223,6 +223,7 @@ typedef struct H5AC_proxy_entry_t {
#define H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED
+/* clang-format off */
#ifdef H5_HAVE_PARALLEL
#define H5AC__DEFAULT_CACHE_CONFIG \
{ \
@@ -255,9 +256,9 @@ typedef struct H5AC_proxy_entry_t {
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1f, \
- /* size_t dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* size_t dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#else /* H5_HAVE_PARALLEL */
#define H5AC__DEFAULT_CACHE_CONFIG \
@@ -291,9 +292,9 @@ typedef struct H5AC_proxy_entry_t {
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1f, \
- /* size_t dirty_bytes_threshold = */ (256 * 1024), \
- /* int metadata_write_strategy = */ \
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
+ /* size_t dirty_bytes_threshold = */ (256 * 1024), \
+ /* int metadata_write_strategy = */ \
+ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \
}
#endif /* H5_HAVE_PARALLEL */
@@ -304,6 +305,7 @@ typedef struct H5AC_proxy_entry_t {
/* hbool_t save_resize_status = */ FALSE, \
/* int32_t entry_ageout = */ H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE \
}
+/* clang-format on */
/*
* Library prototypes.
*/
@@ -313,21 +315,21 @@ typedef struct H5AC_proxy_entry_t {
* the equivalent flags from H5Cprivate.h.
*/
-#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
-#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
-#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
-#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
-#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
-#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
-#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
-#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
+#define H5AC__NO_FLAGS_SET H5C__NO_FLAGS_SET
+#define H5AC__SET_FLUSH_MARKER_FLAG H5C__SET_FLUSH_MARKER_FLAG
+#define H5AC__DELETED_FLAG H5C__DELETED_FLAG
+#define H5AC__DIRTIED_FLAG H5C__DIRTIED_FLAG
+#define H5AC__PIN_ENTRY_FLAG H5C__PIN_ENTRY_FLAG
+#define H5AC__UNPIN_ENTRY_FLAG H5C__UNPIN_ENTRY_FLAG
+#define H5AC__FLUSH_INVALIDATE_FLAG H5C__FLUSH_INVALIDATE_FLAG
+#define H5AC__FLUSH_CLEAR_ONLY_FLAG H5C__FLUSH_CLEAR_ONLY_FLAG
#define H5AC__FLUSH_MARKED_ENTRIES_FLAG H5C__FLUSH_MARKED_ENTRIES_FLAG
#define H5AC__FLUSH_IGNORE_PROTECTED_FLAG H5C__FLUSH_IGNORE_PROTECTED_FLAG
-#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG
-#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
+#define H5AC__READ_ONLY_FLAG H5C__READ_ONLY_FLAG
+#define H5AC__FREE_FILE_SPACE_FLAG H5C__FREE_FILE_SPACE_FLAG
#define H5AC__TAKE_OWNERSHIP_FLAG H5C__TAKE_OWNERSHIP_FLAG
-#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG
-#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG
+#define H5AC__FLUSH_LAST_FLAG H5C__FLUSH_LAST_FLAG
+#define H5AC__FLUSH_COLLECTIVELY_FLAG H5C__FLUSH_COLLECTIVELY_FLAG
/* #defines of flags used to report entry status in the
diff --git a/src/H5C.c b/src/H5C.c
index fd4386c..b132677 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -19,52 +19,52 @@
*
* Purpose: Functions in this file implement a generic cache for
* things which exist on disk, and which may be
- * unambiguously referenced by their disk addresses.
+ * unambiguously referenced by their disk addresses.
*
* The code in this module was initially written in
- * support of a complete re-write of the metadata cache
- * in H5AC.c However, other uses for the cache code
- * suggested themselves, and thus this file was created
- * in an attempt to support re-use.
+ * support of a complete re-write of the metadata cache
+ * in H5AC.c However, other uses for the cache code
+ * suggested themselves, and thus this file was created
+ * in an attempt to support re-use.
*
- * For a detailed overview of the cache, please see the
- * header comment for H5C_t in H5Cpkg.h.
+ * For a detailed overview of the cache, please see the
+ * header comment for H5C_t in H5Cpkg.h.
*
*-------------------------------------------------------------------------
*/
/**************************************************************************
*
- * To Do:
+ * To Do:
*
- * Code Changes:
+ * Code Changes:
*
- * - Remove extra functionality in H5C__flush_single_entry()?
+ * - Remove extra functionality in H5C__flush_single_entry()?
*
- * - Change protect/unprotect to lock/unlock.
+ * - Change protect/unprotect to lock/unlock.
*
- * - Flush entries in increasing address order in
- * H5C__make_space_in_cache().
+ * - Flush entries in increasing address order in
+ * H5C__make_space_in_cache().
*
- * - Also in H5C__make_space_in_cache(), use high and low water marks
- * to reduce the number of I/O calls.
+ * - Also in H5C__make_space_in_cache(), use high and low water marks
+ * to reduce the number of I/O calls.
*
- * - When flushing, attempt to combine contiguous entries to reduce
- * I/O overhead. Can't do this just yet as some entries are not
- * contiguous. Do this in parallel only or in serial as well?
+ * - When flushing, attempt to combine contiguous entries to reduce
+ * I/O overhead. Can't do this just yet as some entries are not
+ * contiguous. Do this in parallel only or in serial as well?
*
- * - Create MPI type for dirty objects when flushing in parallel.
+ * - Create MPI type for dirty objects when flushing in parallel.
*
- * - Now that TBBT routines aren't used, fix nodes in memory to
+ * - Now that TBBT routines aren't used, fix nodes in memory to
* point directly to the skip list node from the LRU list, eliminating
* skip list lookups when evicting objects from the cache.
*
- * Tests:
+ * Tests:
*
- * - Trim execution time. (This is no longer a major issue with the
- * shift from the TBBT to a hash table for indexing.)
+ * - Trim execution time. (This is no longer a major issue with the
+ * shift from the TBBT to a hash table for indexing.)
*
- * - Add random tests.
+ * - Add random tests.
*
**************************************************************************/
@@ -73,21 +73,21 @@
/****************/
#include "H5Cmodule.h" /* This source code file is part of the H5C module */
-#define H5F_FRIEND /* suppress error about including H5Fpkg */
+#define H5F_FRIEND /* suppress error about including H5Fpkg */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Cpkg.h" /* Cache */
+#include "H5private.h" /* Generic Functions */
+#include "H5Cpkg.h" /* Cache */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fpkg.h" /* Files */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MFprivate.h" /* File memory management */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* Files */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MFprivate.h" /* File memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
@@ -215,21 +215,21 @@ H5FL_DEFINE_STATIC(H5C_t);
H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t);
-
+
/*-------------------------------------------------------------------------
* Function: H5C_create
*
* Purpose: Allocate, initialize, and return the address of a new
- * instance of H5C_t.
+ * instance of H5C_t.
*
- * In general, the max_cache_size parameter must be positive,
- * and the min_clean_size parameter must lie in the closed
- * interval [0, max_cache_size].
+ * In general, the max_cache_size parameter must be positive,
+ * and the min_clean_size parameter must lie in the closed
+ * interval [0, max_cache_size].
*
- * The check_write_permitted parameter must either be NULL,
- * or point to a function of type H5C_write_permitted_func_t.
- * If it is NULL, the cache will use the write_permitted
- * flag to determine whether writes are permitted.
+ * The check_write_permitted parameter must either be NULL,
+ * or point to a function of type H5C_write_permitted_func_t.
+ * If it is NULL, the cache will use the write_permitted
+ * flag to determine whether writes are permitted.
*
* Return: Success: Pointer to the new instance.
*
@@ -241,12 +241,12 @@ H5FL_SEQ_DEFINE_STATIC(H5C_cache_entry_ptr_t);
*-------------------------------------------------------------------------
*/
H5C_t *
-H5C_create(size_t max_cache_size,
- size_t min_clean_size,
- int max_type_id,
+H5C_create(size_t max_cache_size,
+ size_t min_clean_size,
+ int max_type_id,
const H5C_class_t * const * class_table_ptr,
H5C_write_permitted_func_t check_write_permitted,
- hbool_t write_permitted,
+ hbool_t write_permitted,
H5C_log_flush_func_t log_flush,
void * aux_ptr)
{
@@ -270,7 +270,7 @@ H5C_create(size_t max_cache_size,
} /* end for */
if(NULL == (cache_ptr = H5FL_CALLOC(H5C_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
if(NULL == (cache_ptr->slist_ptr = H5SL_create(H5SL_TYPE_HADDR, NULL)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTCREATE, NULL, "can't create skip list")
@@ -282,149 +282,149 @@ H5C_create(size_t max_cache_size,
* the fields.
*/
- cache_ptr->magic = H5C__H5C_T_MAGIC;
+ cache_ptr->magic = H5C__H5C_T_MAGIC;
- cache_ptr->flush_in_progress = FALSE;
+ cache_ptr->flush_in_progress = FALSE;
if(NULL == (cache_ptr->log_info = (H5C_log_info_t *)H5MM_calloc(sizeof(H5C_log_info_t))))
HGOTO_ERROR(H5E_CACHE, H5E_CANTALLOC, NULL, "memory allocation failed")
- cache_ptr->aux_ptr = aux_ptr;
+ cache_ptr->aux_ptr = aux_ptr;
- cache_ptr->max_type_id = max_type_id;
+ cache_ptr->max_type_id = max_type_id;
- cache_ptr->class_table_ptr = class_table_ptr;
+ cache_ptr->class_table_ptr = class_table_ptr;
- cache_ptr->max_cache_size = max_cache_size;
- cache_ptr->min_clean_size = min_clean_size;
+ cache_ptr->max_cache_size = max_cache_size;
+ cache_ptr->min_clean_size = min_clean_size;
- cache_ptr->check_write_permitted = check_write_permitted;
- cache_ptr->write_permitted = write_permitted;
+ cache_ptr->check_write_permitted = check_write_permitted;
+ cache_ptr->write_permitted = write_permitted;
- cache_ptr->log_flush = log_flush;
+ cache_ptr->log_flush = log_flush;
- cache_ptr->evictions_enabled = TRUE;
- cache_ptr->close_warning_received = FALSE;
+ cache_ptr->evictions_enabled = TRUE;
+ cache_ptr->close_warning_received = FALSE;
- cache_ptr->index_len = 0;
- cache_ptr->index_size = (size_t)0;
- cache_ptr->clean_index_size = (size_t)0;
- cache_ptr->dirty_index_size = (size_t)0;
+ cache_ptr->index_len = 0;
+ cache_ptr->index_size = (size_t)0;
+ cache_ptr->clean_index_size = (size_t)0;
+ cache_ptr->dirty_index_size = (size_t)0;
for(i = 0; i < H5C_RING_NTYPES; i++) {
- cache_ptr->index_ring_len[i] = 0;
- cache_ptr->index_ring_size[i] = (size_t)0;
- cache_ptr->clean_index_ring_size[i] = (size_t)0;
- cache_ptr->dirty_index_ring_size[i] = (size_t)0;
+ cache_ptr->index_ring_len[i] = 0;
+ cache_ptr->index_ring_size[i] = (size_t)0;
+ cache_ptr->clean_index_ring_size[i] = (size_t)0;
+ cache_ptr->dirty_index_ring_size[i] = (size_t)0;
- cache_ptr->slist_ring_len[i] = 0;
- cache_ptr->slist_ring_size[i] = (size_t)0;
+ cache_ptr->slist_ring_len[i] = 0;
+ cache_ptr->slist_ring_size[i] = (size_t)0;
} /* end for */
for(i = 0; i < H5C__HASH_TABLE_LEN; i++)
(cache_ptr->index)[i] = NULL;
- cache_ptr->il_len = 0;
- cache_ptr->il_size = (size_t)0;
- cache_ptr->il_head = NULL;
- cache_ptr->il_tail = NULL;
+ cache_ptr->il_len = 0;
+ cache_ptr->il_size = (size_t)0;
+ cache_ptr->il_head = NULL;
+ cache_ptr->il_tail = NULL;
/* Tagging Field Initializations */
cache_ptr->ignore_tags = FALSE;
cache_ptr->num_objs_corked = 0;
- cache_ptr->slist_changed = FALSE;
- cache_ptr->slist_len = 0;
- cache_ptr->slist_size = (size_t)0;
+ cache_ptr->slist_changed = FALSE;
+ cache_ptr->slist_len = 0;
+ cache_ptr->slist_size = (size_t)0;
#if H5C_DO_SANITY_CHECKS
- cache_ptr->slist_len_increase = 0;
- cache_ptr->slist_size_increase = 0;
+ cache_ptr->slist_len_increase = 0;
+ cache_ptr->slist_size_increase = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- cache_ptr->entries_removed_counter = 0;
- cache_ptr->last_entry_removed_ptr = NULL;
+ cache_ptr->entries_removed_counter = 0;
+ cache_ptr->last_entry_removed_ptr = NULL;
cache_ptr->entry_watched_for_removal = NULL;
- cache_ptr->pl_len = 0;
- cache_ptr->pl_size = (size_t)0;
- cache_ptr->pl_head_ptr = NULL;
- cache_ptr->pl_tail_ptr = NULL;
+ cache_ptr->pl_len = 0;
+ cache_ptr->pl_size = (size_t)0;
+ cache_ptr->pl_head_ptr = NULL;
+ cache_ptr->pl_tail_ptr = NULL;
- cache_ptr->pel_len = 0;
- cache_ptr->pel_size = (size_t)0;
- cache_ptr->pel_head_ptr = NULL;
- cache_ptr->pel_tail_ptr = NULL;
+ cache_ptr->pel_len = 0;
+ cache_ptr->pel_size = (size_t)0;
+ cache_ptr->pel_head_ptr = NULL;
+ cache_ptr->pel_tail_ptr = NULL;
- cache_ptr->LRU_list_len = 0;
- cache_ptr->LRU_list_size = (size_t)0;
- cache_ptr->LRU_head_ptr = NULL;
- cache_ptr->LRU_tail_ptr = NULL;
+ cache_ptr->LRU_list_len = 0;
+ cache_ptr->LRU_list_size = (size_t)0;
+ cache_ptr->LRU_head_ptr = NULL;
+ cache_ptr->LRU_tail_ptr = NULL;
#ifdef H5_HAVE_PARALLEL
- cache_ptr->coll_list_len = 0;
- cache_ptr->coll_list_size = (size_t)0;
- cache_ptr->coll_head_ptr = NULL;
- cache_ptr->coll_tail_ptr = NULL;
- cache_ptr->coll_write_list = NULL;
+ cache_ptr->coll_list_len = 0;
+ cache_ptr->coll_list_size = (size_t)0;
+ cache_ptr->coll_head_ptr = NULL;
+ cache_ptr->coll_tail_ptr = NULL;
+ cache_ptr->coll_write_list = NULL;
#endif /* H5_HAVE_PARALLEL */
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- cache_ptr->cLRU_list_len = 0;
- cache_ptr->cLRU_list_size = (size_t)0;
- cache_ptr->cLRU_head_ptr = NULL;
- cache_ptr->cLRU_tail_ptr = NULL;
-
- cache_ptr->dLRU_list_len = 0;
- cache_ptr->dLRU_list_size = (size_t)0;
- cache_ptr->dLRU_head_ptr = NULL;
- cache_ptr->dLRU_tail_ptr = NULL;
+ cache_ptr->cLRU_list_len = 0;
+ cache_ptr->cLRU_list_size = (size_t)0;
+ cache_ptr->cLRU_head_ptr = NULL;
+ cache_ptr->cLRU_tail_ptr = NULL;
+
+ cache_ptr->dLRU_list_len = 0;
+ cache_ptr->dLRU_list_size = (size_t)0;
+ cache_ptr->dLRU_head_ptr = NULL;
+ cache_ptr->dLRU_tail_ptr = NULL;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
- cache_ptr->size_increase_possible = FALSE;
+ cache_ptr->size_increase_possible = FALSE;
cache_ptr->flash_size_increase_possible = FALSE;
cache_ptr->flash_size_increase_threshold = 0;
- cache_ptr->size_decrease_possible = FALSE;
- cache_ptr->resize_enabled = FALSE;
- cache_ptr->cache_full = FALSE;
- cache_ptr->size_decreased = FALSE;
- cache_ptr->resize_in_progress = FALSE;
- cache_ptr->msic_in_progress = FALSE;
-
- (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
- (cache_ptr->resize_ctl).rpt_fcn = NULL;
- (cache_ptr->resize_ctl).set_initial_size = FALSE;
- (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
- (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
- (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
- (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
- (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
-
- (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
- (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
- (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
- (cache_ptr->resize_ctl).apply_max_increment = TRUE;
- (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
+ cache_ptr->size_decrease_possible = FALSE;
+ cache_ptr->resize_enabled = FALSE;
+ cache_ptr->cache_full = FALSE;
+ cache_ptr->size_decreased = FALSE;
+ cache_ptr->resize_in_progress = FALSE;
+ cache_ptr->msic_in_progress = FALSE;
+
+ (cache_ptr->resize_ctl).version = H5C__CURR_AUTO_SIZE_CTL_VER;
+ (cache_ptr->resize_ctl).rpt_fcn = NULL;
+ (cache_ptr->resize_ctl).set_initial_size = FALSE;
+ (cache_ptr->resize_ctl).initial_size = H5C__DEF_AR_INIT_SIZE;
+ (cache_ptr->resize_ctl).min_clean_fraction = H5C__DEF_AR_MIN_CLEAN_FRAC;
+ (cache_ptr->resize_ctl).max_size = H5C__DEF_AR_MAX_SIZE;
+ (cache_ptr->resize_ctl).min_size = H5C__DEF_AR_MIN_SIZE;
+ (cache_ptr->resize_ctl).epoch_length = H5C__DEF_AR_EPOCH_LENGTH;
+
+ (cache_ptr->resize_ctl).incr_mode = H5C_incr__off;
+ (cache_ptr->resize_ctl).lower_hr_threshold = H5C__DEF_AR_LOWER_THRESHHOLD;
+ (cache_ptr->resize_ctl).increment = H5C__DEF_AR_INCREMENT;
+ (cache_ptr->resize_ctl).apply_max_increment = TRUE;
+ (cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;
(cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
(cache_ptr->resize_ctl).flash_multiple = (double)1.0f;
(cache_ptr->resize_ctl).flash_threshold = (double)0.25f;
- (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
- (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
- (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
- (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
- (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
+ (cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
+ (cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
+ (cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
+ (cache_ptr->resize_ctl).apply_max_decrement = TRUE;
+ (cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
(cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
(cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
- (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
+ (cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
- cache_ptr->epoch_markers_active = 0;
+ cache_ptr->epoch_markers_active = 0;
/* no need to initialize the ring buffer itself */
- cache_ptr->epoch_marker_ringbuf_first = 1;
- cache_ptr->epoch_marker_ringbuf_last = 0;
- cache_ptr->epoch_marker_ringbuf_size = 0;
+ cache_ptr->epoch_marker_ringbuf_first = 1;
+ cache_ptr->epoch_marker_ringbuf_last = 0;
+ cache_ptr->epoch_marker_ringbuf_size = 0;
/* Initialize all epoch marker entries' fields to zero/FALSE/NULL */
HDmemset(cache_ptr->epoch_markers, 0, sizeof(cache_ptr->epoch_markers));
@@ -432,10 +432,10 @@ H5C_create(size_t max_cache_size,
/* Set non-zero/FALSE/NULL fields for epoch markers */
for ( i = 0; i < H5C__MAX_EPOCH_MARKERS; i++ )
{
- ((cache_ptr->epoch_markers)[i]).magic =
- H5C__H5C_CACHE_ENTRY_T_MAGIC;
- ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
- ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER;
+ ((cache_ptr->epoch_markers)[i]).magic =
+ H5C__H5C_CACHE_ENTRY_T_MAGIC;
+ ((cache_ptr->epoch_markers)[i]).addr = (haddr_t)i;
+ ((cache_ptr->epoch_markers)[i]).type = H5AC_EPOCH_MARKER;
}
/* Initialize cache image generation on file close related fields.
@@ -449,25 +449,25 @@ H5C_create(size_t max_cache_size,
cache_ptr->image_ctl.flags = H5C_CI__ALL_FLAGS;
cache_ptr->serialization_in_progress= FALSE;
- cache_ptr->load_image = FALSE;
+ cache_ptr->load_image = FALSE;
cache_ptr->image_loaded = FALSE;
- cache_ptr->delete_image = FALSE;
- cache_ptr->image_addr = HADDR_UNDEF;
- cache_ptr->image_len = 0;
- cache_ptr->image_data_len = 0;
+ cache_ptr->delete_image = FALSE;
+ cache_ptr->image_addr = HADDR_UNDEF;
+ cache_ptr->image_len = 0;
+ cache_ptr->image_data_len = 0;
- cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
- cache_ptr->entries_relocated_counter = 0;
- cache_ptr->entry_fd_height_change_counter = 0;
+ cache_ptr->entries_loaded_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_relocated_counter = 0;
+ cache_ptr->entry_fd_height_change_counter = 0;
- cache_ptr->num_entries_in_image = 0;
- cache_ptr->image_entries = NULL;
- cache_ptr->image_buffer = NULL;
+ cache_ptr->num_entries_in_image = 0;
+ cache_ptr->image_entries = NULL;
+ cache_ptr->image_buffer = NULL;
/* initialize free space manager related fields: */
- cache_ptr->rdfsm_settled = FALSE;
- cache_ptr->mdfsm_settled = FALSE;
+ cache_ptr->rdfsm_settled = FALSE;
+ cache_ptr->mdfsm_settled = FALSE;
if(H5C_reset_cache_hit_rate_stats(cache_ptr) < 0)
/* this should be impossible... */
@@ -475,7 +475,7 @@ H5C_create(size_t max_cache_size,
H5C_stats__reset(cache_ptr);
- cache_ptr->prefix[0] = '\0'; /* empty string */
+ cache_ptr->prefix[0] = '\0'; /* empty string */
#ifndef NDEBUG
cache_ptr->get_entry_ptr_from_addr_counter = 0;
@@ -504,19 +504,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_create() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_def_auto_resize_rpt_fcn
*
* Purpose: Print results of a automatic cache resize.
*
- * This function should only be used where HDprintf() behaves
- * well -- i.e. not on Windows.
+ * This function should only be used where HDprintf() behaves
+ * well -- i.e. not on Windows.
*
* Return: void
*
* Programmer: John Mainzer
- * 10/27/04
+ * 10/27/04
*
*-------------------------------------------------------------------------
*/
@@ -556,7 +556,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%s cache size increased from (%Zu/%Zu) to (%Zu/%Zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -630,7 +630,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
}
HDfprintf(stdout,
- "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
+ "%s cache size decreased from (%Zu/%Zu) to (%Zu/%Zu).\n",
cache_ptr->prefix,
old_max_cache_size,
old_min_clean_size,
@@ -644,7 +644,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix, hit_rate,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache already at maximum size so no change.\n",
+ "%s cache already at maximum size so no change.\n",
cache_ptr->prefix);
break;
@@ -652,7 +652,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
HDfprintf(stdout,
"%sAuto cache resize -- hit rate (%lf) -- can't decrease.\n",
cache_ptr->prefix, hit_rate);
- HDfprintf(stdout, "%s cache already at minimum size.\n",
+ HDfprintf(stdout, "%s cache already at minimum size.\n",
cache_ptr->prefix);
break;
@@ -676,7 +676,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
cache_ptr->prefix, hit_rate,
(cache_ptr->resize_ctl).lower_hr_threshold);
HDfprintf(stdout,
- "%s cache not full so no increase in size.\n",
+ "%s cache not full so no increase in size.\n",
cache_ptr->prefix);
break;
@@ -690,7 +690,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
} /* H5C_def_auto_resize_rpt_fcn() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__free_tag_list_cb
*
@@ -699,7 +699,7 @@ H5C_def_auto_resize_rpt_fcn(H5C_t * cache_ptr,
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * January 2014
+ * January 2014
*
*-------------------------------------------------------------------------
*/
@@ -718,14 +718,14 @@ H5C__free_tag_list_cb(void *_item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED
FUNC_LEAVE_NOAPI(0)
} /* H5C__free_tag_list_cb() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_prep_for_file_close
*
* Purpose: This function should be called just prior to the cache
- * flushes at file close. There should be no protected
- * entries in the cache at this point.
+ * flushes at file close. There should be no protected
+ * entries in the cache at this point.
*
* Return: Non-negative on success/Negative on failure
*
@@ -739,7 +739,7 @@ H5C_prep_for_file_close(H5F_t *f)
{
H5C_t * cache_ptr;
hbool_t image_generated = FALSE; /* Whether a cache image was generated */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -813,7 +813,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_prep_for_file_close() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_dest
*
@@ -822,12 +822,12 @@ done:
* This function fails if any object are protected since the
* resulting file might not be consistent.
*
- * Note that *cache_ptr has been freed upon successful return.
+ * Note that *cache_ptr has been freed upon successful return.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
@@ -887,7 +887,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_dest() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_evict
*
@@ -896,7 +896,7 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Vailin Choi
- * Dec 2013
+ * Dec 2013
*
*-------------------------------------------------------------------------
*/
@@ -918,13 +918,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_evict() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_expunge_entry
*
* Purpose: Use this function to tell the cache to expunge an entry
- * from the cache without writing it to disk even if it is
- * dirty. The entry may not be either pinned or protected.
+ * from the cache without writing it to disk even if it is
+ * dirty. The entry may not be either pinned or protected.
*
* Return: Non-negative on success/Negative on failure
*
@@ -936,10 +936,10 @@ done:
herr_t
H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, unsigned flags)
{
- H5C_t * cache_ptr;
- H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_t * cache_ptr;
+ H5C_cache_entry_t * entry_ptr = NULL;
unsigned flush_flags = (H5C__FLUSH_INVALIDATE_FLAG | H5C__FLUSH_CLEAR_ONLY_FLAG);
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -994,51 +994,51 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_expunge_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_flush_cache
*
- * Purpose: Flush (and possibly destroy) the entries contained in the
- * specified cache.
+ * Purpose: Flush (and possibly destroy) the entries contained in the
+ * specified cache.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be flushed. However
- * all unprotected entries should be flushed before the
- * function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be flushed. However
+ * all unprotected entries should be flushed before the
+ * function returns failure.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
- * Changes: Modified function to test for slist chamges in
- * pre_serialize and serialize callbacks, and re-start
- * scans through the slist when such changes occur.
+ * Changes: Modified function to test for slist chamges in
+ * pre_serialize and serialize callbacks, and re-start
+ * scans through the slist when such changes occur.
*
- * This has been a potential problem for some time,
- * and there has been code in this function to deal
- * with elements of this issue. However the shift
- * to the V3 cache in combination with the activities
- * of some of the cache clients (in particular the
- * free space manager and the fractal heap) have
- * made this re-work necessary.
+ * This has been a potential problem for some time,
+ * and there has been code in this function to deal
+ * with elements of this issue. However the shift
+ * to the V3 cache in combination with the activities
+ * of some of the cache clients (in particular the
+ * free space manager and the fractal heap) have
+ * made this re-work necessary.
*
- * JRM -- 12/13/14
+ * JRM -- 12/13/14
*
- * Modified function to support rings. Basic idea is that
- * every entry in the cache is assigned to a ring. Entries
- * in the outermost ring are flushed first, followed by
- * those in the next outermost ring, and so on until the
- * innermost ring is flushed. See header comment on
- * H5C_ring_t in H5Cprivate.h for a more detailed
- * discussion.
+ * Modified function to support rings. Basic idea is that
+ * every entry in the cache is assigned to a ring. Entries
+ * in the outermost ring are flushed first, followed by
+ * those in the next outermost ring, and so on until the
+ * innermost ring is flushed. See header comment on
+ * H5C_ring_t in H5Cprivate.h for a more detailed
+ * discussion.
*
- * JRM -- 8/30/15
+ * JRM -- 8/30/15
*
- * Modified function to call the free space manager
- * settling functions.
- * JRM -- 6/9/16
+ * Modified function to call the free space manager
+ * settling functions.
+ * JRM -- 6/9/16
*
*-------------------------------------------------------------------------
*/
@@ -1046,18 +1046,18 @@ herr_t
H5C_flush_cache(H5F_t *f, unsigned flags)
{
#if H5C_DO_SANITY_CHECKS
- int i;
- uint32_t index_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
- uint32_t slist_len = 0;
+ int i;
+ uint32_t index_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
+ uint32_t slist_len = 0;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C_ring_t ring;
+ H5C_ring_t ring;
H5C_t * cache_ptr;
hbool_t destroy;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1082,7 +1082,7 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
clean_index_size += cache_ptr->clean_index_ring_size[i];
dirty_index_size += cache_ptr->dirty_index_ring_size[i];
- slist_len += cache_ptr->slist_ring_len[i];
+ slist_len += cache_ptr->slist_ring_len[i];
slist_size += cache_ptr->slist_ring_size[i];
} /* end for */
@@ -1112,45 +1112,45 @@ H5C_flush_cache(H5F_t *f, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush invalidate failed")
} /* end if */
else {
- /* flush each ring, starting from the outermost ring and
+ /* flush each ring, starting from the outermost ring and
* working inward.
*/
ring = H5C_RING_USER;
- while(ring < H5C_RING_NTYPES) {
+ while(ring < H5C_RING_NTYPES) {
/* Only call the free space manager settle routines when close
* warning has been received.
*/
- if(cache_ptr->close_warning_received) {
- switch(ring) {
- case H5C_RING_USER:
- break;
+ if(cache_ptr->close_warning_received) {
+ switch(ring) {
+ case H5C_RING_USER:
+ break;
- case H5C_RING_RDFSM:
+ case H5C_RING_RDFSM:
/* Settle raw data FSM */
- if(!cache_ptr->rdfsm_settled)
- if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0)
+ if(!cache_ptr->rdfsm_settled)
+ if(H5MF_settle_raw_data_fsm(f, &cache_ptr->rdfsm_settled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "RD FSM settle failed")
- break;
+ break;
- case H5C_RING_MDFSM:
+ case H5C_RING_MDFSM:
/* Settle metadata FSM */
- if(!cache_ptr->mdfsm_settled)
- if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0)
+ if(!cache_ptr->mdfsm_settled)
+ if(H5MF_settle_meta_data_fsm(f, &cache_ptr->mdfsm_settled) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "MD FSM settle failed")
- break;
+ break;
- case H5C_RING_SBE:
- case H5C_RING_SB:
- break;
+ case H5C_RING_SBE:
+ case H5C_RING_SB:
+ break;
- default:
+ default:
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Unknown ring?!?!")
- break;
- } /* end switch */
+ break;
+ } /* end switch */
} /* end if */
- if(H5C__flush_ring(f, ring, flags) < 0)
+ if(H5C__flush_ring(f, ring, flags) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "flush ring failed")
ring++;
} /* end while */
@@ -1162,28 +1162,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_flush_to_min_clean
*
- * Purpose: Flush dirty entries until the caches min clean size is
- * attained.
+ * Purpose: Flush dirty entries until the caches min clean size is
+ * attained.
*
- * This function is used in the implementation of the
- * metadata cache in PHDF5. To avoid "messages from the
- * future", the cache on process 0 can't be allowed to
- * flush entries until the other processes have reached
- * the same point in the calculation. If this constraint
- * is not met, it is possible that the other processes will
- * read metadata generated at a future point in the
- * computation.
+ * This function is used in the implementation of the
+ * metadata cache in PHDF5. To avoid "messages from the
+ * future", the cache on process 0 can't be allowed to
+ * flush entries until the other processes have reached
+ * the same point in the calculation. If this constraint
+ * is not met, it is possible that the other processes will
+ * read metadata generated at a future point in the
+ * computation.
*
*
* Return: Non-negative on success/Negative on failure or if
- * write is not permitted.
+ * write is not permitted.
*
* Programmer: John Mainzer
- * 9/16/05
+ * 9/16/05
*
*-------------------------------------------------------------------------
*/
@@ -1191,8 +1191,8 @@ herr_t
H5C_flush_to_min_clean(H5F_t * f)
{
H5C_t * cache_ptr;
- hbool_t write_permitted;
- herr_t ret_value = SUCCEED;
+ hbool_t write_permitted;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(FAIL)
@@ -1221,7 +1221,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_flush_to_min_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_insert_entry
*
@@ -1229,36 +1229,36 @@ done:
* exist on disk yet, but it must have an address and disk
* space reserved.
*
- * Observe that this function cannot occasion a read.
+ * Observe that this function cannot occasion a read.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
- * 6/2/04
+ * 6/2/04
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_insert_entry(H5F_t * f,
const H5C_class_t * type,
- haddr_t addr,
- void * thing,
+ haddr_t addr,
+ void * thing,
unsigned int flags)
{
H5C_t *cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t insert_pinned;
+ hbool_t insert_pinned;
hbool_t flush_last;
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
#endif /* H5_HAVE_PARALLEL */
hbool_t set_flush_marker;
- hbool_t write_permitted = TRUE;
- size_t empty_space;
+ hbool_t write_permitted = TRUE;
+ size_t empty_space;
H5C_cache_entry_t *entry_ptr = NULL;
H5C_cache_entry_t *test_entry_ptr;
- hbool_t entry_tagged = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t entry_tagged = FALSE;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1373,20 +1373,20 @@ H5C_insert_entry(H5F_t * f,
#endif /* H5_HAVE_PARALLEL */
/* initialize cache image related fields */
- entry_ptr->include_in_image = FALSE;
- entry_ptr->lru_rank = 0;
- entry_ptr->image_dirty = FALSE;
- entry_ptr->fd_parent_count = 0;
- entry_ptr->fd_parent_addrs = NULL;
- entry_ptr->fd_child_count = 0;
- entry_ptr->fd_dirty_child_count = 0;
- entry_ptr->image_fd_height = 0;
- entry_ptr->prefetched = FALSE;
- entry_ptr->prefetch_type_id = 0;
- entry_ptr->age = 0;
+ entry_ptr->include_in_image = FALSE;
+ entry_ptr->lru_rank = 0;
+ entry_ptr->image_dirty = FALSE;
+ entry_ptr->fd_parent_count = 0;
+ entry_ptr->fd_parent_addrs = NULL;
+ entry_ptr->fd_child_count = 0;
+ entry_ptr->fd_dirty_child_count = 0;
+ entry_ptr->image_fd_height = 0;
+ entry_ptr->prefetched = FALSE;
+ entry_ptr->prefetch_type_id = 0;
+ entry_ptr->age = 0;
entry_ptr->prefetched_dirty = FALSE;
#ifndef NDEBUG /* debugging field */
- entry_ptr->serialization_count = 0;
+ entry_ptr->serialization_count = 0;
#endif /* NDEBUG */
entry_ptr->tl_next = NULL;
@@ -1412,11 +1412,11 @@ H5C_insert_entry(H5F_t * f,
if(cache_ptr->evictions_enabled &&
(((cache_ptr->index_size + entry_ptr->size) > cache_ptr->max_cache_size)
- ||
- (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
+ ||
+ (((empty_space + cache_ptr->clean_index_size) < cache_ptr->min_clean_size)))) {
size_t space_needed;
- if(empty_space <= entry_ptr->size)
+ if(empty_space <= entry_ptr->size)
cache_ptr->cache_full = TRUE;
if(cache_ptr->check_write_permitted != NULL) {
@@ -1514,31 +1514,31 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_insert_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_dirty
*
- * Purpose: Mark a pinned or protected entry as dirty. The target entry
- * MUST be either pinned or protected, and MAY be both.
+ * Purpose: Mark a pinned or protected entry as dirty. The target entry
+ * MUST be either pinned or protected, and MAY be both.
*
- * In the protected case, this call is the functional
- * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
- * call.
+ * In the protected case, this call is the functional
+ * equivalent of setting the H5C__DIRTIED_FLAG on an unprotect
+ * call.
*
- * In the pinned but not protected case, if the entry is not
- * already dirty, the function places function marks the entry
- * dirty and places it on the skip list.
+ * In the pinned but not protected case, if the entry is not
+ * already dirty, the function places function marks the entry
+ * dirty and places it on the skip list.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 5/15/06
*
- * JRM -- 11/5/08
- * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
- * update the new clean_index_size and dirty_index_size
- * fields of H5C_t in the case that the entry was clean
- * prior to this call, and is pinned and not protected.
+ * JRM -- 11/5/08
+ * Added call to H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY() to
+ * update the new clean_index_size and dirty_index_size
+ * fields of H5C_t in the case that the entry was clean
+ * prior to this call, and is pinned and not protected.
*
*-------------------------------------------------------------------------
*/
@@ -1559,7 +1559,7 @@ H5C_mark_entry_dirty(void *thing)
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
if ( entry_ptr->is_protected ) {
- HDassert( ! ((entry_ptr)->is_read_only) );
+ HDassert( ! ((entry_ptr)->is_read_only) );
/* set the dirtied flag */
entry_ptr->dirtied = TRUE;
@@ -1574,18 +1574,18 @@ H5C_mark_entry_dirty(void *thing)
}/* end if */
} /* end if */
else if ( entry_ptr->is_pinned ) {
- hbool_t was_clean; /* Whether the entry was previously clean */
- hbool_t image_was_up_to_date;
+ hbool_t was_clean; /* Whether the entry was previously clean */
+ hbool_t image_was_up_to_date;
/* Remember previous dirty status */
- was_clean = !entry_ptr->is_dirty;
+ was_clean = !entry_ptr->is_dirty;
/* Check if image is up to date */
image_was_up_to_date = entry_ptr->image_up_to_date;
/* Mark the entry as dirty if it isn't already */
entry_ptr->is_dirty = TRUE;
- entry_ptr->image_up_to_date = FALSE;
+ entry_ptr->image_up_to_date = FALSE;
/* Modify cache data structures */
if(was_clean)
@@ -1622,15 +1622,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_clean
*
- * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned.
+ * Purpose: Mark a pinned entry as clean. The target entry MUST be pinned.
*
- * If the entry is not
- * already clean, the function places function marks the entry
- * clean and removes it from the skip list.
+ * If the entry is not
+ * already clean, the function places function marks the entry
+ * clean and removes it from the skip list.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1659,7 +1659,7 @@ H5C_mark_entry_clean(void *_thing)
if(entry_ptr->is_protected)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKCLEAN, FAIL, "entry is protected")
else if(entry_ptr->is_pinned) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ hbool_t was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
@@ -1701,12 +1701,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_unserialized
*
- * Purpose: Mark a pinned or protected entry as unserialized. The target
- * entry MUST be either pinned or protected, and MAY be both.
+ * Purpose: Mark a pinned or protected entry as unserialized. The target
+ * entry MUST be either pinned or protected, and MAY be both.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1732,7 +1732,7 @@ H5C_mark_entry_unserialized(void *thing)
/* Reset image_up_to_date */
if(entry->image_up_to_date) {
- entry->image_up_to_date = FALSE;
+ entry->image_up_to_date = FALSE;
if(entry->flush_dep_nparents > 0)
if(H5C__mark_flush_dep_unserialized(entry) < 0)
@@ -1746,12 +1746,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_unserialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_mark_entry_serialized
*
- * Purpose: Mark a pinned entry as serialized. The target entry MUST be
- * pinned.
+ * Purpose: Mark a pinned entry as serialized. The target entry MUST be
+ * pinned.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1778,7 +1778,7 @@ H5C_mark_entry_serialized(void *_thing)
else if(entry->is_pinned) {
/* Check for entry changing status and do notifications, etc. */
if(!entry->image_up_to_date) {
- /* Set the image_up_to_date flag */
+ /* Set the image_up_to_date flag */
entry->image_up_to_date = TRUE;
/* Propagate the serialize up the flush dependency chain, if appropriate */
@@ -1794,7 +1794,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_mark_entry_serialized() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_move_entry
@@ -1810,14 +1810,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_move_entry(H5C_t * cache_ptr,
+H5C_move_entry(H5C_t * cache_ptr,
const H5C_class_t * type,
- haddr_t old_addr,
- haddr_t new_addr)
+ haddr_t old_addr,
+ haddr_t new_addr)
{
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * test_entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * test_entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1887,15 +1887,15 @@ H5C_move_entry(H5C_t * cache_ptr,
entry_ptr->addr = new_addr;
if(!entry_ptr->destroy_in_progress) {
- hbool_t was_dirty; /* Whether the entry was previously dirty */
+ hbool_t was_dirty; /* Whether the entry was previously dirty */
/* Remember previous dirty status */
was_dirty = entry_ptr->is_dirty;
/* Mark the entry as dirty if it isn't already */
- entry_ptr->is_dirty = TRUE;
+ entry_ptr->is_dirty = TRUE;
- /* This shouldn't be needed, but it keeps the test code happy */
+ /* This shouldn't be needed, but it keeps the test code happy */
if(entry_ptr->image_up_to_date) {
entry_ptr->image_up_to_date = FALSE;
if(entry_ptr->flush_dep_nparents > 0)
@@ -1908,7 +1908,7 @@ H5C_move_entry(H5C_t * cache_ptr,
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
/* Skip some actions if we're in the middle of flushing the entry */
- if(!entry_ptr->flush_in_progress) {
+ if(!entry_ptr->flush_in_progress) {
/* Update the replacement policy for the entry */
H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
@@ -1942,15 +1942,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_move_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_resize_entry
*
- * Purpose: Resize a pinned or protected entry.
+ * Purpose: Resize a pinned or protected entry.
*
- * Resizing an entry dirties it, so if the entry is not
- * already dirty, the function places the entry on the
- * skip list.
+ * Resizing an entry dirties it, so if the entry is not
+ * already dirty, the function places the entry on the
+ * skip list.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1989,7 +1989,7 @@ H5C_resize_entry(void *thing, size_t new_size)
/* update for change in entry size if necessary */
if ( entry_ptr->size != new_size ) {
- hbool_t was_clean;
+ hbool_t was_clean;
/* make note of whether the entry was clean to begin with */
was_clean = !entry_ptr->is_dirty;
@@ -2013,7 +2013,7 @@ H5C_resize_entry(void *thing, size_t new_size)
if ( cache_ptr->flash_size_increase_possible ) {
if ( new_size > entry_ptr->size ) {
- size_t size_increase;
+ size_t size_increase;
size_increase = new_size - entry_ptr->size;
@@ -2045,18 +2045,18 @@ H5C_resize_entry(void *thing, size_t new_size)
#endif /* H5_HAVE_PARALLEL */
/* update statistics just before changing the entry size */
- H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size);
+ H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size);
/* update the hash table */
- H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \
+ H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, \
new_size, entry_ptr, was_clean);
/* if the entry is in the skip list, update that too */
if(entry_ptr->in_slist)
- H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size);
+ H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, entry_ptr->size, new_size);
- /* finally, update the entry size proper */
- entry_ptr->size = new_size;
+ /* finally, update the entry size proper */
+ entry_ptr->size = new_size;
if(!entry_ptr->in_slist)
H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
@@ -2090,19 +2090,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_resize_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_pin_protected_entry()
*
- * Purpose: Pin a protected cache entry. The entry must be protected
- * at the time of call, and must be unpinned.
+ * Purpose: Pin a protected cache entry. The entry must be protected
+ * at the time of call, and must be unpinned.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 4/26/06
*
- * Changes: Added extreme sanity checks on entry and exit.
+ * Changes: Added extreme sanity checks on entry and exit.
* JRM -- 4/26/14
*
*-------------------------------------------------------------------------
@@ -2150,21 +2150,21 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_pin_protected_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_protect
*
* Purpose: If the target entry is not in the cache, load it. If
- * necessary, attempt to evict one or more entries to keep
- * the cache within its maximum size.
+ * necessary, attempt to evict one or more entries to keep
+ * the cache within its maximum size.
*
- * Mark the target entry as protected, and return its address
- * to the caller. The caller must call H5C_unprotect() when
- * finished with the entry.
+ * Mark the target entry as protected, and return its address
+ * to the caller. The caller must call H5C_unprotect() when
+ * finished with the entry.
*
- * While it is protected, the entry may not be either evicted
- * or flushed -- nor may it be accessed by another call to
- * H5C_protect. Any attempt to do so will result in a failure.
+ * While it is protected, the entry may not be either evicted
+ * or flushed -- nor may it be accessed by another call to
+ * H5C_protect. Any attempt to do so will result in a failure.
*
* Return: Success: Ptr to the desired entry
* Failure: NULL
@@ -2174,27 +2174,27 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5C_protect(H5F_t * f,
+H5C_protect(H5F_t * f,
const H5C_class_t * type,
- haddr_t addr,
+ haddr_t addr,
void * udata,
- unsigned flags)
+ unsigned flags)
{
- H5C_t * cache_ptr;
+ H5C_t * cache_ptr;
H5AC_ring_t ring = H5C_RING_UNDEFINED;
- hbool_t hit;
- hbool_t have_write_permitted = FALSE;
- hbool_t read_only = FALSE;
+ hbool_t hit;
+ hbool_t have_write_permitted = FALSE;
+ hbool_t read_only = FALSE;
hbool_t flush_last;
#ifdef H5_HAVE_PARALLEL
hbool_t coll_access = FALSE; /* whether access to the cache entry is done collectively */
#endif /* H5_HAVE_PARALLEL */
- hbool_t write_permitted;
+ hbool_t write_permitted;
hbool_t was_loaded = FALSE; /* Whether the entry was loaded as a result of the protect */
- size_t empty_space;
- void * thing;
- H5C_cache_entry_t * entry_ptr;
- void * ret_value = NULL; /* Return value */
+ size_t empty_space;
+ void * thing;
+ H5C_cache_entry_t * entry_ptr;
+ void * ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI(NULL)
@@ -2380,16 +2380,16 @@ H5C_protect(H5F_t * f,
*/
if ( ( cache_ptr->evictions_enabled ) &&
( ( (cache_ptr->index_size + entry_ptr->size) >
- cache_ptr->max_cache_size)
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size )
- )
+ cache_ptr->max_cache_size)
+ ||
+ ( ( empty_space + cache_ptr->clean_index_size ) <
+ cache_ptr->min_clean_size )
+ )
) {
size_t space_needed;
- if(empty_space <= entry_ptr->size)
+ if(empty_space <= entry_ptr->size)
cache_ptr->cache_full = TRUE;
if(cache_ptr->check_write_permitted != NULL) {
@@ -2450,7 +2450,7 @@ H5C_protect(H5F_t * f,
* *******************************************
*
* Set the flush_last field
- * of the newly loaded entry before inserting it into the
+ * of the newly loaded entry before inserting it into the
* index. Must do this, as the index tracked the number of
* entries with the flush_last field set, but assumes that
* the field will not change after insertion into the index.
@@ -2483,24 +2483,24 @@ H5C_protect(H5F_t * f,
HDassert(entry_ptr->type == type);
if(entry_ptr->is_protected) {
- if(read_only && entry_ptr->is_read_only) {
- HDassert(entry_ptr->ro_ref_count > 0);
- (entry_ptr->ro_ref_count)++;
- } /* end if */
+ if(read_only && entry_ptr->is_read_only) {
+ HDassert(entry_ptr->ro_ref_count > 0);
+ (entry_ptr->ro_ref_count)++;
+ } /* end if */
else
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, NULL, "Target already protected & not read only?!?")
} /* end if */
else {
- H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
+ H5C__UPDATE_RP_FOR_PROTECT(cache_ptr, entry_ptr, NULL)
- entry_ptr->is_protected = TRUE;
+ entry_ptr->is_protected = TRUE;
- if ( read_only ) {
- entry_ptr->is_read_only = TRUE;
- entry_ptr->ro_ref_count = 1;
- } /* end if */
+ if ( read_only ) {
+ entry_ptr->is_read_only = TRUE;
+ entry_ptr->ro_ref_count = 1;
+ } /* end if */
- entry_ptr->dirtied = FALSE;
+ entry_ptr->dirtied = FALSE;
} /* end else */
H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit)
@@ -2544,10 +2544,10 @@ H5C_protect(H5F_t * f,
/* check to see if the cache is now oversized due to the cache
* size reduction. If it is, try to evict enough entries to
* bring the cache size down to the current maximum cache size.
- *
- * Also, if the min_clean_size requirement is not met, we
- * should also call H5C__make_space_in_cache() to bring us
- * into complience.
+ *
+ * Also, if the min_clean_size requirement is not met, we
+ * should also call H5C__make_space_in_cache() to bring us
+ * into complience.
*/
if(cache_ptr->index_size >= cache_ptr->max_cache_size)
@@ -2556,11 +2556,11 @@ H5C_protect(H5F_t * f,
empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
if ( ( cache_ptr->index_size > cache_ptr->max_cache_size )
- ||
- ( ( empty_space + cache_ptr->clean_index_size ) <
- cache_ptr->min_clean_size) ) {
+ ||
+ ( ( empty_space + cache_ptr->clean_index_size ) <
+ cache_ptr->min_clean_size) ) {
- if(cache_ptr->index_size > cache_ptr->max_cache_size)
+ if(cache_ptr->index_size > cache_ptr->max_cache_size)
cache_ptr->cache_full = TRUE;
if(H5C__make_space_in_cache(f, (size_t)0, write_permitted) < 0 )
@@ -2602,7 +2602,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_protect() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_reset_cache_hit_rate_stats()
@@ -2618,37 +2618,37 @@ done:
herr_t
H5C_reset_cache_hit_rate_stats(H5C_t * cache_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
if((cache_ptr == NULL) || (cache_ptr->magic != H5C__H5C_T_MAGIC))
HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "bad cache_ptr on entry")
- cache_ptr->cache_hits = 0;
- cache_ptr->cache_accesses = 0;
+ cache_ptr->cache_hits = 0;
+ cache_ptr->cache_accesses = 0;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_reset_cache_hit_rate_stats() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_set_cache_auto_resize_config
*
- * Purpose: Set the cache automatic resize configuration to the
- * provided values if they are in range, and fail if they
- * are not.
+ * Purpose: Set the cache automatic resize configuration to the
+ * provided values if they are in range, and fail if they
+ * are not.
*
- * If the new configuration enables automatic cache resizing,
- * coerce the cache max size and min clean size into agreement
- * with the new policy and re-set the full cache hit rate
- * stats.
+ * If the new configuration enables automatic cache resizing,
+ * coerce the cache max size and min clean size into agreement
+ * with the new policy and re-set the full cache hit rate
+ * stats.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 10/8/04
+ * 10/8/04
*
*-------------------------------------------------------------------------
*/
@@ -2658,7 +2658,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
{
size_t new_max_cache_size;
size_t new_min_clean_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -2742,7 +2742,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
if(config_ptr->max_size == config_ptr->min_size) {
cache_ptr->size_increase_possible = FALSE;
- cache_ptr->flash_size_increase_possible = FALSE;
+ cache_ptr->flash_size_increase_possible = FALSE;
cache_ptr->size_decrease_possible = FALSE;
} /* end if */
@@ -2777,7 +2777,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
/* since new_min_clean_size is of type size_t, we have
*
- * ( 0 <= new_min_clean_size )
+ * ( 0 <= new_min_clean_size )
*
* by definition.
*/
@@ -2837,7 +2837,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_set_cache_auto_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_set_evictions_enabled()
*
@@ -2869,7 +2869,7 @@ H5C_set_evictions_enabled(H5C_t *cache_ptr, hbool_t evictions_enabled)
*/
if((evictions_enabled != TRUE) &&
((cache_ptr->resize_ctl.incr_mode != H5C_incr__off) ||
- (cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
+ (cache_ptr->resize_ctl.decr_mode != H5C_decr__off)))
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't disable evictions when auto resize enabled")
cache_ptr->evictions_enabled = evictions_enabled;
@@ -2878,20 +2878,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_set_evictions_enabled() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unpin_entry()
*
- * Purpose: Unpin a cache entry. The entry can be either protected or
- * unprotected at the time of call, but must be pinned.
+ * Purpose: Unpin a cache entry. The entry can be either protected or
+ * unprotected at the time of call, but must be pinned.
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
* 3/22/06
*
- * Changes: Added extreme sanity checks on entry and exit.
- JRM -- 4/26/14
+ * Changes: Added extreme sanity checks on entry and exit.
+ JRM -- 4/26/14
*
*-------------------------------------------------------------------------
*/
@@ -2933,24 +2933,24 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unpin_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unprotect
*
- * Purpose: Undo an H5C_protect() call -- specifically, mark the
- * entry as unprotected, remove it from the protected list,
- * and give it back to the replacement policy.
+ * Purpose: Undo an H5C_protect() call -- specifically, mark the
+ * entry as unprotected, remove it from the protected list,
+ * and give it back to the replacement policy.
*
- * The TYPE and ADDR arguments must be the same as those in
- * the corresponding call to H5C_protect() and the THING
- * argument must be the value returned by that call to
- * H5C_protect().
+ * The TYPE and ADDR arguments must be the same as those in
+ * the corresponding call to H5C_protect() and the THING
+ * argument must be the value returned by that call to
+ * H5C_protect().
*
* Return: Non-negative on success/Negative on failure
*
- * If the deleted flag is TRUE, simply remove the target entry
- * from the cache, clear it, and free it without writing it to
- * disk.
+ * If the deleted flag is TRUE, simply remove the target entry
+ * from the cache, clear it, and free it without writing it to
+ * disk.
*
* Return: Non-negative on success/Negative on failure
*
@@ -2960,22 +2960,22 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
+H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
{
H5C_t * cache_ptr;
- hbool_t deleted;
- hbool_t dirtied;
+ hbool_t deleted;
+ hbool_t dirtied;
hbool_t set_flush_marker;
- hbool_t pin_entry;
- hbool_t unpin_entry;
- hbool_t free_file_space;
- hbool_t take_ownership;
- hbool_t was_clean;
+ hbool_t pin_entry;
+ hbool_t unpin_entry;
+ hbool_t free_file_space;
+ hbool_t take_ownership;
+ hbool_t was_clean;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_entry = FALSE;
+ hbool_t clear_entry = FALSE;
#endif /* H5_HAVE_PARALLEL */
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * test_entry_ptr;
+ H5C_cache_entry_t * entry_ptr;
+ H5C_cache_entry_t * test_entry_ptr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -3025,14 +3025,14 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
*/
if(entry_ptr->ro_ref_count > 1) {
/* Sanity check */
- HDassert(entry_ptr->is_protected);
+ HDassert(entry_ptr->is_protected);
HDassert(entry_ptr->is_read_only);
- if(dirtied)
+ if(dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
/* Reduce the RO ref count */
- (entry_ptr->ro_ref_count)--;
+ (entry_ptr->ro_ref_count)--;
/* Pin or unpin the entry as requested. */
if(pin_entry) {
@@ -3045,16 +3045,16 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPIN, FAIL, "Can't unpin entry by client")
} /* end if */
} else {
- if(entry_ptr->is_read_only) {
+ if(entry_ptr->is_read_only) {
/* Sanity check */
- HDassert(entry_ptr->ro_ref_count == 1);
+ HDassert(entry_ptr->ro_ref_count == 1);
- if(dirtied)
+ if(dirtied)
HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "Read only entry modified??")
- entry_ptr->is_read_only = FALSE;
- entry_ptr->ro_ref_count = 0;
- } /* end if */
+ entry_ptr->is_read_only = FALSE;
+ entry_ptr->ro_ref_count = 0;
+ } /* end if */
#ifdef H5_HAVE_PARALLEL
/* When the H5C code is used to implement the metadata cache in the
@@ -3088,11 +3088,11 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* Mark the entry as dirty if appropriate */
entry_ptr->is_dirty = (entry_ptr->is_dirty || dirtied);
- if(dirtied)
- if(entry_ptr->image_up_to_date) {
- entry_ptr->image_up_to_date = FALSE;
- if(entry_ptr->flush_dep_nparents > 0)
- if(H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
+ if(dirtied)
+ if(entry_ptr->image_up_to_date) {
+ entry_ptr->image_up_to_date = FALSE;
+ if(entry_ptr->flush_dep_nparents > 0)
+ if(H5C__mark_flush_dep_unserialized(entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTNOTIFY, FAIL, "Can't propagate serialization status to fd parents")
} /* end if */
@@ -3221,7 +3221,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unprotect() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_unsettle_entry_ring
@@ -3265,36 +3265,36 @@ H5C_unsettle_entry_ring(void *_entry)
HDassert(cache->magic == H5C__H5C_T_MAGIC);
switch(entry->ring) {
- case H5C_RING_USER:
+ case H5C_RING_USER:
/* Do nothing */
- break;
-
- case H5C_RING_RDFSM:
- if(cache->rdfsm_settled) {
- if(cache->flush_in_progress || cache->close_warning_received)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle")
- cache->rdfsm_settled = FALSE;
- } /* end if */
- break;
-
- case H5C_RING_MDFSM:
- if(cache->mdfsm_settled) {
- if(cache->flush_in_progress || cache->close_warning_received)
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle")
- cache->mdfsm_settled = FALSE;
- } /* end if */
- break;
-
- default:
- HDassert(FALSE); /* this should be un-reachable */
- break;
+ break;
+
+ case H5C_RING_RDFSM:
+ if(cache->rdfsm_settled) {
+ if(cache->flush_in_progress || cache->close_warning_received)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected rdfsm ring unsettle")
+ cache->rdfsm_settled = FALSE;
+ } /* end if */
+ break;
+
+ case H5C_RING_MDFSM:
+ if(cache->mdfsm_settled) {
+ if(cache->flush_in_progress || cache->close_warning_received)
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "unexpected mdfsm ring unsettle")
+ cache->mdfsm_settled = FALSE;
+ } /* end if */
+ break;
+
+ default:
+ HDassert(FALSE); /* this should be un-reachable */
+ break;
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unsettle_entry_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_unsettle_ring()
*
@@ -3352,24 +3352,24 @@ H5C_unsettle_ring(H5F_t * f, H5C_ring_t ring)
} /* end if */
break;
- default:
- HDassert(FALSE); /* this should be un-reachable */
- break;
+ default:
+ HDassert(FALSE); /* this should be un-reachable */
+ break;
} /* end switch */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_unsettle_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_validate_resize_config()
*
- * Purpose: Run a sanity check on the specified sections of the
- * provided instance of struct H5C_auto_size_ctl_t.
+ * Purpose: Run a sanity check on the specified sections of the
+ * provided instance of struct H5C_auto_size_ctl_t.
*
- * Do nothing and return SUCCEED if no errors are detected,
- * and flag an error and return FAIL otherwise.
+ * Do nothing and return SUCCEED if no errors are detected,
+ * and flag an error and return FAIL otherwise.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3521,15 +3521,15 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_validate_resize_config() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_create_flush_dependency()
*
- * Purpose: Initiates a parent<->child entry flush dependency. The parent
+ * Purpose: Initiates a parent<->child entry flush dependency. The parent
* entry must be pinned or protected at the time of call, and must
* have all dependencies removed before the cache can shut down.
*
- * Note: Flush dependencies in the cache indicate that a child entry
+ * Note: Flush dependencies in the cache indicate that a child entry
* must be flushed to the file before its parent. (This is
* currently used to implement Single-Writer/Multiple-Reader (SWMR)
* I/O access for data structures in the file).
@@ -3548,7 +3548,7 @@ herr_t
H5C_create_flush_dependency(void * parent_thing, void * child_thing)
{
H5C_t * cache_ptr;
- H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent thing's entry */
H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child thing's entry */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3665,11 +3665,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_create_flush_dependency() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C_destroy_flush_dependency()
*
- * Purpose: Terminates a parent<-> child entry flush dependency. The
+ * Purpose: Terminates a parent<-> child entry flush dependency. The
* parent entry must be pinned.
*
* Return: Non-negative on success/Negative on failure
@@ -3683,8 +3683,8 @@ herr_t
H5C_destroy_flush_dependency(void *parent_thing, void * child_thing)
{
H5C_t * cache_ptr;
- H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
- H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
+ H5C_cache_entry_t * parent_entry = (H5C_cache_entry_t *)parent_thing; /* Ptr to parent entry */
+ H5C_cache_entry_t * child_entry = (H5C_cache_entry_t *)child_thing; /* Ptr to child entry */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3782,16 +3782,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_destroy_flush_dependency() */
-
+
/*************************************************************************/
/**************************** Private Functions: *************************/
/*************************************************************************/
-
+
/*-------------------------------------------------------------------------
* Function: H5C__pin_entry_from_client()
*
- * Purpose: Internal routine to pin a cache entry from a client action.
+ * Purpose: Internal routine to pin a cache entry from a client action.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3836,11 +3836,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__pin_entry_from_client() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__unpin_entry_real()
*
- * Purpose: Internal routine to unpin a cache entry.
+ * Purpose: Internal routine to unpin a cache entry.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3882,11 +3882,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__unpin_entry_real() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__unpin_entry_from_client()
*
- * Purpose: Internal routine to unpin a cache entry from a client action.
+ * Purpose: Internal routine to unpin a cache entry from a client action.
*
* Return: Non-negative on success/Negative on failure
*
@@ -3927,18 +3927,18 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5C__auto_adjust_cache_size
+ * Function: H5C__auto_adjust_cache_size
*
- * Purpose: Obtain the current full cache hit rate, and compare it
- * with the hit rate thresholds for modifying cache size.
- * If one of the thresholds has been crossed, adjusts the
- * size of the cache accordingly.
+ * Purpose: Obtain the current full cache hit rate, and compare it
+ * with the hit rate thresholds for modifying cache size.
+ * If one of the thresholds has been crossed, adjusts the
+ * size of the cache accordingly.
*
- * The function then resets the full cache hit rate
- * statistics, and exits.
+ * The function then resets the full cache hit rate
+ * statistics, and exits.
*
* Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
+ * an attempt to flush a protected item.
*
*
* Programmer: John Mainzer, 10/7/04
@@ -3948,16 +3948,16 @@ done:
static herr_t
H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
- hbool_t reentrant_call = FALSE;
- hbool_t inserted_epoch_marker = FALSE;
- size_t new_max_cache_size = 0;
- size_t old_max_cache_size = 0;
- size_t new_min_clean_size = 0;
- size_t old_min_clean_size = 0;
- double hit_rate;
- enum H5C_resize_status status = in_spec; /* will change if needed */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_t * cache_ptr = f->shared->cache;
+ hbool_t reentrant_call = FALSE;
+ hbool_t inserted_epoch_marker = FALSE;
+ size_t new_max_cache_size = 0;
+ size_t old_max_cache_size = 0;
+ size_t new_min_clean_size = 0;
+ size_t old_min_clean_size = 0;
+ double hit_rate;
+ enum H5C_resize_status status = in_spec; /* will change if needed */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4178,9 +4178,9 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
/* new_min_clean_size is of size_t, and thus must be non-negative.
* Hence we have
*
- * ( 0 <= new_min_clean_size ).
+ * ( 0 <= new_min_clean_size ).
*
- * by definition.
+ * by definition.
*/
HDassert( new_min_clean_size <= new_max_cache_size );
HDassert( (cache_ptr->resize_ctl).min_size <= new_max_cache_size );
@@ -4198,8 +4198,8 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
cache_ptr->size_decreased = TRUE;
}
- /* update flash cache size increase fields as appropriate */
- if ( cache_ptr->flash_size_increase_possible ) {
+ /* update flash cache size increase fields as appropriate */
+ if ( cache_ptr->flash_size_increase_possible ) {
switch ( (cache_ptr->resize_ctl).flash_incr_mode )
{
@@ -4247,17 +4247,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__auto_adjust_cache_size() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout
*
* Purpose: Implement the ageout automatic cache size decrement
- * algorithm. Note that while this code evicts aged out
- * entries, the code does not change the maximum cache size.
- * Instead, the function simply computes the new value (if
- * any change is indicated) and reports this value in
- * *new_max_cache_size_ptr.
+ * algorithm. Note that while this code evicts aged out
+ * entries, the code does not change the maximum cache size.
+ * Instead, the function simply computes the new value (if
+ * any change is indicated) and reports this value in
+ * *new_max_cache_size_ptr.
*
* Return: Non-negative on success/Negative on failure or if there was
* an attempt to flush a protected item.
@@ -4272,8 +4272,8 @@ H5C__autoadjust__ageout(H5F_t * f, double hit_rate, enum H5C_resize_status * sta
size_t * new_max_cache_size_ptr, hbool_t write_permitted)
{
H5C_t * cache_ptr = f->shared->cache;
- size_t test_size;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t test_size;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4356,16 +4356,16 @@ done:
} /* H5C__autoadjust__ageout() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__cycle_epoch_marker
*
* Purpose: Remove the oldest epoch marker from the LRU list,
- * and reinsert it at the head of the LRU list. Also
- * remove the epoch marker's index from the head of the
- * ring buffer, and re-insert it at the tail of the ring
- * buffer.
+ * and reinsert it at the head of the LRU list. Also
+ * remove the epoch marker's index from the head of the
+ * ring buffer, and re-insert it at the tail of the ring
+ * buffer.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -4440,37 +4440,37 @@ done:
} /* H5C__autoadjust__ageout__cycle_epoch_marker() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__evict_aged_out_entries
*
* Purpose: Evict clean entries in the cache that haven't
- * been accessed for at least
+ * been accessed for at least
* (cache_ptr->resize_ctl).epochs_before_eviction epochs,
- * and flush dirty entries that haven't been accessed for
- * that amount of time.
+ * and flush dirty entries that haven't been accessed for
+ * that amount of time.
*
- * Depending on configuration, the function will either
- * flush or evict all such entries, or all such entries it
- * encounters until it has freed the maximum amount of space
- * allowed under the maximum decrement.
+ * Depending on configuration, the function will either
+ * flush or evict all such entries, or all such entries it
+ * encounters until it has freed the maximum amount of space
+ * allowed under the maximum decrement.
*
- * If we are running in parallel mode, writes may not be
- * permitted. If so, the function simply skips any dirty
- * entries it may encounter.
+ * If we are running in parallel mode, writes may not be
+ * permitted. If so, the function simply skips any dirty
+ * entries it may encounter.
*
- * The function makes no attempt to maintain the minimum
- * clean size, as there is no guarantee that the cache size
- * will be changed.
+ * The function makes no attempt to maintain the minimum
+ * clean size, as there is no guarantee that the cache size
+ * will be changed.
*
- * If there is no cache size change, the minimum clean size
- * constraint will be met through a combination of clean
- * entries and free space in the cache.
+ * If there is no cache size change, the minimum clean size
+ * constraint will be met through a combination of clean
+ * entries and free space in the cache.
*
- * If there is a cache size reduction, the minimum clean size
- * will be re-calculated, and will be enforced the next time
- * we have to make space in the cache.
+ * If there is a cache size reduction, the minimum clean size
+ * will be re-calculated, and will be enforced the next time
+ * we have to make space in the cache.
*
* Observe that this function cannot occasion a read.
*
@@ -4483,10 +4483,10 @@ done:
static herr_t
H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
- size_t eviction_size_limit;
- size_t bytes_evicted = 0;
- hbool_t prev_is_dirty = FALSE;
+ H5C_t * cache_ptr = f->shared->cache;
+ size_t eviction_size_limit;
+ size_t bytes_evicted = 0;
+ hbool_t prev_is_dirty = FALSE;
hbool_t restart_scan;
H5C_cache_entry_t * entry_ptr;
H5C_cache_entry_t * next_ptr;
@@ -4530,10 +4530,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
HDassert( ! (entry_ptr->is_read_only) );
HDassert( (entry_ptr->ro_ref_count) == 0 );
- next_ptr = entry_ptr->next;
+ next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if(prev_ptr != NULL)
+ if(prev_ptr != NULL)
prev_is_dirty = prev_ptr->is_dirty;
if(entry_ptr->is_dirty ) {
@@ -4578,23 +4578,23 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
if(prev_ptr != NULL) {
if(skipping_entry)
entry_ptr = prev_ptr;
- else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty)
+ else if(restart_scan || (prev_ptr->is_dirty != prev_is_dirty)
|| (prev_ptr->next != next_ptr)
|| (prev_ptr->is_protected)
|| (prev_ptr->is_pinned)) {
/* Something has happened to the LRU -- start over
- * from the tail.
+ * from the tail.
*/
restart_scan = FALSE;
entry_ptr = cache_ptr->LRU_tail_ptr;
- H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
+ H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
} /* end else-if */
else
entry_ptr = prev_ptr;
- } /* end if */
+ } /* end if */
else
- entry_ptr = NULL;
+ entry_ptr = NULL;
} /* end while */
/* for now at least, don't bother to maintain the minimum clean size,
@@ -4642,10 +4642,10 @@ H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *f, hbool_t write_permitte
/* just skip the entry if it is dirty, as we can't do
* anything with it now since we can't write.
- *
- * Since all entries are clean, serialize() will not be called,
- * and thus we needn't test to see if the LRU has been changed
- * out from under us.
+ *
+ * Since all entries are clean, serialize() will not be called,
+ * and thus we needn't test to see if the LRU has been changed
+ * out from under us.
*/
entry_ptr = prev_ptr;
} /* end while */
@@ -4658,14 +4658,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__autoadjust__ageout__evict_aged_out_entries() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__insert_new_marker
*
* Purpose: Find an unused marker cache entry, mark it as used, and
- * insert it at the head of the LRU list. Also add the
- * marker's index in the epoch_markers array.
+ * insert it at the head of the LRU list. Also add the
+ * marker's index in the epoch_markers array.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -4729,13 +4729,13 @@ done:
} /* H5C__autoadjust__ageout__insert_new_marker() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__remove_all_markers
*
* Purpose: Remove all epoch markers from the LRU list and mark them
- * as inactive.
+ * as inactive.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -4804,15 +4804,15 @@ done:
} /* H5C__autoadjust__ageout__remove_all_markers() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__autoadjust__ageout__remove_excess_markers
*
* Purpose: Remove epoch markers from the end of the LRU list and
- * mark them as inactive until the number of active markers
- * equals the the current value of
- * (cache_ptr->resize_ctl).epochs_before_eviction.
+ * mark them as inactive until the number of active markers
+ * equals the the current value of
+ * (cache_ptr->resize_ctl).epochs_before_eviction.
*
* Return: SUCCEED on success/FAIL on failure.
*
@@ -4823,9 +4823,9 @@ done:
static herr_t
H5C__autoadjust__ageout__remove_excess_markers(H5C_t * cache_ptr)
{
- int ring_buf_index;
- int i;
- herr_t ret_value = SUCCEED; /* Return value */
+ int ring_buf_index;
+ int i;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -4882,7 +4882,7 @@ done:
} /* H5C__autoadjust__ageout__remove_excess_markers() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flash_increase_cache_size
@@ -4944,7 +4944,7 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
HDassert( (cache_ptr->max_cache_size - cache_ptr->index_size)
< space_needed );
space_needed -= cache_ptr->max_cache_size -
- cache_ptr->index_size;
+ cache_ptr->index_size;
}
space_needed =
(size_t)(((double)space_needed) *
@@ -5000,9 +5000,9 @@ H5C__flash_increase_cache_size(H5C_t * cache_ptr,
}
/* note that we don't cycle the epoch markers. We can
- * argue either way as to whether we should, but for now
- * we don't.
- */
+ * argue either way as to whether we should, but for now
+ * we don't.
+ */
if ( (cache_ptr->resize_ctl).rpt_fcn != NULL ) {
@@ -5034,45 +5034,45 @@ done:
} /* H5C__flash_increase_cache_size() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_invalidate_cache
*
- * Purpose: Flush and destroy the entries contained in the target
- * cache.
+ * Purpose: Flush and destroy the entries contained in the target
+ * cache.
*
- * If the cache contains protected entries, the function will
- * fail, as protected entries cannot be either flushed or
- * destroyed. However all unprotected entries should be
- * flushed and destroyed before the function returns failure.
+ * If the cache contains protected entries, the function will
+ * fail, as protected entries cannot be either flushed or
+ * destroyed. However all unprotected entries should be
+ * flushed and destroyed before the function returns failure.
*
- * While pinned entries can usually be flushed, they cannot
- * be destroyed. However, they should be unpinned when all
- * the entries that reference them have been destroyed (thus
- * reduding the pinned entry's reference count to 0, allowing
- * it to be unpinned).
+ * While pinned entries can usually be flushed, they cannot
+ * be destroyed. However, they should be unpinned when all
+ * the entries that reference them have been destroyed (thus
+ * reduding the pinned entry's reference count to 0, allowing
+ * it to be unpinned).
*
- * If pinned entries are present, the function makes repeated
- * passes through the cache, flushing all dirty entries
- * (including the pinned dirty entries where permitted) and
- * destroying all unpinned entries. This process is repeated
- * until either the cache is empty, or the number of pinned
- * entries stops decreasing on each pass.
+ * If pinned entries are present, the function makes repeated
+ * passes through the cache, flushing all dirty entries
+ * (including the pinned dirty entries where permitted) and
+ * destroying all unpinned entries. This process is repeated
+ * until either the cache is empty, or the number of pinned
+ * entries stops decreasing on each pass.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 3/24/065
+ * 3/24/065
*
*-------------------------------------------------------------------------
*/
static herr_t
H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
{
- H5C_t * cache_ptr;
- H5C_ring_t ring;
- herr_t ret_value = SUCCEED;
+ H5C_t * cache_ptr;
+ H5C_ring_t ring;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -5085,13 +5085,13 @@ H5C__flush_invalidate_cache(H5F_t *f, unsigned flags)
#if H5C_DO_SANITY_CHECKS
{
- int32_t i;
- uint32_t index_len = 0;
- uint32_t slist_len = 0;
- size_t index_size = (size_t)0;
- size_t clean_index_size = (size_t)0;
- size_t dirty_index_size = (size_t)0;
- size_t slist_size = (size_t)0;
+ int32_t i;
+ uint32_t index_len = 0;
+ uint32_t slist_len = 0;
+ size_t index_size = (size_t)0;
+ size_t clean_index_size = (size_t)0;
+ size_t dirty_index_size = (size_t)0;
+ size_t slist_size = (size_t)0;
HDassert(cache_ptr->index_ring_len[H5C_RING_UNDEFINED] == 0);
HDassert(cache_ptr->index_ring_size[H5C_RING_UNDEFINED] == (size_t)0);
@@ -5175,40 +5175,40 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_invalidate_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_invalidate_ring
*
- * Purpose: Flush and destroy the entries contained in the target
- * cache and ring.
+ * Purpose: Flush and destroy the entries contained in the target
+ * cache and ring.
*
- * If the ring contains protected entries, the function will
- * fail, as protected entries cannot be either flushed or
- * destroyed. However all unprotected entries should be
- * flushed and destroyed before the function returns failure.
+ * If the ring contains protected entries, the function will
+ * fail, as protected entries cannot be either flushed or
+ * destroyed. However all unprotected entries should be
+ * flushed and destroyed before the function returns failure.
*
- * While pinned entries can usually be flushed, they cannot
- * be destroyed. However, they should be unpinned when all
- * the entries that reference them have been destroyed (thus
- * reduding the pinned entry's reference count to 0, allowing
- * it to be unpinned).
+ * While pinned entries can usually be flushed, they cannot
+ * be destroyed. However, they should be unpinned when all
+ * the entries that reference them have been destroyed (thus
+ * reduding the pinned entry's reference count to 0, allowing
+ * it to be unpinned).
*
- * If pinned entries are present, the function makes repeated
- * passes through the cache, flushing all dirty entries
- * (including the pinned dirty entries where permitted) and
- * destroying all unpinned entries. This process is repeated
- * until either the cache is empty, or the number of pinned
- * entries stops decreasing on each pass.
+ * If pinned entries are present, the function makes repeated
+ * passes through the cache, flushing all dirty entries
+ * (including the pinned dirty entries where permitted) and
+ * destroying all unpinned entries. This process is repeated
+ * until either the cache is empty, or the number of pinned
+ * entries stops decreasing on each pass.
*
- * If flush dependencies appear in the target ring, the
- * function makes repeated passes through the cache flushing
- * entries in flush dependency order.
+ * If flush dependencies appear in the target ring, the
+ * function makes repeated passes through the cache flushing
+ * entries in flush dependency order.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 9/1/15
+ * 9/1/15
*
*-------------------------------------------------------------------------
*/
@@ -5625,28 +5625,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_invalidate_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__flush_ring
*
- * Purpose: Flush the entries contained in the specified cache and
- * ring. All entries in rings outside the specified ring
- * must have been flushed on entry.
+ * Purpose: Flush the entries contained in the specified cache and
+ * ring. All entries in rings outside the specified ring
+ * must have been flushed on entry.
*
- * If the cache contains protected entries in the specified
- * ring, the function will fail, as protected entries cannot
- * be flushed. However all unprotected entries in the target
- * ring should be flushed before the function returns failure.
+ * If the cache contains protected entries in the specified
+ * ring, the function will fail, as protected entries cannot
+ * be flushed. However all unprotected entries in the target
+ * ring should be flushed before the function returns failure.
*
- * If flush dependencies appear in the target ring, the
- * function makes repeated passes through the slist flushing
- * entries in flush dependency order.
+ * If flush dependencies appear in the target ring, the
+ * function makes repeated passes through the slist flushing
+ * entries in flush dependency order.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 9/1/15
+ * 9/1/15
*
*-------------------------------------------------------------------------
*/
@@ -5654,21 +5654,21 @@ static herr_t
H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
{
H5C_t * cache_ptr = f->shared->cache;
- hbool_t flushed_entries_last_pass;
- hbool_t flush_marked_entries;
- hbool_t ignore_protected;
- hbool_t tried_to_flush_protected_entry = FALSE;
- hbool_t restart_slist_scan;
- uint32_t protected_entries = 0;
- H5SL_node_t * node_ptr = NULL;
- H5C_cache_entry_t * entry_ptr = NULL;
- H5C_cache_entry_t * next_entry_ptr = NULL;
+ hbool_t flushed_entries_last_pass;
+ hbool_t flush_marked_entries;
+ hbool_t ignore_protected;
+ hbool_t tried_to_flush_protected_entry = FALSE;
+ hbool_t restart_slist_scan;
+ uint32_t protected_entries = 0;
+ H5SL_node_t * node_ptr = NULL;
+ H5C_cache_entry_t * entry_ptr = NULL;
+ H5C_cache_entry_t * next_entry_ptr = NULL;
#if H5C_DO_SANITY_CHECKS
- uint32_t initial_slist_len = 0;
+ uint32_t initial_slist_len = 0;
size_t initial_slist_size = 0;
#endif /* H5C_DO_SANITY_CHECKS */
int i;
- herr_t ret_value = SUCCEED;
+ herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -5691,7 +5691,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
if(!flush_marked_entries)
for(i = (int)H5C_RING_UNDEFINED; i < (int)ring; i++)
- HDassert(cache_ptr->slist_ring_len[i] == 0);
+ HDassert(cache_ptr->slist_ring_len[i] == 0);
HDassert(cache_ptr->flush_in_progress);
@@ -5713,8 +5713,8 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
cache_ptr->slist_changed = FALSE;
while((cache_ptr->slist_ring_len[ring] > 0) &&
- (protected_entries == 0) &&
- (flushed_entries_last_pass)) {
+ (protected_entries == 0) &&
+ (flushed_entries_last_pass)) {
flushed_entries_last_pass = FALSE;
#if H5C_DO_SANITY_CHECKS
@@ -5890,35 +5890,35 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_ring() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_single_entry
*
* Purpose: Flush or clear (and evict if requested) the cache entry
- * with the specified address and type. If the type is NULL,
- * any unprotected entry at the specified address will be
- * flushed (and possibly evicted).
+ * with the specified address and type. If the type is NULL,
+ * any unprotected entry at the specified address will be
+ * flushed (and possibly evicted).
*
- * Attempts to flush a protected entry will result in an
- * error.
+ * Attempts to flush a protected entry will result in an
+ * error.
*
- * If the H5C__FLUSH_INVALIDATE_FLAG flag is set, the entry will
- * be cleared and not flushed, and the call can't be part of a
+ * If the H5C__FLUSH_INVALIDATE_FLAG flag is set, the entry will
+ * be cleared and not flushed, and the call can't be part of a
* sequence of flushes.
*
- * If the caller knows the address of the skip list node at
- * which the target entry resides, it can avoid a lookup
- * by supplying that address in the tgt_node_ptr parameter.
- * If this parameter is NULL, the function will do a skip list
- * search for the entry instead.
+ * If the caller knows the address of the skip list node at
+ * which the target entry resides, it can avoid a lookup
+ * by supplying that address in the tgt_node_ptr parameter.
+ * If this parameter is NULL, the function will do a skip list
+ * search for the entry instead.
*
- * The function does nothing silently if there is no entry
- * at the supplied address, or if the entry found has the
- * wrong type.
+ * The function does nothing silently if there is no entry
+ * at the supplied address, or if the entry found has the
+ * wrong type.
*
* Return: Non-negative on success/Negative on failure or if there was
- * an attempt to flush a protected item.
+ * an attempt to flush a protected item.
*
* Programmer: John Mainzer, 5/5/04
*
@@ -5927,22 +5927,22 @@ done:
herr_t
H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
{
- H5C_t * cache_ptr; /* Cache for file */
- hbool_t destroy; /* external flag */
- hbool_t clear_only; /* external flag */
- hbool_t free_file_space; /* external flag */
- hbool_t take_ownership; /* external flag */
+ H5C_t * cache_ptr; /* Cache for file */
+ hbool_t destroy; /* external flag */
+ hbool_t clear_only; /* external flag */
+ hbool_t free_file_space; /* external flag */
+ hbool_t take_ownership; /* external flag */
hbool_t del_from_slist_on_destroy; /* external flag */
- hbool_t during_flush; /* external flag */
- hbool_t write_entry; /* internal flag */
- hbool_t destroy_entry; /* internal flag */
- hbool_t generate_image; /* internal flag */
- hbool_t update_page_buffer; /* internal flag */
- hbool_t was_dirty;
- hbool_t suppress_image_entry_writes = FALSE;
- hbool_t suppress_image_entry_frees = FALSE;
+ hbool_t during_flush; /* external flag */
+ hbool_t write_entry; /* internal flag */
+ hbool_t destroy_entry; /* internal flag */
+ hbool_t generate_image; /* internal flag */
+ hbool_t update_page_buffer; /* internal flag */
+ hbool_t was_dirty;
+ hbool_t suppress_image_entry_writes = FALSE;
+ hbool_t suppress_image_entry_frees = FALSE;
haddr_t entry_addr = HADDR_UNDEF;
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -6202,9 +6202,9 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
if(H5C__untag_entry(cache_ptr, entry_ptr) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTREMOVE, FAIL, "can't remove entry from tag list")
- /* verify that the entry is no longer part of any flush dependencies */
+ /* verify that the entry is no longer part of any flush dependencies */
HDassert(entry_ptr->flush_dep_nparents == 0);
- HDassert(entry_ptr->flush_dep_nchildren == 0);
+ HDassert(entry_ptr->flush_dep_nchildren == 0);
} /* end if */
else {
HDassert(clear_only || write_entry);
@@ -6217,7 +6217,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* view of the replacement policy and the slist.
* Hence no differentiation between them.
*
- * JRM -- 7/7/07
+ * JRM -- 7/7/07
*/
H5C__UPDATE_RP_FOR_FLUSH(cache_ptr, entry_ptr, FAIL)
@@ -6411,7 +6411,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_single_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__verify_len_eoa
@@ -6438,8 +6438,8 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr,
size_t *len, hbool_t actual)
{
H5FD_mem_t cooked_type; /* Modified type, accounting for switching global heaps */
- haddr_t eoa; /* End-of-allocation in the file */
- herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t eoa; /* End-of-allocation in the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -6453,29 +6453,29 @@ H5C__verify_len_eoa(H5F_t *f, const H5C_class_t *type, haddr_t addr,
/* Get the file's end-of-allocation value */
eoa = H5F_get_eoa(f, cooked_type);
if(!H5F_addr_defined(eoa))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "invalid EOA address for file")
/* Check for bad address in general */
if(H5F_addr_gt(addr, eoa))
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "address of object past end of allocation")
/* Check if the amount of data to read will be past the EOA */
if(H5F_addr_gt((addr + *len), eoa)) {
- if(actual)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA")
- else
- /* Trim down the length of the metadata */
- *len = (size_t)(eoa - addr);
+ if(actual)
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "actual len exceeds EOA")
+ else
+ /* Trim down the length of the metadata */
+ *len = (size_t)(eoa - addr);
} /* end if */
if(*len <= 0)
- HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA")
+ HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "len not positive after adjustment for EOA")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__verify_len_eoa() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__load_entry
@@ -6714,7 +6714,7 @@ H5C__load_entry(H5F_t * f,
*
* In the following assert:
*
- * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
+ * HDassert( ( dirty == FALSE ) || ( type->id == 5 || type->id == 6 ) );
*
* note that type ids 5 & 6 are associated with object headers in the
* metadata cache.
@@ -6734,7 +6734,7 @@ H5C__load_entry(H5F_t * f,
entry->image_ptr = image;
entry->image_up_to_date = !dirty;
entry->type = type;
- entry->is_dirty = dirty;
+ entry->is_dirty = dirty;
entry->dirtied = FALSE;
entry->is_protected = FALSE;
entry->is_read_only = FALSE;
@@ -6762,7 +6762,7 @@ H5C__load_entry(H5F_t * f,
entry->ht_next = NULL;
entry->ht_prev = NULL;
entry->il_next = NULL;
- entry->il_prev = NULL;
+ entry->il_prev = NULL;
entry->next = NULL;
entry->prev = NULL;
@@ -6815,28 +6815,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__load_entry() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__make_space_in_cache
*
* Purpose: Attempt to evict cache entries until the index_size
- * is at least needed_space below max_cache_size.
+ * is at least needed_space below max_cache_size.
*
- * In passing, also attempt to bring cLRU_list_size to a
- * value greater than min_clean_size.
+ * In passing, also attempt to bring cLRU_list_size to a
+ * value greater than min_clean_size.
*
- * Depending on circumstances, both of these goals may
- * be impossible, as in parallel mode, we must avoid generating
- * a write as part of a read (to avoid deadlock in collective
- * I/O), and in all cases, it is possible (though hopefully
- * highly unlikely) that the protected list may exceed the
- * maximum size of the cache.
+ * Depending on circumstances, both of these goals may
+ * be impossible, as in parallel mode, we must avoid generating
+ * a write as part of a read (to avoid deadlock in collective
+ * I/O), and in all cases, it is possible (though hopefully
+ * highly unlikely) that the protected list may exceed the
+ * maximum size of the cache.
*
- * Thus the function simply does its best, returning success
- * unless an error is encountered.
+ * Thus the function simply does its best, returning success
+ * unless an error is encountered.
*
- * Observe that this function cannot occasion a read.
+ * Observe that this function cannot occasion a read.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -6845,26 +6845,26 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
+H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
{
- H5C_t * cache_ptr = f->shared->cache;
+ H5C_t * cache_ptr = f->shared->cache;
#if H5C_COLLECT_CACHE_STATS
int32_t clean_entries_skipped = 0;
int32_t dirty_pf_entries_skipped = 0;
int32_t total_entries_scanned = 0;
#endif /* H5C_COLLECT_CACHE_STATS */
- uint32_t entries_examined = 0;
- uint32_t initial_list_len;
- size_t empty_space;
+ uint32_t entries_examined = 0;
+ uint32_t initial_list_len;
+ size_t empty_space;
hbool_t reentrant_call = FALSE;
- hbool_t prev_is_dirty = FALSE;
+ hbool_t prev_is_dirty = FALSE;
hbool_t didnt_flush_entry = FALSE;
- hbool_t restart_scan;
- H5C_cache_entry_t * entry_ptr;
- H5C_cache_entry_t * prev_ptr;
- H5C_cache_entry_t * next_ptr;
- uint32_t num_corked_entries = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ hbool_t restart_scan;
+ H5C_cache_entry_t * entry_ptr;
+ H5C_cache_entry_t * prev_ptr;
+ H5C_cache_entry_t * next_ptr;
+ uint32_t num_corked_entries = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -6891,47 +6891,47 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
initial_list_len = cache_ptr->LRU_list_len;
entry_ptr = cache_ptr->LRU_tail_ptr;
- if(cache_ptr->index_size >= cache_ptr->max_cache_size)
- empty_space = 0;
- else
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ if(cache_ptr->index_size >= cache_ptr->max_cache_size)
+ empty_space = 0;
+ else
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
while ( ( ( (cache_ptr->index_size + space_needed)
>
cache_ptr->max_cache_size
)
- ||
- (
- ( empty_space + cache_ptr->clean_index_size )
- <
- ( cache_ptr->min_clean_size )
+ ||
+ (
+ ( empty_space + cache_ptr->clean_index_size )
+ <
+ ( cache_ptr->min_clean_size )
)
- )
+ )
&&
( entries_examined <= (2 * initial_list_len) )
&&
( entry_ptr != NULL )
)
{
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert( !(entry_ptr->is_protected) );
HDassert( ! (entry_ptr->is_read_only) );
HDassert( (entry_ptr->ro_ref_count) == 0 );
- next_ptr = entry_ptr->next;
+ next_ptr = entry_ptr->next;
prev_ptr = entry_ptr->prev;
- if(prev_ptr != NULL)
- prev_is_dirty = prev_ptr->is_dirty;
+ if(prev_ptr != NULL)
+ prev_is_dirty = prev_ptr->is_dirty;
- if(entry_ptr->is_dirty &&
+ if(entry_ptr->is_dirty &&
(entry_ptr->tag_info && entry_ptr->tag_info->corked)) {
/* Skip "dirty" corked entries. */
- ++num_corked_entries;
+ ++num_corked_entries;
didnt_flush_entry = TRUE;
- } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) &&
+ } else if ( ( (entry_ptr->type)->id != H5AC_EPOCH_MARKER_ID ) &&
( ! entry_ptr->flush_in_progress ) &&
( ! entry_ptr->prefetched_dirty ) ) {
@@ -6948,7 +6948,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
}
#endif /* H5C_COLLECT_CACHE_STATS */
- /* reset entries_removed_counter and
+ /* reset entries_removed_counter and
* last_entry_removed_ptr prior to the call to
* H5C__flush_single_entry() so that we can spot
* unexpected removals of entries from the cache,
@@ -6962,7 +6962,7 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
if(H5C__flush_single_entry(f, entry_ptr, H5C__NO_FLAGS_SET) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush entry")
- if ( ( cache_ptr->entries_removed_counter > 1 ) ||
+ if ( ( cache_ptr->entries_removed_counter > 1 ) ||
( cache_ptr->last_entry_removed_ptr == prev_ptr ) )
restart_scan = TRUE;
@@ -7004,63 +7004,63 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
}
- if ( prev_ptr != NULL ) {
+ if ( prev_ptr != NULL ) {
- if ( didnt_flush_entry ) {
+ if ( didnt_flush_entry ) {
- /* epoch markers don't get flushed, and we don't touch
+ /* epoch markers don't get flushed, and we don't touch
* entries that are in the process of being flushed.
* Hence no need for sanity checks, as we haven't
* flushed anything. Thus just set entry_ptr to prev_ptr
* and go on.
- */
+ */
entry_ptr = prev_ptr;
- } else if ( ( restart_scan )
+ } else if ( ( restart_scan )
||
( prev_ptr->is_dirty != prev_is_dirty )
- ||
- ( prev_ptr->next != next_ptr )
- ||
- ( prev_ptr->is_protected )
- ||
- ( prev_ptr->is_pinned ) ) {
-
- /* something has happened to the LRU -- start over
- * from the tail.
- */
+ ||
+ ( prev_ptr->next != next_ptr )
+ ||
+ ( prev_ptr->is_protected )
+ ||
+ ( prev_ptr->is_pinned ) ) {
+
+ /* something has happened to the LRU -- start over
+ * from the tail.
+ */
restart_scan = FALSE;
- entry_ptr = cache_ptr->LRU_tail_ptr;
- H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
+ entry_ptr = cache_ptr->LRU_tail_ptr;
+ H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
- } else {
+ } else {
- entry_ptr = prev_ptr;
+ entry_ptr = prev_ptr;
- }
- } else {
+ }
+ } else {
- entry_ptr = NULL;
+ entry_ptr = NULL;
- }
+ }
- entries_examined++;
+ entries_examined++;
- if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
+ if ( cache_ptr->index_size >= cache_ptr->max_cache_size ) {
- empty_space = 0;
+ empty_space = 0;
- } else {
+ } else {
- empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
+ empty_space = cache_ptr->max_cache_size - cache_ptr->index_size;
- }
+ }
- HDassert( cache_ptr->index_size ==
- (cache_ptr->clean_index_size +
- cache_ptr->dirty_index_size) );
+ HDassert( cache_ptr->index_size ==
+ (cache_ptr->clean_index_size +
+ cache_ptr->dirty_index_size) );
- }
+ }
#if H5C_COLLECT_CACHE_STATS
cache_ptr->calls_to_msic++;
@@ -7084,19 +7084,19 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
#endif /* H5C_COLLECT_CACHE_STATS */
- /* NEED: work on a better assert for corked entries */
- HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
- cache_ptr->max_cache_size ) ||
- ( ( cache_ptr->clean_index_size + empty_space )
- >= cache_ptr->min_clean_size ) ||
- ( ( num_corked_entries )));
+ /* NEED: work on a better assert for corked entries */
+ HDassert( ( entries_examined > (2 * initial_list_len) ) ||
+ ( (cache_ptr->pl_size + cache_ptr->pel_size + cache_ptr->min_clean_size) >
+ cache_ptr->max_cache_size ) ||
+ ( ( cache_ptr->clean_index_size + empty_space )
+ >= cache_ptr->min_clean_size ) ||
+ ( ( num_corked_entries )));
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) );
+ ( cache_ptr->cLRU_list_size <= cache_ptr->clean_index_size ) );
HDassert( ( entries_examined > (2 * initial_list_len) ) ||
- ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) );
+ ( cache_ptr->dLRU_list_size <= cache_ptr->dirty_index_size ) );
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
@@ -7136,14 +7136,14 @@ H5C__make_space_in_cache(H5F_t *f, size_t space_needed, hbool_t write_permitted)
} /* end if */
- /* we are scanning the clean LRU, so the serialize function
- * will not be called on any entry -- thus there is no
- * concern about the list being modified out from under
- * this function.
- */
+ /* we are scanning the clean LRU, so the serialize function
+ * will not be called on any entry -- thus there is no
+ * concern about the list being modified out from under
+ * this function.
+ */
entry_ptr = prev_ptr;
- entries_examined++;
+ entries_examined++;
}
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
}
@@ -7158,16 +7158,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__make_space_in_cache() */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_lru_list
*
* Purpose: Debugging function that scans the LRU list for errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -7181,8 +7181,8 @@ H5C__validate_lru_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -7236,7 +7236,7 @@ done:
} /* H5C__validate_lru_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_pinned_entry_list
@@ -7244,9 +7244,9 @@ done:
* Purpose: Debugging function that scans the pinned entry list for
* errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -7260,8 +7260,8 @@ H5C__validate_pinned_entry_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -7320,7 +7320,7 @@ done:
} /* H5C__validate_pinned_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__validate_protected_entry_list
@@ -7328,9 +7328,9 @@ done:
* Purpose: Debugging function that scans the protected entry list for
* errors.
*
- * If an error is detected, the function generates a
- * diagnostic and returns FAIL. If no error is detected,
- * the function returns SUCCEED.
+ * If an error is detected, the function generates a
+ * diagnostic and returns FAIL. If no error is detected,
+ * the function returns SUCCEED.
*
* Return: FAIL if error is detected, SUCCEED otherwise.
*
@@ -7344,8 +7344,8 @@ H5C__validate_protected_entry_list(H5C_t * cache_ptr)
{
int32_t len = 0;
size_t size = 0;
- H5C_cache_entry_t * entry_ptr = NULL;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5C_cache_entry_t * entry_ptr = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -7404,17 +7404,17 @@ done:
} /* H5C__validate_protected_entry_list() */
#endif /* H5C_DO_EXTREME_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__entry_in_skip_list
*
* Purpose: Debugging function that scans skip list to see if it
- * is in present. We need this, as it is possible for
- * an entry to be in the skip list twice.
+ * is in present. We need this, as it is possible for
+ * an entry to be in the skip list twice.
*
* Return: FALSE if the entry is not in the skip list, and TRUE
- * if it is.
+ * if it is.
*
* Programmer: John Mainzer, 11/1/14
*
@@ -7438,22 +7438,22 @@ H5C__entry_in_skip_list(H5C_t * cache_ptr, H5C_cache_entry_t *target_ptr)
entry_ptr = (H5C_cache_entry_t *)H5SL_item(node_ptr);
- HDassert(entry_ptr);
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->is_dirty);
HDassert(entry_ptr->in_slist);
if(entry_ptr == target_ptr)
- in_slist = TRUE;
- else
- node_ptr = H5SL_next(node_ptr);
+ in_slist = TRUE;
+ else
+ node_ptr = H5SL_next(node_ptr);
}
return(in_slist);
} /* H5C__entry_in_skip_list() */
#endif /* H5C_DO_SLIST_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__flush_marked_entries
@@ -7485,34 +7485,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__flush_marked_entries */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_cork
*
* Purpose: To cork/uncork/get cork status of an object depending on "action":
- * H5C__SET_CORK:
- * To cork the object
- * Return error if the object is already corked
- * H5C__UNCORK:
- * To uncork the obejct
- * Return error if the object is not corked
- * H5C__GET_CORKED:
- * To retrieve the cork status of an object in
- * the parameter "corked"
+ * H5C__SET_CORK:
+ * To cork the object
+ * Return error if the object is already corked
+ * H5C__UNCORK:
+ * To uncork the obejct
+ * Return error if the object is not corked
+ * H5C__GET_CORKED:
+ * To retrieve the cork status of an object in
+ * the parameter "corked"
*
* Return: Success: Non-negative
* Failure: Negative
*
* Programmer: Vailin Choi
- * January 2014
+ * January 2014
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_cork(H5C_t *cache_ptr, haddr_t obj_addr, unsigned action, hbool_t *corked)
{
- H5C_tag_info_t *tag_info; /* Points to a tag info struct */
+ H5C_tag_info_t *tag_info; /* Points to a tag info struct */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
@@ -7595,7 +7595,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_cork() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_dirty()
*
@@ -7624,11 +7624,11 @@ H5C__mark_flush_dep_dirty(H5C_cache_entry_t * entry)
/* Iterate over the parent entries, if any */
for(u = 0; u < entry->flush_dep_nparents; u++) {
- /* Sanity check */
- HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren);
+ /* Sanity check */
+ HDassert(entry->flush_dep_parent[u]->flush_dep_ndirty_children < entry->flush_dep_parent[u]->flush_dep_nchildren);
- /* Adjust the parent's number of dirty children */
- entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
+ /* Adjust the parent's number of dirty children */
+ entry->flush_dep_parent[u]->flush_dep_ndirty_children++;
/* If the parent has a 'notify' callback, send a 'child entry dirtied' notice */
if(entry->flush_dep_parent[u]->type->notify &&
@@ -7640,7 +7640,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_dirty() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_clean()
*
@@ -7672,11 +7672,11 @@ H5C__mark_flush_dep_clean(H5C_cache_entry_t * entry)
* dependency - QAK, 2017/08/12
*/
for(i = ((int)entry->flush_dep_nparents) - 1; i >= 0; i--) {
- /* Sanity check */
- HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
+ /* Sanity check */
+ HDassert(entry->flush_dep_parent[i]->flush_dep_ndirty_children > 0);
- /* Adjust the parent's number of dirty children */
- entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
+ /* Adjust the parent's number of dirty children */
+ entry->flush_dep_parent[i]->flush_dep_ndirty_children--;
/* If the parent has a 'notify' callback, send a 'child entry cleaned' notice */
if(entry->flush_dep_parent[i]->type->notify &&
@@ -7688,13 +7688,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_clean() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_serialized()
*
* Purpose: Decrement the flush_dep_nunser_children fields of all the
- * target entry's flush dependency parents in response to
- * the target entry becoming serialized.
+ * target entry's flush dependency parents in response to
+ * the target entry becoming serialized.
*
* Return: Non-negative on success/Negative on failure
*
@@ -7719,7 +7719,7 @@ H5C__mark_flush_dep_serialized(H5C_cache_entry_t * entry_ptr)
* dependency - QAK, 2017/08/12
*/
for(i = ((int)entry_ptr->flush_dep_nparents) - 1; i >= 0; i--) {
- /* Sanity checks */
+ /* Sanity checks */
HDassert(entry_ptr->flush_dep_parent);
HDassert(entry_ptr->flush_dep_parent[i]->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->flush_dep_parent[i]->flush_dep_nunser_children > 0);
@@ -7737,7 +7737,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_serialized() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__mark_flush_dep_unserialized()
*
@@ -7784,7 +7784,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__mark_flush_dep_unserialized() */
-
+
#ifndef NDEBUG
/*-------------------------------------------------------------------------
* Function: H5C__assert_flush_dep_nocycle()
@@ -7818,46 +7818,46 @@ H5C__assert_flush_dep_nocycle(const H5C_cache_entry_t * entry,
/* Iterate over entry's parents (if any) */
for(u = 0; u < entry->flush_dep_nparents; u++)
- H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry);
+ H5C__assert_flush_dep_nocycle(entry->flush_dep_parent[u], base_entry);
FUNC_LEAVE_NOAPI_VOID
} /* H5C__assert_flush_dep_nocycle() */
#endif /* NDEBUG */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_cache
*
- * Purpose: Serialize (i.e. construct an on disk image) for all entries
- * in the metadata cache including clean entries.
+ * Purpose: Serialize (i.e. construct an on disk image) for all entries
+ * in the metadata cache including clean entries.
*
- * Note that flush dependencies and "flush me last" flags
- * must be observed in the serialization process.
+ * Note that flush dependencies and "flush me last" flags
+ * must be observed in the serialization process.
*
- * Note also that entries may be loaded, flushed, evicted,
- * expunged, relocated, resized, or removed from the cache
- * during this process, just as these actions may occur during
- * a regular flush.
+ * Note also that entries may be loaded, flushed, evicted,
+ * expunged, relocated, resized, or removed from the cache
+ * during this process, just as these actions may occur during
+ * a regular flush.
*
- * However, we are given that the cache will contain no protected
- * entries on entry to this routine (although entries may be
- * briefly protected and then unprotected during the serialize
- * process).
+ * However, we are given that the cache will contain no protected
+ * entries on entry to this routine (although entries may be
+ * briefly protected and then unprotected during the serialize
+ * process).
*
- * The objective of this routine is serialize all entries and
- * to force all entries into their actual locations on disk.
+ * The objective of this routine is serialize all entries and
+ * to force all entries into their actual locations on disk.
*
- * The initial need for this routine is to settle all entries
- * in the cache prior to construction of the metadata cache
- * image so that the size of the cache image can be calculated.
- * However, I gather that other uses for the routine are
- * under consideration.
+ * The initial need for this routine is to settle all entries
+ * in the cache prior to construction of the metadata cache
+ * image so that the size of the cache image can be calculated.
+ * However, I gather that other uses for the routine are
+ * under consideration.
*
* Return: Non-negative on success/Negative on failure or if there was
- * a request to flush all items and something was protected.
+ * a request to flush all items and something was protected.
*
* Programmer: John Mainzer
- * 7/22/15
+ * 7/22/15
*
*-------------------------------------------------------------------------
*/
@@ -7933,9 +7933,9 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while(scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- scan_ptr->serialization_count = 0;
- scan_ptr = scan_ptr->il_next;
+ HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ scan_ptr->serialization_count = 0;
+ scan_ptr = scan_ptr->il_next;
} /* end while */
} /* end block */
#endif /* NDEBUG */
@@ -7954,7 +7954,7 @@ H5C__serialize_cache(H5F_t *f)
*/
ring = H5C_RING_USER;
while(ring < H5C_RING_NTYPES) {
- HDassert(cache_ptr->close_warning_received);
+ HDassert(cache_ptr->close_warning_received);
switch(ring) {
case H5C_RING_USER:
break;
@@ -7998,10 +7998,10 @@ H5C__serialize_cache(H5F_t *f)
scan_ptr = cache_ptr->il_head;
while(scan_ptr != NULL) {
- HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(scan_ptr->serialization_count <= 1);
+ HDassert(scan_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(scan_ptr->serialization_count <= 1);
- scan_ptr = scan_ptr->il_next;
+ scan_ptr = scan_ptr->il_next;
} /* end while */
} /* end block */
#endif /* NDEBUG */
@@ -8011,7 +8011,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_ring
*
@@ -8022,16 +8022,16 @@ done:
* If the cache contains protected entries in the specified
* ring, the function will fail, as protected entries cannot
* be serialized. However all unprotected entries in the
- * target ring should be serialized before the function
- * returns failure.
+ * target ring should be serialized before the function
+ * returns failure.
*
* If flush dependencies appear in the target ring, the
* function makes repeated passes through the index list
- * serializing entries in flush dependency order.
+ * serializing entries in flush dependency order.
*
- * All entries outside the H5C_RING_SBE are marked for
- * inclusion in the cache image. Entries in H5C_RING_SBE
- * and below are marked for exclusion from the image.
+ * All entries outside the H5C_RING_SBE are marked for
+ * inclusion in the cache image. Entries in H5C_RING_SBE
+ * and below are marked for exclusion from the image.
*
* Return: Non-negative on success/Negative on failure or if there was
* a request to flush all items and something was protected.
@@ -8044,7 +8044,7 @@ done:
static herr_t
H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
{
- hbool_t done = FALSE;
+ hbool_t done = FALSE;
H5C_t * cache_ptr;
H5C_cache_entry_t * entry_ptr;
herr_t ret_value = SUCCEED;
@@ -8143,45 +8143,45 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and serialize callbacks.
*/
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
- done = TRUE; /* set to FALSE if any activity in inner loop */
- entry_ptr = cache_ptr->il_head;
- while(entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ done = TRUE; /* set to FALSE if any activity in inner loop */
+ entry_ptr = cache_ptr->il_head;
+ while(entry_ptr != NULL) {
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- /* Verify that either the entry is already serialized, or
+ /* Verify that either the entry is already serialized, or
* that it is assigned to either the target or an inner
* ring.
*/
HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
- /* Skip flush me last entries or inner ring entries */
- if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
+ /* Skip flush me last entries or inner ring entries */
+ if(!entry_ptr->flush_me_last && entry_ptr->ring == ring) {
- /* if we encounter an unserialized entry in the current
+ /* if we encounter an unserialized entry in the current
* ring that is not marked flush me last, we are not done.
*/
- if(!entry_ptr->image_up_to_date)
- done = FALSE;
+ if(!entry_ptr->image_up_to_date)
+ done = FALSE;
- /* Serialize the entry if its image is not up to date
+ /* Serialize the entry if its image is not up to date
* and it has no unserialized flush dependency children.
*/
- if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
- HDassert(entry_ptr->serialization_count == 0);
+ if(!entry_ptr->image_up_to_date && entry_ptr->flush_dep_nunser_children == 0) {
+ HDassert(entry_ptr->serialization_count == 0);
- /* Serialize the entry */
- if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
+ /* Serialize the entry */
+ if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ HDassert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
- entry_ptr->serialization_count++;
+ entry_ptr->serialization_count++;
#endif /* NDEBUG */
} /* end if */
} /* end if */
@@ -8197,7 +8197,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
/* Reset the counters */
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
/* Restart scan */
@@ -8205,8 +8205,8 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
} /* end if */
else
/* Advance to next entry */
- entry_ptr = entry_ptr->il_next;
- } /* while ( entry_ptr != NULL ) */
+ entry_ptr = entry_ptr->il_next;
+ } /* while ( entry_ptr != NULL ) */
} /* while ( ! done ) */
@@ -8215,7 +8215,7 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
* and serialize callbacks.
*/
cache_ptr->entries_loaded_counter = 0;
- cache_ptr->entries_inserted_counter = 0;
+ cache_ptr->entries_inserted_counter = 0;
cache_ptr->entries_relocated_counter = 0;
/* At this point, all entries not marked "flush me last" and in
@@ -8226,43 +8226,43 @@ H5C__serialize_ring(H5F_t *f, H5C_ring_t ring)
*/
entry_ptr = cache_ptr->il_head;
while(entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
- HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
+ HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
+ HDassert(entry_ptr->ring > H5C_RING_UNDEFINED);
HDassert(entry_ptr->ring < H5C_RING_NTYPES);
HDassert((entry_ptr->ring >= ring) || (entry_ptr->image_up_to_date));
- if(entry_ptr->ring == ring) {
- if(entry_ptr->flush_me_last) {
- if(!entry_ptr->image_up_to_date) {
- HDassert(entry_ptr->serialization_count == 0);
+ if(entry_ptr->ring == ring) {
+ if(entry_ptr->flush_me_last) {
+ if(!entry_ptr->image_up_to_date) {
+ HDassert(entry_ptr->serialization_count == 0);
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- /* Serialize the entry */
- if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
+ /* Serialize the entry */
+ if(H5C__serialize_single_entry(f, cache_ptr, entry_ptr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTSERIALIZE, FAIL, "entry serialization failed")
/* Check for the cache changing */
if((cache_ptr->entries_loaded_counter > 0) ||
(cache_ptr->entries_inserted_counter > 0) ||
(cache_ptr->entries_relocated_counter > 0))
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart")
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "flush_me_last entry serialization triggered restart")
HDassert(entry_ptr->flush_dep_nunser_children == 0);
- HDassert(entry_ptr->serialization_count == 0);
+ HDassert(entry_ptr->serialization_count == 0);
#ifndef NDEBUG
/* Increment serialization counter (to detect multiple serializations) */
- entry_ptr->serialization_count++;
+ entry_ptr->serialization_count++;
#endif /* NDEBUG */
} /* end if */
} /* end if */
else {
- HDassert(entry_ptr->image_up_to_date);
- HDassert(entry_ptr->serialization_count <= 1);
+ HDassert(entry_ptr->image_up_to_date);
+ HDassert(entry_ptr->serialization_count <= 1);
HDassert(entry_ptr->flush_dep_nunser_children == 0);
} /* end else */
} /* if ( entry_ptr->ring == ring ) */
- entry_ptr = entry_ptr->il_next;
+ entry_ptr = entry_ptr->il_next;
} /* while ( entry_ptr != NULL ) */
done:
@@ -8270,12 +8270,12 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_ring() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__serialize_single_entry
*
* Purpose: Serialize the cache entry pointed to by the entry_ptr
- * parameter.
+ * parameter.
*
* Return: Non-negative on success/Negative on failure
*
@@ -8286,7 +8286,7 @@ done:
static herr_t
H5C__serialize_single_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -8332,13 +8332,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__serialize_single_entry() */
-
+
/*-------------------------------------------------------------------------
* Function: H5C__generate_image
*
* Purpose: Serialize an entry and generate its image.
*
- * Note: This may cause the entry to be re-sized and/or moved in
+ * Note: This may cause the entry to be re-sized and/or moved in
* the cache.
*
* As we will not update the metadata cache's data structures
@@ -8357,9 +8357,9 @@ done:
static herr_t
H5C__generate_image(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr)
{
- haddr_t new_addr = HADDR_UNDEF;
- haddr_t old_addr = HADDR_UNDEF;
- size_t new_len = 0;
+ haddr_t new_addr = HADDR_UNDEF;
+ haddr_t old_addr = HADDR_UNDEF;
+ size_t new_len = 0;
unsigned serialize_flags = H5C__SERIALIZE_NO_FLAGS_SET;
herr_t ret_value = SUCCEED;
@@ -8508,13 +8508,13 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C__generate_image */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C_remove_entry
*
* Purpose: Remove an entry from the cache. Must be not protected, pinned,
- * dirty, involved in flush dependencies, etc.
+ * dirty, involved in flush dependencies, etc.
*
* Return: Non-negative on success/Negative on failure
*
@@ -8578,10 +8578,10 @@ H5C_remove_entry(void *_entry)
/* Update the cache internal data structures as appropriate for a destroy.
* Specifically:
- * 1) Delete it from the index
- * 2) Delete it from the collective read access list
- * 3) Update the replacement policy for eviction
- * 4) Remove it from the tag list for this object
+ * 1) Delete it from the index
+ * 2) Delete it from the collective read access list
+ * 3) Update the replacement policy for eviction
+ * 4) Remove it from the tag list for this object
*/
H5C__DELETE_FROM_INDEX(cache, entry, FAIL)
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 22c67ce..47ee1ce 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -14,16 +14,16 @@
/*
* Programmer: John Mainzer -- 10/12/04
*
- * Purpose: This file contains declarations which are normally visible
- * only within the H5C package.
+ * Purpose: This file contains declarations which are normally visible
+ * only within the H5C package.
*
- * Source files outside the H5C package should include
- * H5Cprivate.h instead.
+ * Source files outside the H5C package should include
+ * H5Cprivate.h instead.
*
- * The one exception to this rule is test/cache.c. The test
- * code is easier to write if it can look at the cache's
- * internal data structures. Indeed, this is the main
- * reason why this file was created.
+ * The one exception to this rule is test/cache.c. The test
+ * code is easier to write if it can look at the cache's
+ * internal data structures. Indeed, this is the main
+ * reason why this file was created.
*/
#if !(defined H5C_FRIEND || defined H5C_MODULE)
@@ -49,7 +49,7 @@
/* Cache configuration settings */
#define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */
-#define H5C__H5C_T_MAGIC 0x005CAC0E
+#define H5C__H5C_T_MAGIC 0x005CAC0E
/* Initial allocated size of the "flush_dep_parent" array */
#define H5C_FLUSH_DEP_PARENT_INIT 8
@@ -72,7 +72,7 @@
* to the HGOTO_ERROR macro, which may not be appropriate in all cases.
* If so, we will need versions of the insertion and deletion macros which
* do not reference the sanity checking macros.
- * JRM - 5/5/04
+ * JRM - 5/5/04
*
* Changes:
*
@@ -147,14 +147,14 @@
* sanity checking macros. These macro are used to update the size of
* a DLL when one of its entries changes size.
*
- * JRM - 9/8/05
+ * JRM - 9/8/05
*
* - Added macros supporting the index list -- a doubly liked list of
* all entries in the index. This list is necessary to reduce the
* cost of visiting all entries in the cache, which was previously
* done via a scan of the hash table.
*
- * JRM - 10/15/15
+ * JRM - 10/15/15
*
****************************************************************************/
@@ -582,7 +582,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
H5C__IL_DLL_SC(head_ptr, tail_ptr, len, Size, fv) \
} /* H5C__IL_DLL_REMOVE() */
-
+
/***********************************************************************
*
* Stats collection macros
@@ -617,68 +617,68 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
(cache_ptr)->dirty_index_size;
#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \
- (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
+ (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++;
#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) \
if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \
- (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
+ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
- (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
- if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
- (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
- if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
- (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
+ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
+ if ( (cache_ptr)->pel_len > (cache_ptr)->max_pel_len ) \
+ (cache_ptr)->max_pel_len = (cache_ptr)->pel_len; \
+ if ( (cache_ptr)->pel_size > (cache_ptr)->max_pel_size ) \
+ (cache_ptr)->max_pel_size = (cache_ptr)->pel_size;
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) \
- if ( cache_ptr->flush_in_progress ) \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_moves[(entry_ptr)->type->id])++; \
if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_moves[(entry_ptr)->type->id])++; \
- (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \
+ (((cache_ptr)->moves)[(entry_ptr)->type->id])++; \
(cache_ptr)->entries_relocated_counter++;
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)\
- if ( cache_ptr->flush_in_progress ) \
+ if ( cache_ptr->flush_in_progress ) \
((cache_ptr)->cache_flush_size_changes[(entry_ptr)->type->id])++; \
if ( entry_ptr->flush_in_progress ) \
((cache_ptr)->entry_flush_size_changes[(entry_ptr)->type->id])++; \
- if ( (entry_ptr)->size < (new_size) ) { \
- ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
+ if ( (entry_ptr)->size < (new_size) ) { \
+ ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \
H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \
if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \
(cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \
if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \
(cache_ptr)->max_pl_size = (cache_ptr)->pl_size; \
- } else if ( (entry_ptr)->size > (new_size) ) { \
- ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
- }
+ } else if ( (entry_ptr)->size > (new_size) ) { \
+ ((cache_ptr)->size_decreases[(entry_ptr)->type->id])++; \
+ }
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
- (cache_ptr)->total_ht_insertions++;
+ (cache_ptr)->total_ht_insertions++;
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
- (cache_ptr)->total_ht_deletions++;
+ (cache_ptr)->total_ht_deletions++;
#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) \
- if ( success ) { \
- (cache_ptr)->successful_ht_searches++; \
- (cache_ptr)->total_successful_ht_search_depth += depth; \
- } else { \
- (cache_ptr)->failed_ht_searches++; \
- (cache_ptr)->total_failed_ht_search_depth += depth; \
- }
+ if ( success ) { \
+ (cache_ptr)->successful_ht_searches++; \
+ (cache_ptr)->total_successful_ht_search_depth += depth; \
+ } else { \
+ (cache_ptr)->failed_ht_searches++; \
+ (cache_ptr)->total_failed_ht_search_depth += depth; \
+ }
#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) \
- ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
+ ((cache_ptr)->unpins)[(entry_ptr)->type->id]++;
#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->slist_scan_restarts)++;
+ ((cache_ptr)->slist_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->LRU_scan_restarts)++;
+ ((cache_ptr)->LRU_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr) \
- ((cache_ptr)->index_scan_restarts)++;
+ ((cache_ptr)->index_scan_restarts)++;
#define H5C__UPDATE_STATS_FOR_CACHE_IMAGE_CREATE(cache_ptr) \
{ \
@@ -944,7 +944,7 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
#endif /* H5C_COLLECT_CACHE_STATS */
-
+
/***********************************************************************
*
* Hash table access and manipulation macros:
@@ -961,13 +961,13 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
* the clean_index_size and dirty_index_size fields of H5C_t. Also
* added macros to allow us to track entry cleans and dirties.
*
- * JRM -- 11/5/08
+ * JRM -- 11/5/08
*
* - Updated existing index macros and sanity check macros to maintain
* the index_ring_len, index_ring_size, clean_index_ring_size, and
* dirty_index_ring_size fields of H5C_t.
*
- * JRM -- 9/1/15
+ * JRM -- 9/1/15
*
* - Updated existing index macros and sanity checks macros to
* maintain an doubly linked list of all entries in the index.
@@ -981,9 +981,9 @@ if ( ( ( ( (head_ptr) == NULL ) || ( (tail_ptr) == NULL ) ) && \
/* H5C__HASH_TABLE_LEN is defined in H5Cpkg.h. It mut be a power of two. */
-#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
+#define H5C__HASH_MASK ((size_t)(H5C__HASH_TABLE_LEN - 1) << 3)
-#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3)
+#define H5C__HASH_FCN(x) (int)((unsigned)((x) & H5C__HASH_MASK) >> 3)
#if H5C_DO_SANITY_CHECKS
@@ -999,7 +999,7 @@ if ( ( (cache_ptr) == NULL ) || \
( H5C__HASH_FCN((entry_ptr)->addr) >= H5C__HASH_TABLE_LEN ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
@@ -1022,7 +1022,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] == 0 ) || \
@@ -1059,7 +1059,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (entry_ptr)->ht_prev != NULL ) ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
@@ -1090,7 +1090,7 @@ if ( ( (cache_ptr) == NULL ) || \
( (entry_ptr)->ht_prev != NULL ) || \
( (cache_ptr)->index_size != \
((cache_ptr)->clean_index_size + \
- (cache_ptr)->dirty_index_size) ) || \
+ (cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \
@@ -1149,7 +1149,7 @@ if ( ( (cache_ptr) == NULL ) || \
}
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
@@ -1163,9 +1163,9 @@ if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( ( !( was_clean ) || \
- ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
- ( ( (was_clean) ) || \
- ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
+ ( (cache_ptr)->clean_index_size < (old_size) ) ) && \
+ ( ( (was_clean) ) || \
+ ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) || \
( (entry_ptr) == NULL ) || \
( (entry_ptr)->ring <= H5C_RING_UNDEFINED ) || \
( (entry_ptr)->ring >= H5C_RING_NTYPES ) || \
@@ -1184,20 +1184,20 @@ if ( ( (cache_ptr) == NULL ) || \
}
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr) \
+ entry_ptr) \
if ( ( (cache_ptr) == NULL ) || \
( (cache_ptr)->index_len <= 0 ) || \
( (cache_ptr)->index_size <= 0 ) || \
( (new_size) > (cache_ptr)->index_size ) || \
( (cache_ptr)->index_size != \
- ((cache_ptr)->clean_index_size + \
+ ((cache_ptr)->clean_index_size + \
(cache_ptr)->dirty_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->clean_index_size) ) || \
( (cache_ptr)->index_size < ((cache_ptr)->dirty_index_size) ) || \
( ( !((entry_ptr)->is_dirty ) || \
- ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
- ( ( ((entry_ptr)->is_dirty) ) || \
- ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
+ ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \
+ ( ( ((entry_ptr)->is_dirty) ) || \
+ ( (cache_ptr)->clean_index_size < (new_size) ) ) ) || \
( ( (cache_ptr)->index_len == 1 ) && \
( (cache_ptr)->index_size != (new_size) ) ) || \
( (cache_ptr)->index_ring_len[(entry_ptr)->ring] > \
@@ -1311,9 +1311,9 @@ if ( ( (cache_ptr)->index_size != \
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
#define H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean)
+ entry_ptr, was_clean)
#define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr)
+ entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr)
#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr)
@@ -1453,10 +1453,10 @@ if ( ( (cache_ptr)->index_size != \
H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \
(cache_ptr)->dirty_index_size -= (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
- -= (entry_ptr)->size; \
+ -= (entry_ptr)->size; \
(cache_ptr)->clean_index_size += (entry_ptr)->size; \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \
- += (entry_ptr)->size; \
+ += (entry_ptr)->size; \
H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr); \
}
@@ -1465,18 +1465,18 @@ if ( ( (cache_ptr)->index_size != \
H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \
(cache_ptr)->clean_index_size -= (entry_ptr)->size; \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring]) \
- -= (entry_ptr)->size; \
+ -= (entry_ptr)->size; \
(cache_ptr)->dirty_index_size += (entry_ptr)->size; \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring]) \
- += (entry_ptr)->size; \
+ += (entry_ptr)->size; \
H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr); \
}
#define H5C__UPDATE_INDEX_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
{ \
H5C__PRE_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
- entry_ptr, was_clean) \
+ entry_ptr, was_clean) \
(cache_ptr)->index_size -= (old_size); \
(cache_ptr)->index_size += (new_size); \
((cache_ptr)->index_ring_size[entry_ptr->ring]) -= (old_size); \
@@ -1485,14 +1485,14 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->clean_index_size -= (old_size); \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring])-= (old_size); \
} else { \
- (cache_ptr)->dirty_index_size -= (old_size); \
+ (cache_ptr)->dirty_index_size -= (old_size); \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])-= (old_size); \
} \
if((entry_ptr)->is_dirty) { \
(cache_ptr)->dirty_index_size += (new_size); \
((cache_ptr)->dirty_index_ring_size[entry_ptr->ring])+= (new_size); \
} else { \
- (cache_ptr)->clean_index_size += (new_size); \
+ (cache_ptr)->clean_index_size += (new_size); \
((cache_ptr)->clean_index_ring_size[entry_ptr->ring])+= (new_size); \
} \
H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->il_len, \
@@ -1502,7 +1502,7 @@ if ( ( (cache_ptr)->index_size != \
entry_ptr) \
}
-
+
/**************************************************************************
*
* Skip list insertion and deletion macros:
@@ -1514,11 +1514,11 @@ if ( ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__INSERT_ENTRY_IN_SLIST
+ * Macro: H5C__INSERT_ENTRY_IN_SLIST
*
* Purpose: Insert the specified instance of H5C_cache_entry_t into
- * the skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * the skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -1526,47 +1526,47 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 7/21/04
- * Updated function to set the in_tree flag when inserting
- * an entry into the tree. Also modified the function to
- * update the tree size and len fields instead of the similar
- * index fields.
+ * JRM -- 7/21/04
+ * Updated function to set the in_tree flag when inserting
+ * an entry into the tree. Also modified the function to
+ * update the tree size and len fields instead of the similar
+ * index fields.
*
- * All of this is part of the modifications to support the
- * hash table.
+ * All of this is part of the modifications to support the
+ * hash table.
*
- * JRM -- 7/27/04
- * Converted the function H5C_insert_entry_in_tree() into
- * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
- * wringing a little more speed out of the cache.
+ * JRM -- 7/27/04
+ * Converted the function H5C_insert_entry_in_tree() into
+ * the macro H5C__INSERT_ENTRY_IN_TREE in the hopes of
+ * wringing a little more speed out of the cache.
*
- * Note that we don't bother to check if the entry is already
- * in the tree -- if it is, H5SL_insert() will fail.
+ * Note that we don't bother to check if the entry is already
+ * in the tree -- if it is, H5SL_insert() will fail.
*
- * QAK -- 11/27/04
- * Switched over to using skip list routines.
+ * QAK -- 11/27/04
+ * Switched over to using skip list routines.
*
- * JRM -- 6/27/06
- * Added fail_val parameter.
+ * JRM -- 6/27/06
+ * Added fail_val parameter.
*
- * JRM -- 8/25/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/25/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_len_increase and
- * slist_size_increase fields that are used in sanity
- * checks in the flush routines.
+ * This version maintains the slist_len_increase and
+ * slist_size_increase fields that are used in sanity
+ * checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
- * JRM -- 12/13/14
- * Added code to set cache_ptr->slist_changed to TRUE
- * when an entry is inserted in the slist.
+ * JRM -- 12/13/14
+ * Added code to set cache_ptr->slist_changed to TRUE
+ * when an entry is inserted in the slist.
*
- * JRM -- 9/1/15
- * Added code to maintain the cache_ptr->slist_ring_len
- * and cache_ptr->slist_ring_size arrays.
+ * JRM -- 9/1/15
+ * Added code to maintain the cache_ptr->slist_ring_len
+ * and cache_ptr->slist_ring_size arrays.
*
*-------------------------------------------------------------------------
*/
@@ -1648,14 +1648,14 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__REMOVE_ENTRY_FROM_SLIST
*
* Purpose: Remove the specified instance of H5C_cache_entry_t from the
- * index skip list in the specified instance of H5C_t. Update
- * the associated length and size fields.
+ * index skip list in the specified instance of H5C_t. Update
+ * the associated length and size fields.
*
* Return: N/A
*
@@ -1737,13 +1737,13 @@ if ( ( (cache_ptr)->index_size != \
} /* H5C__REMOVE_ENTRY_FROM_SLIST */
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/*-------------------------------------------------------------------------
*
* Function: H5C__UPDATE_SLIST_FOR_SIZE_CHANGE
*
* Purpose: Update cache_ptr->slist_size for a change in the size of
- * and entry in the slist.
+ * and entry in the slist.
*
* Return: N/A
*
@@ -1751,24 +1751,24 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 8/27/06
- * Added the H5C_DO_SANITY_CHECKS version of the macro.
+ * JRM -- 8/27/06
+ * Added the H5C_DO_SANITY_CHECKS version of the macro.
*
- * This version maintains the slist_size_increase field
- * that are used in sanity checks in the flush routines.
+ * This version maintains the slist_size_increase field
+ * that are used in sanity checks in the flush routines.
*
- * All this is needed as the fractal heap needs to be
- * able to dirty, resize and/or move entries during the
- * flush.
+ * All this is needed as the fractal heap needs to be
+ * able to dirty, resize and/or move entries during the
+ * flush.
*
- * JRM -- 12/13/14
- * Note that we do not set cache_ptr->slist_changed to TRUE
- * in this case, as the structure of the slist is not
- * modified.
+ * JRM -- 12/13/14
+ * Note that we do not set cache_ptr->slist_changed to TRUE
+ * in this case, as the structure of the slist is not
+ * modified.
*
- * JRM -- 9/1/15
- * Added code to maintain the cache_ptr->slist_ring_len
- * and cache_ptr->slist_ring_size arrays.
+ * JRM -- 9/1/15
+ * Added code to maintain the cache_ptr->slist_ring_len
+ * and cache_ptr->slist_ring_size arrays.
*
*-------------------------------------------------------------------------
*/
@@ -1840,7 +1840,7 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_DO_SANITY_CHECKS */
-
+
/**************************************************************************
*
* Replacement policy update macros:
@@ -1852,18 +1852,18 @@ if ( ( (cache_ptr)->index_size != \
/*-------------------------------------------------------------------------
*
- * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
+ * Macro: H5C__FAKE_RP_FOR_MOST_RECENT_ACCESS
*
* Purpose: For efficiency, we sometimes change the order of flushes --
- * but doing so can confuse the replacement policy. This
- * macro exists to allow us to specify an entry as the
- * most recently touched so we can repair any such
- * confusion.
+ * but doing so can confuse the replacement policy. This
+ * macro exists to allow us to specify an entry as the
+ * most recently touched so we can repair any such
+ * confusion.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -1871,15 +1871,15 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/20/06
- * Modified macro to ignore pinned entries. Pinned entries
- * do not appear in the data structures maintained by the
- * replacement policy code, and thus this macro has nothing
- * to do if called for such an entry.
+ * JRM -- 3/20/06
+ * Modified macro to ignore pinned entries. Pinned entries
+ * do not appear in the data structures maintained by the
+ * replacement policy code, and thus this macro has nothing
+ * to do if called for such an entry.
*
- * JRM -- 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -1901,16 +1901,16 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head.\
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Use the dirty flag to infer whether the entry is on the clean or \
@@ -1964,16 +1964,16 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -1982,18 +1982,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_EVICTION
+ * Macro: H5C__UPDATE_RP_FOR_EVICTION
*
* Purpose: Update the replacement policy data structures for an
- * eviction of the specified cache entry.
+ * eviction of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: Non-negative on success/Negative on failure.
*
@@ -2001,27 +2001,27 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_eviction() to the
- * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_eviction() to the
+ * macro H5C__UPDATE_RP_FOR_EVICTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * the pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * the pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * Pinned entries can't be evicted, so this entry should never
- * be called on a pinned entry. Added assert to verify this.
+ * JRM - 3/20/06
+ * Pinned entries can't be evicted, so this entry should never
+ * be called on a pinned entry. Added assert to verify this.
*
- * JRM -- 3/28/07
- * Added sanity checks for the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks for the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2093,18 +2093,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_FLUSH
+ * Macro: H5C__UPDATE_RP_FOR_FLUSH
*
* Purpose: Update the replacement policy data structures for a flush
- * of the specified cache entry.
+ * of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2112,29 +2112,29 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_flush() to the
- * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_flush() to the
+ * macro H5C__UPDATE_RP_FOR_FLUSH in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two versions, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two versions, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/20/06
- * While pinned entries can be flushed, they don't reside in
- * the replacement policy data structures when unprotected.
- * Thus I modified this macro to do nothing if the entry is
- * pinned.
+ * JRM - 3/20/06
+ * While pinned entries can be flushed, they don't reside in
+ * the replacement policy data structures when unprotected.
+ * Thus I modified this macro to do nothing if the entry is
+ * pinned.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2156,28 +2156,28 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* since the entry is being flushed or cleared, one would think \
- * that it must be dirty -- but that need not be the case. Use the \
- * dirty flag to infer whether the entry is on the clean or dirty \
- * LRU list, and remove it. Then insert it at the head of the \
- * clean LRU list. \
+ * that it must be dirty -- but that need not be the case. Use the \
+ * dirty flag to infer whether the entry is on the clean or dirty \
+ * LRU list, and remove it. Then insert it at the head of the \
+ * clean LRU list. \
* \
* The function presumes that a dirty entry will be either cleared \
- * or flushed shortly, so it is OK if we put a dirty entry on the \
- * clean LRU list. \
+ * or flushed shortly, so it is OK if we put a dirty entry on the \
+ * clean LRU list. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
@@ -2218,17 +2218,17 @@ if ( ( (cache_ptr)->index_size != \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the \
- * head. \
- */ \
+ * head. \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2237,26 +2237,26 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND
+ * Macro: H5C__UPDATE_RP_FOR_INSERT_APPEND
*
* Purpose: Update the replacement policy data structures for an
- * insertion of the specified cache entry.
+ * insertion of the specified cache entry.
*
- * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the
- * new entry as the LEAST recently used entry, not the
- * most recently used.
+ * Unlike H5C__UPDATE_RP_FOR_INSERTION below, mark the
+ * new entry as the LEAST recently used entry, not the
+ * most recently used.
*
- * For now at least, this macro should only be used in
- * the reconstruction of the metadata cache from a cache
- * image block.
+ * For now at least, this macro should only be used in
+ * the reconstruction of the metadata cache from a cache
+ * image block.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2292,7 +2292,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the tail of the clean or dirty LRU list as \
@@ -2333,7 +2333,7 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2342,7 +2342,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_APPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2351,18 +2351,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_INSERTION
+ * Macro: H5C__UPDATE_RP_FOR_INSERTION
*
* Purpose: Update the replacement policy data structures for an
- * insertion of the specified cache entry.
+ * insertion of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2370,31 +2370,31 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_insertion() to the
- * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_insertion() to the
+ * macro H5C__UPDATE_RP_FOR_INSERTION in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/10/06
- * This macro should never be called on a pinned entry.
- * Inserted an assert to verify this.
+ * JRM - 3/10/06
+ * This macro should never be called on a pinned entry.
+ * Inserted an assert to verify this.
*
- * JRM - 8/9/06
- * Not any more. We must now allow insertion of pinned
- * entries. Updated macro to support this.
+ * JRM - 8/9/06
+ * Not any more. We must now allow insertion of pinned
+ * entries. Updated macro to support this.
*
- * JRM - 3/28/07
- * Added sanity checks using the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks using the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2426,7 +2426,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* insert the entry at the head of the clean or dirty LRU list as \
@@ -2467,7 +2467,7 @@ if ( ( (cache_ptr)->index_size != \
(cache_ptr)->pel_tail_ptr, \
(cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
- \
+ \
} else { \
\
/* modified LRU specific code */ \
@@ -2476,7 +2476,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2485,22 +2485,22 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_PROTECT
+ * Macro: H5C__UPDATE_RP_FOR_PROTECT
*
* Purpose: Update the replacement policy data structures for a
- * protect of the specified cache entry.
+ * protect of the specified cache entry.
*
- * To do this, unlink the specified entry from any data
- * structures used by the replacement policy, and add the
- * entry to the protected list.
+ * To do this, unlink the specified entry from any data
+ * structures used by the replacement policy, and add the
+ * entry to the protected list.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2508,28 +2508,28 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_protect() to the
- * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
- * a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_protect() to the
+ * macro H5C__UPDATE_RP_FOR_PROTECT in an effort to squeeze
+ * a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to attempt to remove pinned entriese from
- * the pinned entry list instead of from the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to attempt to remove pinned entriese from
+ * the pinned entry list instead of from the data structures
+ * maintained by the replacement policy.
*
- * JRM - 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM - 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2545,12 +2545,12 @@ if ( ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
} else { \
@@ -2561,7 +2561,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* Similarly, remove the entry from the clean or dirty LRU list \
@@ -2607,12 +2607,12 @@ if ( ( (cache_ptr)->index_size != \
HDassert( !((entry_ptr)->is_read_only) ); \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->pel_head_ptr, \
- (cache_ptr)->pel_tail_ptr, \
- (cache_ptr)->pel_len, \
+ (cache_ptr)->pel_tail_ptr, \
+ (cache_ptr)->pel_len, \
(cache_ptr)->pel_size, (fail_val)) \
\
} else { \
@@ -2623,7 +2623,7 @@ if ( ( (cache_ptr)->index_size != \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2641,18 +2641,18 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_MOVE
+ * Macro: H5C__UPDATE_RP_FOR_MOVE
*
* Purpose: Update the replacement policy data structures for a
- * move of the specified cache entry.
+ * move of the specified cache entry.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2673,20 +2673,20 @@ if ( ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* remove the entry from either the clean or dirty LUR list as \
@@ -2695,43 +2695,43 @@ if ( ( (cache_ptr)->index_size != \
if ( was_dirty ) { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_REMOVE((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* insert the entry at the head of either the clean or dirty \
- * LRU list as appropriate. \
+ * LRU list as appropriate. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->dLRU_head_ptr, \
+ (cache_ptr)->dLRU_head_ptr, \
(cache_ptr)->dLRU_tail_ptr, \
(cache_ptr)->dLRU_list_len, \
(cache_ptr)->dLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
\
} else { \
\
H5C__AUX_DLL_PREPEND((entry_ptr), \
- (cache_ptr)->cLRU_head_ptr, \
+ (cache_ptr)->cLRU_head_ptr, \
(cache_ptr)->cLRU_tail_ptr, \
(cache_ptr)->cLRU_list_len, \
(cache_ptr)->cLRU_list_size, \
- (fail_val)) \
+ (fail_val)) \
} \
\
/* End modified LRU specific code. */ \
@@ -2750,20 +2750,20 @@ if ( ( (cache_ptr)->index_size != \
HDassert( (entry_ptr)->size > 0 ); \
\
if ( ! ( (entry_ptr)->is_pinned ) && ! ( (entry_ptr->is_protected ) ) ) { \
- \
+ \
/* modified LRU specific code */ \
\
/* remove the entry from the LRU list, and re-insert it at the head. \
- */ \
+ */ \
\
H5C__DLL_REMOVE((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
H5C__DLL_PREPEND((entry_ptr), (cache_ptr)->LRU_head_ptr, \
(cache_ptr)->LRU_tail_ptr, \
- (cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_len, \
(cache_ptr)->LRU_list_size, (fail_val)) \
\
/* End modified LRU specific code. */ \
@@ -2772,25 +2772,25 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
+ * Macro: H5C__UPDATE_RP_FOR_SIZE_CHANGE
*
* Purpose: Update the replacement policy data structures for a
- * size change of the specified cache entry.
+ * size change of the specified cache entry.
*
- * To do this, determine if the entry is pinned. If it is,
- * update the size of the pinned entry list.
+ * To do this, determine if the entry is pinned. If it is,
+ * update the size of the pinned entry list.
*
- * If it isn't pinned, the entry must handled by the
- * replacement policy. Update the appropriate replacement
- * policy data structures.
+ * If it isn't pinned, the entry must handled by the
+ * replacement policy. Update the appropriate replacement
+ * policy data structures.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2798,9 +2798,9 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -2820,49 +2820,49 @@ if ( ( (cache_ptr)->index_size != \
\
if ( (entry_ptr)->coll_access ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \
- (cache_ptr)->coll_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->coll_list_len, \
+ (cache_ptr)->coll_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} \
\
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
- \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
+ \
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* Similarly, update the size of the clean or dirty LRU list as \
- * appropriate. At present, the entry must be clean, but that \
- * could change. \
+ * appropriate. At present, the entry must be clean, but that \
+ * could change. \
*/ \
\
if ( (entry_ptr)->is_dirty ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
- (cache_ptr)->dLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->dLRU_list_len, \
+ (cache_ptr)->dLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
- (cache_ptr)->cLRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->cLRU_list_len, \
+ (cache_ptr)->cLRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
} \
\
/* End modified LRU specific code. */ \
@@ -2882,24 +2882,24 @@ if ( ( (cache_ptr)->index_size != \
HDassert( ((entry_ptr)->ro_ref_count) == 0 ); \
HDassert( (entry_ptr)->size > 0 ); \
HDassert( new_size > 0 ); \
- \
+ \
if ( (entry_ptr)->is_pinned ) { \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
- (cache_ptr)->pel_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->pel_len, \
+ (cache_ptr)->pel_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
} else { \
\
/* modified LRU specific code */ \
\
- /* Update the size of the LRU list */ \
+ /* Update the size of the LRU list */ \
\
- H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
- (cache_ptr)->LRU_list_size, \
- (entry_ptr)->size, \
- (new_size)); \
+ H5C__DLL_UPDATE_FOR_SIZE_CHANGE((cache_ptr)->LRU_list_len, \
+ (cache_ptr)->LRU_list_size, \
+ (entry_ptr)->size, \
+ (new_size)); \
\
/* End modified LRU specific code. */ \
} \
@@ -2908,22 +2908,22 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPIN
+ * Macro: H5C__UPDATE_RP_FOR_UNPIN
*
* Purpose: Update the replacement policy data structures for an
- * unpin of the specified cache entry.
+ * unpin of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * entry list, and re-insert it in the data structures used
- * by the current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * entry list, and re-insert it in the data structures used
+ * by the current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the macro
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the macro
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -2931,9 +2931,9 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM -- 3/28/07
- * Added sanity checks based on the new is_read_only and
- * ro_ref_count fields of struct H5C_cache_entry_t.
+ * JRM -- 3/28/07
+ * Added sanity checks based on the new is_read_only and
+ * ro_ref_count fields of struct H5C_cache_entry_t.
*
*-------------------------------------------------------------------------
*/
@@ -3029,22 +3029,22 @@ if ( ( (cache_ptr)->index_size != \
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
+ * Macro: H5C__UPDATE_RP_FOR_UNPROTECT
*
* Purpose: Update the replacement policy data structures for an
- * unprotect of the specified cache entry.
+ * unprotect of the specified cache entry.
*
- * To do this, unlink the specified entry from the protected
- * list, and re-insert it in the data structures used by the
- * current replacement policy.
+ * To do this, unlink the specified entry from the protected
+ * list, and re-insert it in the data structures used by the
+ * current replacement policy.
*
- * At present, we only support the modified LRU policy, so
- * this function deals with that case unconditionally. If
- * we ever support other replacement policies, the function
- * should switch on the current policy and act accordingly.
+ * At present, we only support the modified LRU policy, so
+ * this function deals with that case unconditionally. If
+ * we ever support other replacement policies, the function
+ * should switch on the current policy and act accordingly.
*
* Return: N/A
*
@@ -3052,24 +3052,24 @@ if ( ( (cache_ptr)->index_size != \
*
* Modifications:
*
- * JRM - 7/27/04
- * Converted the function H5C_update_rp_for_unprotect() to
- * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
- * squeeze a bit more performance out of the cache.
+ * JRM - 7/27/04
+ * Converted the function H5C_update_rp_for_unprotect() to
+ * the macro H5C__UPDATE_RP_FOR_UNPROTECT in an effort to
+ * squeeze a bit more performance out of the cache.
*
- * At least for the first cut, I am leaving the comments and
- * white space in the macro. If they cause difficulties with
- * pre-processor, I'll have to remove them.
+ * At least for the first cut, I am leaving the comments and
+ * white space in the macro. If they cause difficulties with
+ * pre-processor, I'll have to remove them.
*
- * JRM - 7/28/04
- * Split macro into two version, one supporting the clean and
- * dirty LRU lists, and the other not. Yet another attempt
- * at optimization.
+ * JRM - 7/28/04
+ * Split macro into two version, one supporting the clean and
+ * dirty LRU lists, and the other not. Yet another attempt
+ * at optimization.
*
- * JRM - 3/17/06
- * Modified macro to put pinned entries on the pinned entry
- * list instead of inserting them in the data structures
- * maintained by the replacement policy.
+ * JRM - 3/17/06
+ * Modified macro to put pinned entries on the pinned entry
+ * list instead of inserting them in the data structures
+ * maintained by the replacement policy.
*
*-------------------------------------------------------------------------
*/
@@ -3318,10 +3318,10 @@ if ( ( (entry_ptr) == NULL ) || \
} \
} /* H5C__COLL_DLL_REMOVE() */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__INSERT_IN_COLL_LIST
+ * Macro: H5C__INSERT_IN_COLL_LIST
*
* Purpose: Insert entry into collective entries list
*
@@ -3348,10 +3348,10 @@ if ( ( (entry_ptr) == NULL ) || \
\
} /* H5C__INSERT_IN_COLL_LIST */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__REMOVE_FROM_COLL_LIST
+ * Macro: H5C__REMOVE_FROM_COLL_LIST
*
* Purpose: Remove entry from collective entries list
*
@@ -3378,10 +3378,10 @@ if ( ( (entry_ptr) == NULL ) || \
\
} /* H5C__REMOVE_FROM_COLL_LIST */
-
+
/*-------------------------------------------------------------------------
*
- * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST
+ * Macro: H5C__MOVE_TO_TOP_IN_COLL_LIST
*
* Purpose: Update entry position in collective entries list
*
@@ -3434,7 +3434,7 @@ if ( ( (entry_ptr) == NULL ) || \
*
* The fields of this structure are discussed individually below:
*
- * tag: Address (i.e. "tag") of the object header for all the entries
+ * tag: Address (i.e. "tag") of the object header for all the entries
* corresponding to parts of that object.
*
* head: Head of doubly-linked list of all entries belonging to the tag.
@@ -3442,7 +3442,7 @@ if ( ( (entry_ptr) == NULL ) || \
* entry_cnt: Number of entries on linked list of entries for this tag.
*
* corked: Boolean flag indicating whether entries for this object can be
- * evicted.
+ * evicted.
*
****************************************************************************/
typedef struct H5C_tag_info_t {
@@ -3484,32 +3484,32 @@ typedef struct H5C_tag_info_t {
* Note that index_size and index_len now refer to the total size of
* and number of entries in the hash table.
*
- * JRM - 7/19/04
+ * JRM - 7/19/04
*
* The TBBT has since been replaced with a skip list. This change
* greatly predates this note.
*
- * JRM - 9/26/05
+ * JRM - 9/26/05
*
- * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
- * This field is used to validate pointers to instances of
- * H5C_t.
+ * magic: Unsigned 32 bit integer always set to H5C__H5C_T_MAGIC.
+ * This field is used to validate pointers to instances of
+ * H5C_t.
*
* flush_in_progress: Boolean flag indicating whether a flush is in
- * progress.
+ * progress.
*
* log_info: Information used by the MDC logging functionality.
* Described in H5Clog.h.
*
- * aux_ptr: Pointer to void used to allow wrapper code to associate
- * its data with an instance of H5C_t. The H5C cache code
- * sets this field to NULL, and otherwise leaves it alone.
+ * aux_ptr: Pointer to void used to allow wrapper code to associate
+ * its data with an instance of H5C_t. The H5C cache code
+ * sets this field to NULL, and otherwise leaves it alone.
*
- * max_type_id: Integer field containing the maximum type id number assigned
- * to a type of entry in the cache. All type ids from 0 to
- * max_type_id inclusive must be defined. The names of the
- * types are stored in the type_name_table discussed below, and
- * indexed by the ids.
+ * max_type_id: Integer field containing the maximum type id number assigned
+ * to a type of entry in the cache. All type ids from 0 to
+ * max_type_id inclusive must be defined. The names of the
+ * types are stored in the type_name_table discussed below, and
+ * indexed by the ids.
*
* class_table_ptr: Pointer to an array of H5C_class_t of length
* max_type_id + 1. Entry classes for the cache.
@@ -3525,19 +3525,19 @@ typedef struct H5C_tag_info_t {
* to reduce its size as entries are unprotected.
*
* b) When running in parallel mode, the cache may not be
- * permitted to flush a dirty entry in response to a read.
- * If there are no clean entries available to evict, the
- * cache will exceed its maximum size. Again the cache
+ * permitted to flush a dirty entry in response to a read.
+ * If there are no clean entries available to evict, the
+ * cache will exceed its maximum size. Again the cache
* will attempt to reduce its size to the max_cache_size
* limit on the next cache write.
*
- * c) When an entry increases in size, the cache may exceed
- * the max_cache_size limit until the next time the cache
- * attempts to load or insert an entry.
+ * c) When an entry increases in size, the cache may exceed
+ * the max_cache_size limit until the next time the cache
+ * attempts to load or insert an entry.
*
- * d) When the evictions_enabled field is false (see below),
- * the cache size will increase without limit until the
- * field is set to true.
+ * d) When the evictions_enabled field is false (see below),
+ * the cache size will increase without limit until the
+ * field is set to true.
*
* min_clean_size: Nominal minimum number of clean bytes in the cache.
* The cache attempts to maintain this number of bytes of
@@ -3545,7 +3545,7 @@ typedef struct H5C_tag_info_t {
* a soft limit.
*
* close_warning_received: Boolean flag indicating that a file closing
- * warning has been received.
+ * warning has been received.
*
*
* In addition to the call back functions required for each entry, the
@@ -3553,19 +3553,19 @@ typedef struct H5C_tag_info_t {
* the cache as a whole:
*
* check_write_permitted: In certain applications, the cache may not
- * be allowed to write to disk at certain time. If specified,
- * the check_write_permitted function is used to determine if
- * a write is permissible at any given point in time.
+ * be allowed to write to disk at certain time. If specified,
+ * the check_write_permitted function is used to determine if
+ * a write is permissible at any given point in time.
*
- * If no such function is specified (i.e. this field is NULL),
- * the cache uses the following write_permitted field to
- * determine whether writes are permitted.
+ * If no such function is specified (i.e. this field is NULL),
+ * the cache uses the following write_permitted field to
+ * determine whether writes are permitted.
*
* write_permitted: If check_write_permitted is NULL, this boolean flag
- * indicates whether writes are permitted.
+ * indicates whether writes are permitted.
*
- * log_flush: If provided, this function is called whenever a dirty
- * entry is flushed to disk.
+ * log_flush: If provided, this function is called whenever a dirty
+ * entry is flushed to disk.
*
*
* In cases where memory is plentiful, and performance is an issue, it may
@@ -3573,11 +3573,11 @@ typedef struct H5C_tag_info_t {
* writes. The following field is used to implement this.
*
* evictions_enabled: Boolean flag that is initialized to TRUE. When
- * this flag is set to FALSE, the metadata cache will not
- * attempt to evict entries to make space for newly protected
- * entries, and instead the will grow without limit.
+ * this flag is set to FALSE, the metadata cache will not
+ * attempt to evict entries to make space for newly protected
+ * entries, and instead the will grow without limit.
*
- * Needless to say, this feature must be used with care.
+ * Needless to say, this feature must be used with care.
*
*
* The cache requires an index to facilitate searching for entries. The
@@ -3595,7 +3595,7 @@ typedef struct H5C_tag_info_t {
* index, and must have the same length and size as the index proper.
*
* index_len: Number of entries currently in the hash table used to index
- * the cache.
+ * the cache.
*
* index_size: Number of bytes of cache entries currently stored in the
* hash table used to index the cache.
@@ -3607,84 +3607,84 @@ typedef struct H5C_tag_info_t {
* of the cache's memory footprint.
*
* index_ring_len: Array of integer of length H5C_RING_NTYPES used to
- * maintain a count of entries in the index by ring. Note
- * that the sum of all the cells in this array must equal
- * the value stored in index_len above.
+ * maintain a count of entries in the index by ring. Note
+ * that the sum of all the cells in this array must equal
+ * the value stored in index_len above.
*
* index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all entries in the index
- * by ring. Note that the sum of all cells in this array must
- * equal the value stored in index_size above.
+ * maintain the sum of the sizes of all entries in the index
+ * by ring. Note that the sum of all cells in this array must
+ * equal the value stored in index_size above.
*
* clean_index_size: Number of bytes of clean entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invariant that clean_index_size +
- * dirty_index_size == index_size.
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invariant that clean_index_size +
+ * dirty_index_size == index_size.
*
- * WARNING:
+ * WARNING:
*
- * The value of the clean_index_size must not be mistaken
- * for the current clean size of the cache. Rather, the
- * clean size of the cache is the current value of
- * clean_index_size plus the amount of empty space (if any)
+ * The value of the clean_index_size must not be mistaken
+ * for the current clean size of the cache. Rather, the
+ * clean size of the cache is the current value of
+ * clean_index_size plus the amount of empty space (if any)
* in the cache.
*
* clean_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all clean entries in the
- * index by ring. Note that the sum of all cells in this array
- * must equal the value stored in clean_index_size above.
+ * maintain the sum of the sizes of all clean entries in the
+ * index by ring. Note that the sum of all cells in this array
+ * must equal the value stored in clean_index_size above.
*
* dirty_index_size: Number of bytes of dirty entries currently stored in
- * the hash table. Note that the index_size field (above)
- * is also the sum of the sizes of all entries in the cache.
- * Thus we should have the invariant that clean_index_size +
- * dirty_index_size == index_size.
+ * the hash table. Note that the index_size field (above)
+ * is also the sum of the sizes of all entries in the cache.
+ * Thus we should have the invariant that clean_index_size +
+ * dirty_index_size == index_size.
*
* dirty_index_ring_size: Array of size_t of length H5C_RING_NTYPES used to
- * maintain the sum of the sizes of all dirty entries in the
- * index by ring. Note that the sum of all cells in this array
- * must equal the value stored in dirty_index_size above.
- *
- * index: Array of pointer to H5C_cache_entry_t of size
- * H5C__HASH_TABLE_LEN. At present, this value is a power
- * of two, not the usual prime number.
- *
- * I hope that the variable size of cache elements, the large
- * hash table size, and the way in which HDF5 allocates space
- * will combine to avoid problems with periodicity. If so, we
- * can use a trivial hash function (a bit-and and a 3 bit left
- * shift) with some small savings.
- *
- * If not, it will become evident in the statistics. Changing
- * to the usual prime number length hash table will require
- * changing the H5C__HASH_FCN macro and the deletion of the
- * H5C__HASH_MASK #define. No other changes should be required.
- *
- * il_len: Number of entries on the index list.
- *
- * This must always be equal to index_len. As such, this
- * field is redundant. However, the existing linked list
- * management macros expect to maintain a length field, so
- * this field exists primarily to avoid adding complexity to
- * these macros.
- *
- * il_size: Number of bytes of cache entries currently stored in the
- * index list.
- *
- * This must always be equal to index_size. As such, this
- * field is redundant. However, the existing linked list
- * management macros expect to maintain a size field, so
- * this field exists primarily to avoid adding complexity to
- * these macros.
- *
- * il_head: Pointer to the head of the doubly linked list of entries in
+ * maintain the sum of the sizes of all dirty entries in the
+ * index by ring. Note that the sum of all cells in this array
+ * must equal the value stored in dirty_index_size above.
+ *
+ * index: Array of pointer to H5C_cache_entry_t of size
+ * H5C__HASH_TABLE_LEN. At present, this value is a power
+ * of two, not the usual prime number.
+ *
+ * I hope that the variable size of cache elements, the large
+ * hash table size, and the way in which HDF5 allocates space
+ * will combine to avoid problems with periodicity. If so, we
+ * can use a trivial hash function (a bit-and and a 3 bit left
+ * shift) with some small savings.
+ *
+ * If not, it will become evident in the statistics. Changing
+ * to the usual prime number length hash table will require
+ * changing the H5C__HASH_FCN macro and the deletion of the
+ * H5C__HASH_MASK #define. No other changes should be required.
+ *
+ * il_len: Number of entries on the index list.
+ *
+ * This must always be equal to index_len. As such, this
+ * field is redundant. However, the existing linked list
+ * management macros expect to maintain a length field, so
+ * this field exists primarily to avoid adding complexity to
+ * these macros.
+ *
+ * il_size: Number of bytes of cache entries currently stored in the
+ * index list.
+ *
+ * This must always be equal to index_size. As such, this
+ * field is redundant. However, the existing linked list
+ * management macros expect to maintain a size field, so
+ * this field exists primarily to avoid adding complexity to
+ * these macros.
+ *
+ * il_head: Pointer to the head of the doubly linked list of entries in
* the index list. Note that cache entries on this list are
- * linked by their il_next and il_prev fields.
+ * linked by their il_next and il_prev fields.
*
* This field is NULL if the index is empty.
*
- * il_tail: Pointer to the tail of the doubly linked list of entries in
+ * il_tail: Pointer to the tail of the doubly linked list of entries in
* the index list. Note that cache entries on this list are
* linked by their il_next and il_prev fields.
*
@@ -3701,29 +3701,29 @@ typedef struct H5C_tag_info_t {
*
* The following fields are maintained to facilitate this.
*
- * entries_removed_counter: Counter that is incremented each time an
- * entry is removed from the cache by any means (eviction,
- * expungement, or take ownership at this point in time).
- * Functions that perform scans on lists may set this field
- * to zero prior to calling H5C__flush_single_entry().
- * Unexpected changes to the counter indicate that an entry
- * was removed from the cache as a side effect of the flush.
- *
- * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t
- * which contained the last entry to be removed from the cache,
- * or NULL if there either is no such entry, or if a function
- * performing a scan of a list has set this field to NULL prior
- * to calling H5C__flush_single_entry().
- *
- * WARNING!!! This field must NEVER be dereferenced. It is
- * maintained to allow functions that perform scans of lists
- * to compare this pointer with their pointers to next, thus
- * allowing them to avoid unnecessary restarts of scans if the
- * pointers don't match, and if entries_removed_counter is
- * one.
- *
- * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t
- * which contains the 'next' entry for an iteration. Removing
+ * entries_removed_counter: Counter that is incremented each time an
+ * entry is removed from the cache by any means (eviction,
+ * expungement, or take ownership at this point in time).
+ * Functions that perform scans on lists may set this field
+ * to zero prior to calling H5C__flush_single_entry().
+ * Unexpected changes to the counter indicate that an entry
+ * was removed from the cache as a side effect of the flush.
+ *
+ * last_entry_removed_ptr: Pointer to the instance of H5C_cache_entry_t
+ * which contained the last entry to be removed from the cache,
+ * or NULL if there either is no such entry, or if a function
+ * performing a scan of a list has set this field to NULL prior
+ * to calling H5C__flush_single_entry().
+ *
+ * WARNING!!! This field must NEVER be dereferenced. It is
+ * maintained to allow functions that perform scans of lists
+ * to compare this pointer with their pointers to next, thus
+ * allowing them to avoid unnecessary restarts of scans if the
+ * pointers don't match, and if entries_removed_counter is
+ * one.
+ *
+ * entry_watched_for_removal: Pointer to an instance of H5C_cache_entry_t
+ * which contains the 'next' entry for an iteration. Removing
* this entry must trigger a rescan of the iteration, so each
* entry removed from the cache is compared against this pointer
* and the pointer is reset to NULL if the watched entry is removed.
@@ -3741,11 +3741,11 @@ typedef struct H5C_tag_info_t {
* the skip list as they are flushed. JRM - 10/25/05)
*
* slist_changed: Boolean flag used to indicate whether the contents of
- * the slist has changed since the last time this flag was
- * reset. This is used in the cache flush code to detect
- * conditions in which pre-serialize or serialize callbacks
- * have modified the slist -- which obliges us to restart
- * the scan of the slist from the beginning.
+ * the slist has changed since the last time this flag was
+ * reset. This is used in the cache flush code to detect
+ * conditions in which pre-serialize or serialize callbacks
+ * have modified the slist -- which obliges us to restart
+ * the scan of the slist from the beginning.
*
* slist_len: Number of entries currently in the skip list
* used to maintain a sorted list of dirty entries in the
@@ -3756,14 +3756,14 @@ typedef struct H5C_tag_info_t {
* dirty entries in the cache.
*
* slist_ring_len: Array of integer of length H5C_RING_NTYPES used to
- * maintain a count of entries in the slist by ring. Note
- * that the sum of all the cells in this array must equal
- * the value stored in slist_len above.
+ * maintain a count of entries in the slist by ring. Note
+ * that the sum of all the cells in this array must equal
+ * the value stored in slist_len above.
*
* slist_ring_size: Array of size_t of length H5C_RING_NTYPES used to
* maintain the sum of the sizes of all entries in the
- * slist by ring. Note that the sum of all cells in this
- * array must equal the value stored in slist_size above.
+ * slist by ring. Note that the sum of all cells in this
+ * array must equal the value stored in slist_size above.
*
* slist_ptr: pointer to the instance of H5SL_t used maintain a sorted
* list of dirty entries in the cache. This sorted list has
@@ -3778,7 +3778,7 @@ typedef struct H5C_tag_info_t {
* some optimizations when I get to it.
*
* num_last_entries: The number of entries in the cache that can only be
- * flushed after all other entries in the cache have
+ * flushed after all other entries in the cache have
* been flushed. At this time, this will only ever be
* one entry (the superblock), and the code has been
* protected with HDasserts to enforce this. This restraint
@@ -3787,10 +3787,10 @@ typedef struct H5C_tag_info_t {
* explicit tests for that case should be added when said
* HDasserts are removed.
*
- * Update: There are now two possible last entries
- * (superblock and file driver info message). This
- * number will probably increase as we add superblock
- * messages. JRM -- 11/18/14
+ * Update: There are now two possible last entries
+ * (superblock and file driver info message). This
+ * number will probably increase as we add superblock
+ * messages. JRM -- 11/18/14
*
* With the addition of the fractal heap, the cache must now deal with
* the case in which entries may be dirtied, moved, or have their sizes
@@ -3799,12 +3799,12 @@ typedef struct H5C_tag_info_t {
* H5C_DO_SANITY_CHECKS is TRUE.
*
* slist_len_increase: Number of entries that have been added to the
- * slist since the last time this field was set to zero.
- * Note that this value can be negative.
+ * slist since the last time this field was set to zero.
+ * Note that this value can be negative.
*
* slist_size_increase: Total size of all entries that have been added
- * to the slist since the last time this field was set to
- * zero. Note that this value can be negative.
+ * to the slist since the last time this field was set to
+ * zero. Note that this value can be negative.
*
* Cache entries belonging to a particular object are "tagged" with that
* object's base object header address.
@@ -3821,7 +3821,7 @@ typedef struct H5C_tag_info_t {
* freelist, as well as shared entries like global
* heaps and shared object header messages, are not tagged.
*
- * ignore_tags: Boolean flag to disable tag validation during entry insertion.
+ * ignore_tags: Boolean flag to disable tag validation during entry insertion.
*
* num_objs_corked: Unsigned integer field containing the number of objects
* that are "corked". The "corked" status of an object is
@@ -3860,15 +3860,15 @@ typedef struct H5C_tag_info_t {
*
* Pinning an entry has the following implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
+ * 1) A pinned entry cannot be evicted. Thus unprotected
* pinned entries reside in the pinned entry list, instead
* of the LRU list(s) (or other lists maintained by the current
* replacement policy code).
*
* 2) A pinned entry can be accessed or modified at any time.
* This places an additional burden on the associated pre-serialize
- * and serialize callbacks, which must ensure the the entry is in
- * a consistent state before creating an image of it.
+ * and serialize callbacks, which must ensure the the entry is in
+ * a consistent state before creating an image of it.
*
* 3) A pinned entry can be marked as dirty (and possibly
* change size) while it is unprotected.
@@ -3883,21 +3883,21 @@ typedef struct H5C_tag_info_t {
*
* Maintaining the pinned entry list requires the following fields:
*
- * pel_len: Number of entries currently residing on the pinned
- * entry list.
+ * pel_len: Number of entries currently residing on the pinned
+ * entry list.
*
- * pel_size: Number of bytes of cache entries currently residing on
- * the pinned entry list.
+ * pel_size: Number of bytes of cache entries currently residing on
+ * the pinned entry list.
*
* pel_head_ptr: Pointer to the head of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
* pel_tail_ptr: Pointer to the tail of the doubly linked list of pinned
- * but not protected entries. Note that cache entries on
- * this list are linked by their next and prev fields.
+ * but not protected entries. Note that cache entries on
+ * this list are linked by their next and prev fields.
*
* This field is NULL if the list is empty.
*
@@ -3955,13 +3955,13 @@ typedef struct H5C_tag_info_t {
* LRU_list_len: Number of cache entries currently on the LRU list.
*
* Observe that LRU_list_len + pl_len + pel_len must always
- * equal index_len.
+ * equal index_len.
*
* LRU_list_size: Number of bytes of cache entries currently residing on the
* LRU list.
*
* Observe that LRU_list_size + pl_size + pel_size must always
- * equal index_size.
+ * equal index_size.
*
* LRU_head_ptr: Pointer to the head of the doubly linked LRU list. Cache
* entries on this list are linked by their next and prev fields.
@@ -4030,10 +4030,10 @@ typedef struct H5C_tag_info_t {
* the structure described below:
*
* size_increase_possible: Depending on the configuration data given
- * in the resize_ctl field, it may or may not be possible
- * to increase the size of the cache. Rather than test for
- * all the ways this can happen, we simply set this flag when
- * we receive a new configuration.
+ * in the resize_ctl field, it may or may not be possible
+ * to increase the size of the cache. Rather than test for
+ * all the ways this can happen, we simply set this flag when
+ * we receive a new configuration.
*
* flash_size_increase_possible: Depending on the configuration data given
* in the resize_ctl field, it may or may not be possible
@@ -4054,37 +4054,37 @@ typedef struct H5C_tag_info_t {
* we receive a new configuration.
*
* resize_enabled: This is another convenience flag which is set whenever
- * a new set of values for resize_ctl are provided. Very
- * simply,
+ * a new set of values for resize_ctl are provided. Very
+ * simply,
*
- * resize_enabled = size_increase_possible ||
+ * resize_enabled = size_increase_possible ||
* size_decrease_possible;
*
- * cache_full: Boolean flag used to keep track of whether the cache is
- * full, so we can refrain from increasing the size of a
- * cache which hasn't used up the space allotted to it.
+ * cache_full: Boolean flag used to keep track of whether the cache is
+ * full, so we can refrain from increasing the size of a
+ * cache which hasn't used up the space allotted to it.
*
- * The field is initialized to FALSE, and then set to TRUE
- * whenever we attempt to make space in the cache.
+ * The field is initialized to FALSE, and then set to TRUE
+ * whenever we attempt to make space in the cache.
*
* size_decreased: Boolean flag set to TRUE whenever the maximum cache
- * size is decreased. The flag triggers a call to
- * H5C__make_space_in_cache() on the next call to H5C_protect().
+ * size is decreased. The flag triggers a call to
+ * H5C__make_space_in_cache() on the next call to H5C_protect().
*
* resize_in_progress: As the metadata cache has become re-entrant, it is
- * possible that a protect may trigger a call to
- * H5C__auto_adjust_cache_size(), which may trigger a flush,
- * which may trigger a protect, which will result in another
- * call to H5C__auto_adjust_cache_size().
+ * possible that a protect may trigger a call to
+ * H5C__auto_adjust_cache_size(), which may trigger a flush,
+ * which may trigger a protect, which will result in another
+ * call to H5C__auto_adjust_cache_size().
*
- * The resize_in_progress boolean flag is used to detect this,
- * and to prevent the infinite recursion that would otherwise
- * occur.
+ * The resize_in_progress boolean flag is used to detect this,
+ * and to prevent the infinite recursion that would otherwise
+ * occur.
*
- * Note that this issue is not hypothetical -- this field
- * was added 12/29/15 to fix a bug exposed in the testing
- * of changes to the file driver info superblock extension
- * management code needed to support rings.
+ * Note that this issue is not hypothetical -- this field
+ * was added 12/29/15 to fix a bug exposed in the testing
+ * of changes to the file driver info superblock extension
+ * management code needed to support rings.
*
* msic_in_progress: As the metadata cache has become re-entrant, and as
* the free space manager code has become more tightly
@@ -4103,62 +4103,62 @@ typedef struct H5C_tag_info_t {
* exposed by modifications to test/fheap.c to cause it to
* use paged allocation.
*
- * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
- * data for automatic cache resizing.
+ * resize_ctl: Instance of H5C_auto_size_ctl_t containing configuration
+ * data for automatic cache resizing.
*
* epoch_markers_active: Integer field containing the number of epoch
- * markers currently in use in the LRU list. This value
- * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
+ * markers currently in use in the LRU list. This value
+ * must be in the range [0, H5C__MAX_EPOCH_MARKERS - 1].
*
* epoch_marker_active: Array of boolean of length H5C__MAX_EPOCH_MARKERS.
- * This array is used to track which epoch markers are currently
- * in use.
+ * This array is used to track which epoch markers are currently
+ * in use.
*
* epoch_marker_ringbuf: Array of int of length H5C__MAX_EPOCH_MARKERS + 1.
*
- * To manage the epoch marker cache entries, it is necessary
- * to track their order in the LRU list. This is done with
- * epoch_marker_ringbuf. When markers are inserted at the
- * head of the LRU list, the index of the marker in the
- * epoch_markers array is inserted at the tail of the ring
- * buffer. When it becomes the epoch_marker_active'th marker
- * in the LRU list, it will have worked its way to the head
- * of the ring buffer as well. This allows us to remove it
- * without scanning the LRU list if such is required.
+ * To manage the epoch marker cache entries, it is necessary
+ * to track their order in the LRU list. This is done with
+ * epoch_marker_ringbuf. When markers are inserted at the
+ * head of the LRU list, the index of the marker in the
+ * epoch_markers array is inserted at the tail of the ring
+ * buffer. When it becomes the epoch_marker_active'th marker
+ * in the LRU list, it will have worked its way to the head
+ * of the ring buffer as well. This allows us to remove it
+ * without scanning the LRU list if such is required.
*
* epoch_marker_ringbuf_first: Integer field containing the index of the
- * first entry in the ring buffer.
+ * first entry in the ring buffer.
*
* epoch_marker_ringbuf_last: Integer field containing the index of the
- * last entry in the ring buffer.
+ * last entry in the ring buffer.
*
* epoch_marker_ringbuf_size: Integer field containing the number of entries
- * in the ring buffer.
+ * in the ring buffer.
*
* epoch_markers: Array of instances of H5C_cache_entry_t of length
- * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
- * in the LRU list to identify cache entries that haven't
- * been accessed for some (small) specified number of
- * epochs. These entries (if any) can then be evicted and
- * the cache size reduced -- ideally without evicting any
- * of the current working set. Needless to say, the epoch
- * length and the number of epochs before an unused entry
- * must be chosen so that all, or almost all, the working
- * set will be accessed before the limit.
- *
- * Epoch markers only appear in the LRU list, never in
- * the index or slist. While they are of type
- * H5C__EPOCH_MARKER_TYPE, and have associated class
- * functions, these functions should never be called.
- *
- * The addr fields of these instances of H5C_cache_entry_t
- * are set to the index of the instance in the epoch_markers
- * array, the size is set to 0, and the type field points
- * to the constant structure epoch_marker_class defined
- * in H5C.c. The next and prev fields are used as usual
- * to link the entry into the LRU list.
- *
- * All other fields are unused.
+ * H5C__MAX_EPOCH_MARKERS. The entries are used as markers
+ * in the LRU list to identify cache entries that haven't
+ * been accessed for some (small) specified number of
+ * epochs. These entries (if any) can then be evicted and
+ * the cache size reduced -- ideally without evicting any
+ * of the current working set. Needless to say, the epoch
+ * length and the number of epochs before an unused entry
+ * must be chosen so that all, or almost all, the working
+ * set will be accessed before the limit.
+ *
+ * Epoch markers only appear in the LRU list, never in
+ * the index or slist. While they are of type
+ * H5C__EPOCH_MARKER_TYPE, and have associated class
+ * functions, these functions should never be called.
+ *
+ * The addr fields of these instances of H5C_cache_entry_t
+ * are set to the index of the instance in the epoch_markers
+ * array, the size is set to 0, and the type field points
+ * to the constant structure epoch_marker_class defined
+ * in H5C.c. The next and prev fields are used as usual
+ * to link the entry into the LRU list.
+ *
+ * All other fields are unused.
*
*
* Cache hit rate collection fields:
@@ -4168,62 +4168,62 @@ typedef struct H5C_tag_info_t {
* collection is enabled. The following fields support this capability.
*
* cache_hits: Number of cache hits since the last time the cache hit
- * rate statistics were reset. Note that when automatic cache
- * re-sizing is enabled, this field will be reset every automatic
- * resize epoch.
+ * rate statistics were reset. Note that when automatic cache
+ * re-sizing is enabled, this field will be reset every automatic
+ * resize epoch.
*
* cache_accesses: Number of times the cache has been accessed while
- * since the last since the last time the cache hit rate statistics
- * were reset. Note that when automatic cache re-sizing is enabled,
- * this field will be reset every automatic resize epoch.
+ * since the last since the last time the cache hit rate statistics
+ * were reset. Note that when automatic cache re-sizing is enabled,
+ * this field will be reset every automatic resize epoch.
*
*
* Metadata cache image management related fields.
*
- * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration
- * data for generation of a cache image on file close.
+ * image_ctl: Instance of H5C_cache_image_ctl_t containing configuration
+ * data for generation of a cache image on file close.
*
* serialization_in_progress: Boolean field that is set to TRUE iff
- * the cache is in the process of being serialized. This
- * field is needed to support the H5C_serialization_in_progress()
- * call, which is in turn required for sanity checks in some
- * cache clients.
+ * the cache is in the process of being serialized. This
+ * field is needed to support the H5C_serialization_in_progress()
+ * call, which is in turn required for sanity checks in some
+ * cache clients.
*
- * load_image: Boolean flag indicating that the metadata cache image
- * superblock extension message exists and should be
- * read, and the image block read and decoded on the next
- * call to H5C_protect().
+ * load_image: Boolean flag indicating that the metadata cache image
+ * superblock extension message exists and should be
+ * read, and the image block read and decoded on the next
+ * call to H5C_protect().
*
* image_loaded: Boolean flag indicating that the metadata cache has
* loaded the metadata cache image as directed by the
* MDC cache image superblock extension message.
*
* delete_image: Boolean flag indicating whether the metadata cache image
- * superblock message should be deleted and the cache image
- * file space freed after they have been read and decoded.
+ * superblock message should be deleted and the cache image
+ * file space freed after they have been read and decoded.
*
- * This flag should be set to TRUE iff the file is opened
- * R/W and there is a cache image to be read.
+ * This flag should be set to TRUE iff the file is opened
+ * R/W and there is a cache image to be read.
*
* image_addr: haddr_t containing the base address of the on disk
- * metadata cache image, or HADDR_UNDEF if that value is
- * undefined. Note that this field is used both in the
- * construction and write, and the read and decode of
- * metadata cache image blocks.
+ * metadata cache image, or HADDR_UNDEF if that value is
+ * undefined. Note that this field is used both in the
+ * construction and write, and the read and decode of
+ * metadata cache image blocks.
*
- * image_len: hsize_t containing the size of the on disk metadata cache
- * image, or zero if that value is undefined. Note that this
- * field is used both in the construction and write, and the
- * read and decode of metadata cache image blocks.
+ * image_len: hsize_t containing the size of the on disk metadata cache
+ * image, or zero if that value is undefined. Note that this
+ * field is used both in the construction and write, and the
+ * read and decode of metadata cache image blocks.
*
* image_data_len: size_t containing the number of bytes of data in the
- * on disk metadata cache image, or zero if that value is
- * undefined.
+ * on disk metadata cache image, or zero if that value is
+ * undefined.
*
- * In most cases, this value is the same as the image_len
- * above. It exists to allow for metadata cache image blocks
- * that are larger than the actual image. Thus in all
- * cases image_data_len <= image_len.
+ * In most cases, this value is the same as the image_len
+ * above. It exists to allow for metadata cache image blocks
+ * that are larger than the actual image. Thus in all
+ * cases image_data_len <= image_len.
*
* To create the metadata cache image, we must first serialize all the
* entries in the metadata cache. This is done by a scan of the index.
@@ -4250,35 +4250,35 @@ typedef struct H5C_tag_info_t {
* Note that all these new fields would work just as well as booleans.
*
* entries_loaded_counter: Number of entries loaded into the cache
- * since the last time this field was reset.
+ * since the last time this field was reset.
*
* entries_inserted_counter: Number of entries inserted into the cache
- * since the last time this field was reset.
+ * since the last time this field was reset.
*
* entries relocated_counter: Number of entries whose base address has
- * been changed since the last time this field was reset.
+ * been changed since the last time this field was reset.
*
* entry_fd_height_change_counter: Number of entries whose flush dependency
- * height has changed since the last time this field was reset.
+ * height has changed since the last time this field was reset.
*
* The following fields are used assemble the cache image prior to
* writing it to disk.
*
* num_entries_in_image: Unsigned integer field containing the number of entries
- * to be copied into the metadata cache image. Note that
- * this value will be less than the number of entries in
- * the cache, and the superblock and its related entries
- * are not written to the metadata cache image.
+ * to be copied into the metadata cache image. Note that
+ * this value will be less than the number of entries in
+ * the cache, and the superblock and its related entries
+ * are not written to the metadata cache image.
*
* image_entries: Pointer to a dynamically allocated array of instance of
- * H5C_image_entry_t of length num_entries_in_image, or NULL
- * if that array does not exist. This array is used to
- * assemble entry data to be included in the image, and to
- * sort them by flush dependency height and LRU rank.
+ * H5C_image_entry_t of length num_entries_in_image, or NULL
+ * if that array does not exist. This array is used to
+ * assemble entry data to be included in the image, and to
+ * sort them by flush dependency height and LRU rank.
*
* image_buffer: Pointer to the dynamically allocated buffer of length
- * image_len in which the metadata cache image is assembled,
- * or NULL if that buffer does not exist.
+ * image_len in which the metadata cache image is assembled,
+ * or NULL if that buffer does not exist.
*
*
* Free Space Manager Related fields:
@@ -4300,13 +4300,13 @@ typedef struct H5C_tag_info_t {
* flush is complete.
*
* rdfsm_settled: Boolean flag indicating whether the raw data free space
- * manager is settled -- i.e. whether the correct space has
- * been allocated for it in the file.
+ * manager is settled -- i.e. whether the correct space has
+ * been allocated for it in the file.
*
- * Note that the name of this field is deceptive. In the
- * multi file case, the flag applies to all free space
- * managers that are not involved in allocating space for
- * free space manager metadata.
+ * Note that the name of this field is deceptive. In the
+ * multi file case, the flag applies to all free space
+ * managers that are not involved in allocating space for
+ * free space manager metadata.
*
* mdfsm_settled: Boolean flag indicating whether the meta data free space
* manager is settled -- i.e. whether the correct space has
@@ -4314,8 +4314,8 @@ typedef struct H5C_tag_info_t {
*
* Note that the name of this field is deceptive. In the
* multi file case, the flag applies only to free space
- * managers that are involved in allocating space for free
- * space managers.
+ * managers that are involved in allocating space for free
+ * space managers.
*
*
* Statistics collection fields:
@@ -4325,144 +4325,144 @@ typedef struct H5C_tag_info_t {
* is true.
*
* hits: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been in cache when requested in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been in cache when requested in
+ * the current epoch.
*
* misses: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has not been in cache when
- * requested in the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has not been in cache when
+ * requested in the current epoch.
*
* write_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been write protected
- * in the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been write protected
+ * in the current epoch.
*
- * Observe that (hits + misses) = (write_protects + read_protects).
+ * Observe that (hits + misses) = (write_protects + read_protects).
*
* read_protects: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been read protected in
- * the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been read protected in
+ * the current epoch.
*
* Observe that (hits + misses) = (write_protects + read_protects).
*
* max_read_protects: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to maximum number of simultaneous read
- * protects on any entry with type id equal to the array index
- * in the current epoch.
+ * The cells are used to maximum number of simultaneous read
+ * protects on any entry with type id equal to the array index
+ * in the current epoch.
*
* insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been inserted into the
- * cache in the current epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been inserted into the
+ * cache in the current epoch.
*
* pinned_insertions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been inserted
- * pinned into the cache in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been inserted
+ * pinned into the cache in the current epoch.
*
* clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times a dirty entry with type
- * id equal to the array index has been cleared in the current
- * epoch.
+ * are used to record the number of times a dirty entry with type
+ * id equal to the array index has been cleared in the current
+ * epoch.
*
* flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been written to disk in the
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been written to disk in the
* current epoch.
*
* evictions: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type id
- * equal to the array index has been evicted from the cache in
- * the current epoch.
+ * are used to record the number of times an entry with type id
+ * equal to the array index has been evicted from the cache in
+ * the current epoch.
*
* take_ownerships: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry with
- * type id equal to the array index has been removed from the
- * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch.
+ * cells are used to record the number of times an entry with
+ * type id equal to the array index has been removed from the
+ * cache via the H5C__TAKE_OWNERSHIP_FLAG in the current epoch.
*
* moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been moved in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been moved in the current
+ * epoch.
*
* entry_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during its pre-serialize callback in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during its pre-serialize callback in the current epoch.
*
* cache_flush_moves: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has been moved
- * during a cache flush in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has been moved
+ * during a cache flush in the current epoch.
*
* pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been pinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been pinned in the current
+ * epoch.
*
* unpins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been unpinned in the current
- * epoch.
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been unpinned in the current
+ * epoch.
*
- * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the number of times an entry with type
- * id equal to the array index has been marked dirty while pinned
- * in the current epoch.
+ * dirty_pins: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * are used to record the number of times an entry with type
+ * id equal to the array index has been marked dirty while pinned
+ * in the current epoch.
*
* pinned_flushes: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been flushed while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been flushed while
+ * pinned in the current epoch.
*
* pinned_clears: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1. The
- * cells are used to record the number of times an entry
- * with type id equal to the array index has been cleared while
- * pinned in the current epoch.
+ * cells are used to record the number of times an entry
+ * with type id equal to the array index has been cleared while
+ * pinned in the current epoch.
*
* size_increases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has increased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has increased in
+ * size in the current epoch.
*
* size_decreases: Array of int64 of length H5C__MAX_NUM_TYPE_IDS + 1.
- * The cells are used to record the number of times an entry
- * with type id equal to the array index has decreased in
- * size in the current epoch.
+ * The cells are used to record the number of times an entry
+ * with type id equal to the array index has decreased in
+ * size in the current epoch.
*
* entry_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size while in its pre-serialize
- * callback.
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size while in its pre-serialize
+ * callback.
*
* cache_flush_size_changes: Array of int64 of length
- * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
- * the number of times an entry with type id equal to the
- * array index has changed size during a cache flush
+ * H5C__MAX_NUM_TYPE_IDS + 1. The cells are used to record
+ * the number of times an entry with type id equal to the
+ * array index has changed size during a cache flush
*
* total_ht_insertions: Number of times entries have been inserted into the
- * hash table in the current epoch.
+ * hash table in the current epoch.
*
* total_ht_deletions: Number of times entries have been deleted from the
* hash table in the current epoch.
*
* successful_ht_searches: int64 containing the total number of successful
- * searches of the hash table in the current epoch.
+ * searches of the hash table in the current epoch.
*
* total_successful_ht_search_depth: int64 containing the total number of
- * entries other than the targets examined in successful
- * searches of the hash table in the current epoch.
+ * entries other than the targets examined in successful
+ * searches of the hash table in the current epoch.
*
* failed_ht_searches: int64 containing the total number of unsuccessful
* searches of the hash table in the current epoch.
*
* total_failed_ht_search_depth: int64 containing the total number of
* entries examined in unsuccessful searches of the hash
- * table in the current epoch.
+ * table in the current epoch.
*
* max_index_len: Largest value attained by the index_len field in the
* current epoch.
@@ -4471,10 +4471,10 @@ typedef struct H5C_tag_info_t {
* current epoch.
*
* max_clean_index_size: Largest value attained by the clean_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_dirty_index_size: Largest value attained by the dirty_index_size field
- * in the current epoch.
+ * in the current epoch.
*
* max_slist_len: Largest value attained by the slist_len field in the
* current epoch.
@@ -4525,11 +4525,11 @@ typedef struct H5C_tag_info_t {
* The following fields track statistics on cache images.
*
* images_created: Integer field containing the number of cache images
- * created since the last time statistics were reset.
+ * created since the last time statistics were reset.
*
- * At present, this field must always be either 0 or 1.
- * Further, since cache images are only created at file
- * close, this field should only be set at that time.
+ * At present, this field must always be either 0 or 1.
+ * Further, since cache images are only created at file
+ * close, this field should only be set at that time.
*
* images_read: Integer field containing the number of cache images
* read from file. Note that reading an image is different
@@ -4544,12 +4544,12 @@ typedef struct H5C_tag_info_t {
* from process 0.
*
* images_loaded: Integer field containing the number of cache images
- * loaded since the last time statistics were reset.
+ * loaded since the last time statistics were reset.
*
- * At present, this field must always be either 0 or 1.
- * Further, since cache images are only loaded at the
- * time of the first protect or on file close, this value
- * should only change on those events.
+ * At present, this field must always be either 0 or 1.
+ * Further, since cache images are only loaded at the
+ * time of the first protect or on file close, this value
+ * should only change on those events.
*
* last_image_size: Size of the most recently loaded metadata cache image
* loaded into the cache, or zero if no image has been
@@ -4565,11 +4565,11 @@ typedef struct H5C_tag_info_t {
* of prefetched entries are tracked in the flushes and evictions arrays
* discused above.
*
- * prefetches: Number of prefetched entries that are loaded to the
- * cache.
+ * prefetches: Number of prefetched entries that are loaded to the
+ * cache.
*
* dirty_prefetches: Number of dirty prefetched entries that are loaded
- * into the cache.
+ * into the cache.
*
* prefetch_hits: Number of prefetched entries that are actually used.
*
@@ -4585,9 +4585,9 @@ typedef struct H5C_tag_info_t {
* obtain estimates of how frequently these restarts occur.
*
* slist_scan_restarts: Number of times a scan of the slist (that contains
- * calls to H5C__flush_single_entry()) has been restarted to
- * avoid potential issues with change of status of the next
- * entry in the scan.
+ * calls to H5C__flush_single_entry()) has been restarted to
+ * avoid potential issues with change of status of the next
+ * entry in the scan.
*
* LRU_scan_restarts: Number of times a scan of the LRU list (that contains
* calls to H5C__flush_single_entry()) has been restarted to
@@ -4595,43 +4595,43 @@ typedef struct H5C_tag_info_t {
* entry in the scan.
*
* index_scan_restarts: Number of times a scan of the index has been
- * restarted to avoid potential issues with load, insertion
- * or change in flush dependency height of an entry other
- * than the target entry as the result of call(s) to the
- * pre_serialize or serialize callbacks.
+ * restarted to avoid potential issues with load, insertion
+ * or change in flush dependency height of an entry other
+ * than the target entry as the result of call(s) to the
+ * pre_serialize or serialize callbacks.
*
- * Note that at present, this condition can only be triggered
- * by a call to H5C_serialize_single_entry().
+ * Note that at present, this condition can only be triggered
+ * by a call to H5C_serialize_single_entry().
*
* The remaining stats are collected only when both H5C_COLLECT_CACHE_STATS
* and H5C_COLLECT_CACHE_ENTRY_STATS are true.
*
* max_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* min_accesses: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the minimum number of times any single
- * entry with type id equal to the array index has been
- * accessed in the current epoch.
+ * are used to record the minimum number of times any single
+ * entry with type id equal to the array index has been
+ * accessed in the current epoch.
*
* max_clears: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been cleared
- * in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been cleared
+ * in the current epoch.
*
* max_flushes: Array of int32 of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
- * are used to record the maximum number of times any single
- * entry with type id equal to the array index has been
- * flushed in the current epoch.
+ * are used to record the maximum number of times any single
+ * entry with type id equal to the array index has been
+ * flushed in the current epoch.
*
- * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_size: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum size of any single entry
- * with type id equal to the array index that has resided in
- * the cache in the current epoch.
+ * with type id equal to the array index that has resided in
+ * the cache in the current epoch.
*
- * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
+ * max_pins: Array of size_t of length H5C__MAX_NUM_TYPE_IDS + 1. The cells
* are used to record the maximum number of times that any single
* entry with type id equal to the array index that has been
* marked as pinned in the cache in the current epoch.
@@ -4639,9 +4639,9 @@ typedef struct H5C_tag_info_t {
*
* Fields supporting testing:
*
- * prefix Array of char used to prefix debugging output. The
- * field is intended to allow marking of output of with
- * the processes mpi rank.
+ * prefix Array of char used to prefix debugging output. The
+ * field is intended to allow marking of output of with
+ * the processes mpi rank.
*
* get_entry_ptr_from_addr_counter: Counter used to track the number of
* times the H5C_get_entry_ptr_from_addr() function has been
@@ -4650,146 +4650,146 @@ typedef struct H5C_tag_info_t {
*
****************************************************************************/
struct H5C_t {
- uint32_t magic;
- hbool_t flush_in_progress;
+ uint32_t magic;
+ hbool_t flush_in_progress;
H5C_log_info_t *log_info;
- void * aux_ptr;
- int32_t max_type_id;
+ void * aux_ptr;
+ int32_t max_type_id;
const H5C_class_t * const *class_table_ptr;
size_t max_cache_size;
size_t min_clean_size;
- H5C_write_permitted_func_t check_write_permitted;
- hbool_t write_permitted;
- H5C_log_flush_func_t log_flush;
- hbool_t evictions_enabled;
- hbool_t close_warning_received;
+ H5C_write_permitted_func_t check_write_permitted;
+ hbool_t write_permitted;
+ H5C_log_flush_func_t log_flush;
+ hbool_t evictions_enabled;
+ hbool_t close_warning_received;
/* Fields for maintaining [hash table] index of entries */
uint32_t index_len;
size_t index_size;
- uint32_t index_ring_len[H5C_RING_NTYPES];
- size_t index_ring_size[H5C_RING_NTYPES];
- size_t clean_index_size;
- size_t clean_index_ring_size[H5C_RING_NTYPES];
- size_t dirty_index_size;
- size_t dirty_index_ring_size[H5C_RING_NTYPES];
- H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN];
+ uint32_t index_ring_len[H5C_RING_NTYPES];
+ size_t index_ring_size[H5C_RING_NTYPES];
+ size_t clean_index_size;
+ size_t clean_index_ring_size[H5C_RING_NTYPES];
+ size_t dirty_index_size;
+ size_t dirty_index_ring_size[H5C_RING_NTYPES];
+ H5C_cache_entry_t * index[H5C__HASH_TABLE_LEN];
uint32_t il_len;
size_t il_size;
- H5C_cache_entry_t * il_head;
- H5C_cache_entry_t * il_tail;
+ H5C_cache_entry_t * il_head;
+ H5C_cache_entry_t * il_tail;
/* Fields to detect entries removed during scans */
- int64_t entries_removed_counter;
- H5C_cache_entry_t * last_entry_removed_ptr;
- H5C_cache_entry_t * entry_watched_for_removal;
+ int64_t entries_removed_counter;
+ H5C_cache_entry_t * last_entry_removed_ptr;
+ H5C_cache_entry_t * entry_watched_for_removal;
/* Fields for maintaining list of in-order entries, for flushing */
- hbool_t slist_changed;
+ hbool_t slist_changed;
uint32_t slist_len;
size_t slist_size;
- uint32_t slist_ring_len[H5C_RING_NTYPES];
- size_t slist_ring_size[H5C_RING_NTYPES];
+ uint32_t slist_ring_len[H5C_RING_NTYPES];
+ size_t slist_ring_size[H5C_RING_NTYPES];
H5SL_t * slist_ptr;
uint32_t num_last_entries;
#if H5C_DO_SANITY_CHECKS
- int32_t slist_len_increase;
- int64_t slist_size_increase;
+ int32_t slist_len_increase;
+ int64_t slist_size_increase;
#endif /* H5C_DO_SANITY_CHECKS */
/* Fields for maintaining list of tagged entries */
H5SL_t * tag_list;
hbool_t ignore_tags;
- uint32_t num_objs_corked;
+ uint32_t num_objs_corked;
/* Fields for tracking protected entries */
uint32_t pl_len;
size_t pl_size;
- H5C_cache_entry_t * pl_head_ptr;
- H5C_cache_entry_t * pl_tail_ptr;
+ H5C_cache_entry_t * pl_head_ptr;
+ H5C_cache_entry_t * pl_tail_ptr;
/* Fields for tracking pinned entries */
uint32_t pel_len;
size_t pel_size;
- H5C_cache_entry_t * pel_head_ptr;
- H5C_cache_entry_t * pel_tail_ptr;
+ H5C_cache_entry_t * pel_head_ptr;
+ H5C_cache_entry_t * pel_tail_ptr;
/* Fields for complete LRU list of entries */
uint32_t LRU_list_len;
size_t LRU_list_size;
- H5C_cache_entry_t * LRU_head_ptr;
- H5C_cache_entry_t * LRU_tail_ptr;
+ H5C_cache_entry_t * LRU_head_ptr;
+ H5C_cache_entry_t * LRU_tail_ptr;
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
/* Fields for clean LRU list of entries */
uint32_t cLRU_list_len;
size_t cLRU_list_size;
- H5C_cache_entry_t * cLRU_head_ptr;
- H5C_cache_entry_t * cLRU_tail_ptr;
+ H5C_cache_entry_t * cLRU_head_ptr;
+ H5C_cache_entry_t * cLRU_tail_ptr;
/* Fields for dirty LRU list of entries */
uint32_t dLRU_list_len;
size_t dLRU_list_size;
- H5C_cache_entry_t * dLRU_head_ptr;
- H5C_cache_entry_t * dLRU_tail_ptr;
+ H5C_cache_entry_t * dLRU_head_ptr;
+ H5C_cache_entry_t * dLRU_tail_ptr;
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
#ifdef H5_HAVE_PARALLEL
/* Fields for collective metadata reads */
uint32_t coll_list_len;
size_t coll_list_size;
- H5C_cache_entry_t * coll_head_ptr;
- H5C_cache_entry_t * coll_tail_ptr;
+ H5C_cache_entry_t * coll_head_ptr;
+ H5C_cache_entry_t * coll_tail_ptr;
/* Fields for collective metadata writes */
H5SL_t * coll_write_list;
#endif /* H5_HAVE_PARALLEL */
/* Fields for automatic cache size adjustment */
- hbool_t size_increase_possible;
- hbool_t flash_size_increase_possible;
- size_t flash_size_increase_threshold;
- hbool_t size_decrease_possible;
- hbool_t resize_enabled;
- hbool_t cache_full;
- hbool_t size_decreased;
- hbool_t resize_in_progress;
- hbool_t msic_in_progress;
- H5C_auto_size_ctl_t resize_ctl;
+ hbool_t size_increase_possible;
+ hbool_t flash_size_increase_possible;
+ size_t flash_size_increase_threshold;
+ hbool_t size_decrease_possible;
+ hbool_t resize_enabled;
+ hbool_t cache_full;
+ hbool_t size_decreased;
+ hbool_t resize_in_progress;
+ hbool_t msic_in_progress;
+ H5C_auto_size_ctl_t resize_ctl;
/* Fields for epoch markers used in automatic cache size adjustment */
- int32_t epoch_markers_active;
- hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
- int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
- int32_t epoch_marker_ringbuf_first;
- int32_t epoch_marker_ringbuf_last;
- int32_t epoch_marker_ringbuf_size;
- H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
+ int32_t epoch_markers_active;
+ hbool_t epoch_marker_active[H5C__MAX_EPOCH_MARKERS];
+ int32_t epoch_marker_ringbuf[H5C__MAX_EPOCH_MARKERS+1];
+ int32_t epoch_marker_ringbuf_first;
+ int32_t epoch_marker_ringbuf_last;
+ int32_t epoch_marker_ringbuf_size;
+ H5C_cache_entry_t epoch_markers[H5C__MAX_EPOCH_MARKERS];
/* Fields for cache hit rate collection */
- int64_t cache_hits;
- int64_t cache_accesses;
+ int64_t cache_hits;
+ int64_t cache_accesses;
/* fields supporting generation of a cache image on file close */
- H5C_cache_image_ctl_t image_ctl;
- hbool_t serialization_in_progress;
- hbool_t load_image;
+ H5C_cache_image_ctl_t image_ctl;
+ hbool_t serialization_in_progress;
+ hbool_t load_image;
hbool_t image_loaded;
- hbool_t delete_image;
- haddr_t image_addr;
- hsize_t image_len;
- hsize_t image_data_len;
- int64_t entries_loaded_counter;
- int64_t entries_inserted_counter;
- int64_t entries_relocated_counter;
- int64_t entry_fd_height_change_counter;
- uint32_t num_entries_in_image;
- H5C_image_entry_t * image_entries;
+ hbool_t delete_image;
+ haddr_t image_addr;
+ hsize_t image_len;
+ hsize_t image_data_len;
+ int64_t entries_loaded_counter;
+ int64_t entries_inserted_counter;
+ int64_t entries_relocated_counter;
+ int64_t entry_fd_height_change_counter;
+ uint32_t num_entries_in_image;
+ H5C_image_entry_t * image_entries;
void * image_buffer;
/* Free Space Manager Related fields */
- hbool_t rdfsm_settled;
- hbool_t mdfsm_settled;
+ hbool_t rdfsm_settled;
+ hbool_t mdfsm_settled;
#if H5C_COLLECT_CACHE_STATS
/* stats fields */
@@ -4818,12 +4818,12 @@ struct H5C_t {
int64_t cache_flush_size_changes[H5C__MAX_NUM_TYPE_IDS + 1];
/* Fields for hash table operations */
- int64_t total_ht_insertions;
- int64_t total_ht_deletions;
- int64_t successful_ht_searches;
- int64_t total_successful_ht_search_depth;
- int64_t failed_ht_searches;
- int64_t total_failed_ht_search_depth;
+ int64_t total_ht_insertions;
+ int64_t total_ht_deletions;
+ int64_t successful_ht_searches;
+ int64_t total_successful_ht_search_depth;
+ int64_t failed_ht_searches;
+ int64_t total_failed_ht_search_depth;
uint32_t max_index_len;
size_t max_index_size;
size_t max_clean_index_size;
@@ -4852,20 +4852,20 @@ struct H5C_t {
int64_t entries_scanned_to_make_space;
/* Fields for tracking skip list scan restarts */
- int64_t slist_scan_restarts;
- int64_t LRU_scan_restarts;
- int64_t index_scan_restarts;
+ int64_t slist_scan_restarts;
+ int64_t LRU_scan_restarts;
+ int64_t index_scan_restarts;
/* Fields for tracking cache image operations */
- int32_t images_created;
- int32_t images_read;
- int32_t images_loaded;
- hsize_t last_image_size;
+ int32_t images_created;
+ int32_t images_read;
+ int32_t images_loaded;
+ hsize_t last_image_size;
/* Fields for tracking prefetched entries */
- int64_t prefetches;
- int64_t dirty_prefetches;
- int64_t prefetch_hits;
+ int64_t prefetches;
+ int64_t dirty_prefetches;
+ int64_t prefetch_hits;
#if H5C_COLLECT_CACHE_ENTRY_STATS
int32_t max_accesses[H5C__MAX_NUM_TYPE_IDS + 1];
@@ -4877,7 +4877,7 @@ struct H5C_t {
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
#endif /* H5C_COLLECT_CACHE_STATS */
- char prefix[H5C__PREFIX_LEN];
+ char prefix[H5C__PREFIX_LEN];
#ifndef NDEBUG
int64_t get_entry_ptr_from_addr_counter;
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h
index 8b42949..d20cb55 100644
--- a/src/H5Cprivate.h
+++ b/src/H5Cprivate.h
@@ -13,12 +13,12 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Cprivate.h
- * 6/3/04
- * John Mainzer
+ * Created: H5Cprivate.h
+ * 6/3/04
+ * John Mainzer
*
- * Purpose: Constants and typedefs available to the rest of the
- * library.
+ * Purpose: Constants and typedefs available to the rest of the
+ * library.
*
*-------------------------------------------------------------------------
*/
@@ -26,11 +26,11 @@
#ifndef _H5Cprivate_H
#define _H5Cprivate_H
-#include "H5Cpublic.h" /* public prototypes */
+#include "H5Cpublic.h" /* public prototypes */
/* Private headers needed by this header */
-#include "H5private.h" /* Generic Functions */
-#include "H5Fprivate.h" /* File access */
+#include "H5private.h" /* Generic Functions */
+#include "H5Fprivate.h" /* File access */
/**************************/
/* Library Private Macros */
@@ -44,9 +44,9 @@
* or decrease it if appropriate. Its purposes is to detect corrupt
* object sizes, so it probably doesn't matter if it is a bit big.
*
- * JRM - 5/17/04
+ * JRM - 5/17/04
*/
-#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
+#define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024))
#ifdef H5_HAVE_PARALLEL
/* we must maintain the clean and dirty LRU lists when we are compiled
@@ -69,9 +69,9 @@
#define H5C__CLASS_SKIP_WRITES ((unsigned)0x4)
/* Flags for pre-serialize callback */
-#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0)
-#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1)
-#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2)
+#define H5C__SERIALIZE_NO_FLAGS_SET ((unsigned)0)
+#define H5C__SERIALIZE_RESIZED_FLAG ((unsigned)0x1)
+#define H5C__SERIALIZE_MOVED_FLAG ((unsigned)0x2)
/* Upper and lower limits on cache size. These limits are picked
* out of a hat -- you should be able to change them as necessary.
@@ -81,8 +81,8 @@
* upper bound on cache size is rather large for the current hash table
* size.
*/
-#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
-#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
+#define H5C__MAX_MAX_CACHE_SIZE ((size_t)(128 * 1024 * 1024))
+#define H5C__MIN_MAX_CACHE_SIZE ((size_t)(1024))
/* Default max cache size and min clean size are give here to make
* them generally accessible.
@@ -91,8 +91,8 @@
#define H5C__DEFAULT_MIN_CLEAN_SIZE ((size_t)(2 * 1024 * 1024))
/* Values for cache entry magic field */
-#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
-#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
+#define H5C__H5C_CACHE_ENTRY_T_MAGIC 0x005CAC0A
+#define H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC 0xDeadBeef
/* Cache configuration validation definitions */
#define H5C_RESIZE_CFG__VALIDATE_GENERAL 0x1
@@ -108,28 +108,28 @@
)
/* Cache configuration versions */
-#define H5C__CURR_AUTO_SIZE_CTL_VER 1
-#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
-#define H5C__CURR_CACHE_IMAGE_CTL_VER 1
+#define H5C__CURR_AUTO_SIZE_CTL_VER 1
+#define H5C__CURR_AUTO_RESIZE_RPT_FCN_VER 1
+#define H5C__CURR_CACHE_IMAGE_CTL_VER 1
/* Default configuration settings */
-#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
-#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
-#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
-#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
-#define H5C__DEF_AR_INCREMENT 2.0f
-#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
+#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
+#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
+#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
+#define H5C__DEF_AR_INIT_SIZE ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_SIZE ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
+#define H5C__DEF_AR_INCREMENT 2.0f
+#define H5C__DEF_AR_MAX_INCREMENT ((size_t)( 2 * 1024 * 1024))
#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
-#define H5C__DEF_AR_DECREMENT 0.9f
-#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
-#define H5C__DEF_AR_EPCHS_B4_EVICT 3
-#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
-#define H5C__MIN_AR_EPOCH_LENGTH 100
-#define H5C__DEF_AR_EPOCH_LENGTH 50000
-#define H5C__MAX_AR_EPOCH_LENGTH 1000000
+#define H5C__DEF_AR_DECREMENT 0.9f
+#define H5C__DEF_AR_MAX_DECREMENT ((size_t)( 1 * 1024 * 1024))
+#define H5C__DEF_AR_EPCHS_B4_EVICT 3
+#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
+#define H5C__MIN_AR_EPOCH_LENGTH 100
+#define H5C__DEF_AR_EPOCH_LENGTH 50000
+#define H5C__MAX_AR_EPOCH_LENGTH 1000000
/* #defines of flags used in the flags parameters in some of the
* following function calls. Note that not all flags are applicable
@@ -137,67 +137,67 @@
* function are ignored in that function.
*
* These flags apply to all function calls:
- * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
+ * H5C__NO_FLAGS_SET (generic "no flags set" for all fcn calls)
*
*
* These flags apply to H5C_insert_entry():
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__PIN_ENTRY_FLAG
- * H5C__FLUSH_LAST_FLAG ; super block only
- * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__PIN_ENTRY_FLAG
+ * H5C__FLUSH_LAST_FLAG ; super block only
+ * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
*
* These flags apply to H5C_protect()
- * H5C__READ_ONLY_FLAG
- * H5C__FLUSH_LAST_FLAG ; super block only
- * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
+ * H5C__READ_ONLY_FLAG
+ * H5C__FLUSH_LAST_FLAG ; super block only
+ * H5C__FLUSH_COLLECTIVELY_FLAG ; super block only
*
* These flags apply to H5C_unprotect():
- * H5C__SET_FLUSH_MARKER_FLAG
- * H5C__DELETED_FLAG
- * H5C__DIRTIED_FLAG
- * H5C__PIN_ENTRY_FLAG
- * H5C__UNPIN_ENTRY_FLAG
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__SET_FLUSH_MARKER_FLAG
+ * H5C__DELETED_FLAG
+ * H5C__DIRTIED_FLAG
+ * H5C__PIN_ENTRY_FLAG
+ * H5C__UNPIN_ENTRY_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
*
* These flags apply to H5C_expunge_entry():
- * H5C__FREE_FILE_SPACE_FLAG
+ * H5C__FREE_FILE_SPACE_FLAG
*
* These flags apply to H5C_evict():
- * H5C__EVICT_ALLOW_LAST_PINS_FLAG
+ * H5C__EVICT_ALLOW_LAST_PINS_FLAG
*
* These flags apply to H5C_flush_cache():
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
- * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
- * with H5C__FLUSH_INVALIDATE_FLAG)
- * H5C__DURING_FLUSH_FLAG
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_IGNORE_PROTECTED_FLAG (can't use this flag in combination
+ * with H5C__FLUSH_INVALIDATE_FLAG)
+ * H5C__DURING_FLUSH_FLAG
*
* These flags apply to H5C_flush_single_entry():
- * H5C__FLUSH_INVALIDATE_FLAG
- * H5C__FLUSH_CLEAR_ONLY_FLAG
- * H5C__FLUSH_MARKED_ENTRIES_FLAG
+ * H5C__FLUSH_INVALIDATE_FLAG
+ * H5C__FLUSH_CLEAR_ONLY_FLAG
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG
* H5C__TAKE_OWNERSHIP_FLAG
* H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG
* H5C__GENERATE_IMAGE_FLAG
* H5C__UPDATE_PAGE_BUFFER_FLAG
*/
-#define H5C__NO_FLAGS_SET 0x00000
-#define H5C__SET_FLUSH_MARKER_FLAG 0x00001
-#define H5C__DELETED_FLAG 0x00002
-#define H5C__DIRTIED_FLAG 0x00004
-#define H5C__PIN_ENTRY_FLAG 0x00008
-#define H5C__UNPIN_ENTRY_FLAG 0x00010
-#define H5C__FLUSH_INVALIDATE_FLAG 0x00020
-#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040
-#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080
-#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100
-#define H5C__READ_ONLY_FLAG 0x00200
-#define H5C__FREE_FILE_SPACE_FLAG 0x00400
-#define H5C__TAKE_OWNERSHIP_FLAG 0x00800
-#define H5C__FLUSH_LAST_FLAG 0x01000
-#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000
+#define H5C__NO_FLAGS_SET 0x00000
+#define H5C__SET_FLUSH_MARKER_FLAG 0x00001
+#define H5C__DELETED_FLAG 0x00002
+#define H5C__DIRTIED_FLAG 0x00004
+#define H5C__PIN_ENTRY_FLAG 0x00008
+#define H5C__UNPIN_ENTRY_FLAG 0x00010
+#define H5C__FLUSH_INVALIDATE_FLAG 0x00020
+#define H5C__FLUSH_CLEAR_ONLY_FLAG 0x00040
+#define H5C__FLUSH_MARKED_ENTRIES_FLAG 0x00080
+#define H5C__FLUSH_IGNORE_PROTECTED_FLAG 0x00100
+#define H5C__READ_ONLY_FLAG 0x00200
+#define H5C__FREE_FILE_SPACE_FLAG 0x00400
+#define H5C__TAKE_OWNERSHIP_FLAG 0x00800
+#define H5C__FLUSH_LAST_FLAG 0x01000
+#define H5C__FLUSH_COLLECTIVELY_FLAG 0x02000
#define H5C__EVICT_ALLOW_LAST_PINS_FLAG 0x04000
#define H5C__DEL_FROM_SLIST_ON_DESTROY_FLAG 0x08000
#define H5C__DURING_FLUSH_FLAG 0x10000 /* Set when the entire cache is being flushed */
@@ -206,18 +206,18 @@
/* Debugging/sanity checking/statistics settings */
#ifndef NDEBUG
-#define H5C_DO_SANITY_CHECKS 1
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 1
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
+#define H5C_DO_SANITY_CHECKS 1
+#define H5C_DO_SLIST_SANITY_CHECKS 0
+#define H5C_DO_TAGGING_SANITY_CHECKS 1
+#define H5C_DO_EXTREME_SANITY_CHECKS 0
#else /* NDEBUG */
/* With rare execptions, the following defines should be set
* to 0 if NDEBUG is defined
*/
-#define H5C_DO_SANITY_CHECKS 0
-#define H5C_DO_SLIST_SANITY_CHECKS 0
-#define H5C_DO_TAGGING_SANITY_CHECKS 0
-#define H5C_DO_EXTREME_SANITY_CHECKS 0
+#define H5C_DO_SANITY_CHECKS 0
+#define H5C_DO_SLIST_SANITY_CHECKS 0
+#define H5C_DO_TAGGING_SANITY_CHECKS 0
+#define H5C_DO_EXTREME_SANITY_CHECKS 0
#endif /* NDEBUG */
/* Cork actions: cork/uncork/get cork status of an object */
@@ -233,7 +233,7 @@
* routines that the fractal heap direct block (and global heap) serialize
* calls can use when resizing (and re-allocating) their image in the
* cache. -QAK */
-#define H5C_DO_MEMORY_SANITY_CHECKS 0
+#define H5C_DO_MEMORY_SANITY_CHECKS 0
/* H5C_COLLECT_CACHE_STATS controls overall collection of statistics
* on cache activity. In general, this #define should be set to 1 in
@@ -241,9 +241,9 @@
*/
#ifndef NDEBUG
-#define H5C_COLLECT_CACHE_STATS 1
+#define H5C_COLLECT_CACHE_STATS 1
#else /* NDEBUG */
-#define H5C_COLLECT_CACHE_STATS 0
+#define H5C_COLLECT_CACHE_STATS 0
#endif /* NDEBUG */
/* H5C_COLLECT_CACHE_ENTRY_STATS controls collection of statistics
@@ -253,9 +253,9 @@
* H5C_COLLECT_CACHE_STATS is also defined to true.
*/
#if H5C_COLLECT_CACHE_STATS
-#define H5C_COLLECT_CACHE_ENTRY_STATS 1
+#define H5C_COLLECT_CACHE_ENTRY_STATS 1
#else
-#define H5C_COLLECT_CACHE_ENTRY_STATS 0
+#define H5C_COLLECT_CACHE_ENTRY_STATS 0
#endif /* H5C_COLLECT_CACHE_STATS */
@@ -274,204 +274,204 @@ typedef struct H5C_t H5C_t;
* used by the metadata cache for each class of metadata cache entry.
* The fields of the structure are discussed below:
*
- * id: Integer field containing the unique ID of the class of metadata
- * cache entries.
+ * id: Integer field containing the unique ID of the class of metadata
+ * cache entries.
*
* name: Pointer to a string containing the name of the class of metadata
- * cache entries.
+ * cache entries.
*
* mem_type: Instance of H5FD_mem_t, that is used to supply the
- * mem type passed into H5F_block_read().
+ * mem type passed into H5F_block_read().
*
* flags: Flags indicating class-specific behavior.
*
- * Possible flags are:
+ * Possible flags are:
*
- * H5C__CLASS_NO_FLAGS_SET: No special processing.
+ * H5C__CLASS_NO_FLAGS_SET: No special processing.
*
- * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in
+ * H5C__CLASS_SPECULATIVE_LOAD_FLAG: This flag is used only in
* H5C_load_entry(). When it is set, entries are
- * permitted to change their sizes on the first attempt
- * to load.
- *
- * If the new size is larger than the old, the read buffer
- * is reallocated to the new size, loaded from file, and the
- * deserialize routine is called a second time on the
- * new buffer. The entry returned by the first call to
- * the deserialize routine is discarded (via the free_icr
- * call) after the new size is retrieved (via the image_len
- * call). Note that the new size is used as the size of the
- * entry in the cache.
- *
- * If the new size is smaller than the old, no new loads
- * or deserializes are performed, but the new size becomes
- * the size of the entry in the cache.
- *
- * When this flag is set, an attempt to read past the
- * end of file could occur. In this case, if the size
- * returned get_load_size callback would result in a
- * read past the end of file, the size is truncated to
- * avoid this, and processing proceeds as normal.
+ * permitted to change their sizes on the first attempt
+ * to load.
+ *
+ * If the new size is larger than the old, the read buffer
+ * is reallocated to the new size, loaded from file, and the
+ * deserialize routine is called a second time on the
+ * new buffer. The entry returned by the first call to
+ * the deserialize routine is discarded (via the free_icr
+ * call) after the new size is retrieved (via the image_len
+ * call). Note that the new size is used as the size of the
+ * entry in the cache.
+ *
+ * If the new size is smaller than the old, no new loads
+ * or deserializes are performed, but the new size becomes
+ * the size of the entry in the cache.
+ *
+ * When this flag is set, an attempt to read past the
+ * end of file could occur. In this case, if the size
+ * returned get_load_size callback would result in a
+ * read past the end of file, the size is truncated to
+ * avoid this, and processing proceeds as normal.
*
* The following flags may only appear in test code.
*
- * H5C__CLASS_SKIP_READS: This flags is intended only for use in test
- * code. When it is set, reads on load will be skipped,
- * and an uninitialize buffer will be passed to the
- * deserialize function.
+ * H5C__CLASS_SKIP_READS: This flags is intended only for use in test
+ * code. When it is set, reads on load will be skipped,
+ * and an uninitialize buffer will be passed to the
+ * deserialize function.
*
- * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test
- * code. When it is set, writes of buffers prepared by the
- * serialize callback will be skipped.
+ * H5C__CLASS_SKIP_WRITES: This flags is intended only for use in test
+ * code. When it is set, writes of buffers prepared by the
+ * serialize callback will be skipped.
*
* GET_INITIAL_LOAD_SIZE: Pointer to the 'get initial load size' function.
*
- * This function determines the size based on the information in the
- * parameter "udata" or an initial speculative guess. The size is
- * returned in the parameter "image_len_ptr".
+ * This function determines the size based on the information in the
+ * parameter "udata" or an initial speculative guess. The size is
+ * returned in the parameter "image_len_ptr".
*
- * For an entry with H5C__CLASS_NO_FLAGS_SET:
- * This function returns in "image_len_ptr" the on disk size of the
+ * For an entry with H5C__CLASS_NO_FLAGS_SET:
+ * This function returns in "image_len_ptr" the on disk size of the
* entry.
*
- * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG:
- * This function returns in "image_len_ptr" an initial guess of the
+ * For an entry with H5C__CLASS_SPECULATIVE_LOAD_FLAG:
+ * This function returns in "image_len_ptr" an initial guess of the
* entry's on disk size. This many bytes will be loaded from
* the file and then passed to 'get_final_load_size' callback
* for the actual (final) image length to be determined.
*
- * The typedef for the get_initial_load_size callback is as follows:
+ * The typedef for the get_initial_load_size callback is as follows:
*
- * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr,
- * size_t *image_len_ptr);
+ * typedef herr_t (*H5C_get_initial_load_size_func_t)(void *udata_ptr,
+ * size_t *image_len_ptr);
*
- * The parameters of the get_initial_load_size callback are as follows:
+ * The parameters of the get_initial_load_size callback are as follows:
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * will also be passed through to the 'get_final_load_size',
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * will also be passed through to the 'get_final_load_size',
* 'verify_chksum', and 'deserialize' callbacks.
*
- * image_len_ptr: Pointer to the length in bytes of the in-file image to
+ * image_len_ptr: Pointer to the length in bytes of the in-file image to
* be deserialized is to be returned.
*
* This value is used by the cache to determine the size of
* the disk image for the metadata, in order to read the disk
* image from the file.
*
- * Processing in the get_load_size function should proceed as follows:
+ * Processing in the get_load_size function should proceed as follows:
*
- * If successful, the function will place the length in the *image_len_ptr
+ * If successful, the function will place the length in the *image_len_ptr
* associated with supplied user data and then return SUCCEED.
*
- * On failure, the function must return FAIL and push error information
- * onto the error stack with the error API routines, without modifying
+ * On failure, the function must return FAIL and push error information
+ * onto the error stack with the error API routines, without modifying
* the value pointed to by image_len_ptr.
*
*
* GET_FINAL_LOAD_SIZE: Pointer to the 'get final load size' function.
*
- * This function determines the final size of a speculatively loaded
+ * This function determines the final size of a speculatively loaded
* metadata cache entry based on the parameter "image" and the "udata"
* parameters. This callback _must_ be implemented for cache clients
* which set the H5C__CLASS_SPECULATIVE_LOAD_FLAG and must return the
* actual length of on-disk image after being called once.
*
- * This function might deserialize the needed metadata information to
- * determine the actual size. The size is returned in the parameter
+ * This function might deserialize the needed metadata information to
+ * determine the actual size. The size is returned in the parameter
* "actual_len_ptr".
*
- * The typedef for the get_load_size callback is as follows:
+ * The typedef for the get_load_size callback is as follows:
*
- * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr,
- * size_t image_len,
- * void *udata_ptr,
- * size_t *actual_len_ptr);
+ * typedef herr_t (*H5C_get_final_load_size_func_t)(const void *image_ptr,
+ * size_t image_len,
+ * void *udata_ptr,
+ * size_t *actual_len_ptr);
*
- * The parameters of the get_load_size callback are as follows:
+ * The parameters of the get_load_size callback are as follows:
*
- * image_ptr: Pointer to a buffer containing the (possibly partial)
+ * image_ptr: Pointer to a buffer containing the (possibly partial)
* metadata read in.
*
- * image_len: The length in bytes of the (possibly partial) in-file image
+ * image_len: The length in bytes of the (possibly partial) in-file image
* to be queried for an actual length.
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * will also be passed through to the 'verify_chksum' and
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * will also be passed through to the 'verify_chksum' and
* 'deserialize' callbacks.
*
- * actual_len_ptr: Pointer to the location containing the actual length
- * of the metadata entry on disk.
+ * actual_len_ptr: Pointer to the location containing the actual length
+ * of the metadata entry on disk.
*
- * Processing in the get_final_load_size function should proceed as follows:
+ * Processing in the get_final_load_size function should proceed as follows:
*
- * If successful, the function will place the length in the *actual_len_ptr
+ * If successful, the function will place the length in the *actual_len_ptr
* associated with supplied image and/or user data and then return SUCCEED.
*
- * On failure, the function must return FAIL and push error information
- * onto the error stack with the error API routines, without modifying
+ * On failure, the function must return FAIL and push error information
+ * onto the error stack with the error API routines, without modifying
* the value pointed to by actual_len_ptr.
*
*
* VERIFY_CHKSUM: Pointer to the verify_chksum function.
*
- * This function verifies the checksum computed for the metadata is
- * the same as the checksum stored in the metadata.
+ * This function verifies the checksum computed for the metadata is
+ * the same as the checksum stored in the metadata.
*
- * It computes the checksum based on the metadata stored in the
- * parameter "image_ptr" and the actual length of the metadata in the
- * parameter "len" which is obtained from the "get_load_size" callback.
+ * It computes the checksum based on the metadata stored in the
+ * parameter "image_ptr" and the actual length of the metadata in the
+ * parameter "len" which is obtained from the "get_load_size" callback.
*
- * The typedef for the verify_chksum callback is as follows:
+ * The typedef for the verify_chksum callback is as follows:
*
- * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr,
- * size_t len,
- * void *udata_ptr);
+ * typedef htri_t (*H5C_verify_chksum_func_t)(const void *image_ptr,
+ * size_t len,
+ * void *udata_ptr);
*
- * The parameters of the verify_chksum callback are as follows:
+ * The parameters of the verify_chksum callback are as follows:
*
- * image_ptr: Pointer to a buffer containing the metadata read in.
+ * image_ptr: Pointer to a buffer containing the metadata read in.
*
- * len: The actual length of the metadata.
+ * len: The actual length of the metadata.
*
- * udata_ptr: Pointer to user data.
+ * udata_ptr: Pointer to user data.
*
*
* DESERIALIZE: Pointer to the deserialize function.
*
- * This function must be able to deserialize a buffer containing the
+ * This function must be able to deserialize a buffer containing the
* on-disk image of a metadata cache entry, allocate and initialize the
* equivalent in core representation, and return a pointer to that
* representation.
*
- * The typedef for the deserialize callback is as follows:
+ * The typedef for the deserialize callback is as follows:
*
- * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr,
- * size_t len,
+ * typedef void *(*H5C_deserialize_func_t)(const void * image_ptr,
+ * size_t len,
* void * udata_ptr,
* boolean * dirty_ptr);
*
- * The parameters of the deserialize callback are as follows:
+ * The parameters of the deserialize callback are as follows:
*
- * image_ptr: Pointer to a buffer of length len containing the
- * contents of the file starting at addr and continuing
- * for len bytes.
+ * image_ptr: Pointer to a buffer of length len containing the
+ * contents of the file starting at addr and continuing
+ * for len bytes.
*
- * len: Length in bytes of the in file image to be deserialized.
+ * len: Length in bytes of the in file image to be deserialized.
*
* This parameter is supplied mainly for sanity checking.
* Sanity checks should be performed when compiled in debug
* mode, but the parameter may be unused when compiled in
* production mode.
*
- * udata_ptr: Pointer to user data provided in the protect call, which
- * must be passed through to the deserialize callback.
+ * udata_ptr: Pointer to user data provided in the protect call, which
+ * must be passed through to the deserialize callback.
*
* dirty_ptr: Pointer to boolean which the deserialize function
- * must use to mark the entry dirty if it has to modify
- * the entry to clean up file corruption left over from
- * an old bug in the HDF5 library.
+ * must use to mark the entry dirty if it has to modify
+ * the entry to clean up file corruption left over from
+ * an old bug in the HDF5 library.
*
- * Processing in the deserialize function should proceed as follows:
+ * Processing in the deserialize function should proceed as follows:
*
* If the image contains valid data, and is of the correct length,
* the deserialize function must allocate space for an in-core
@@ -499,7 +499,7 @@ typedef struct H5C_t H5C_t;
*
* IMAGE_LEN: Pointer to the image length callback.
*
- * The image_len callback is used to obtain the size of newly inserted
+ * The image_len callback is used to obtain the size of newly inserted
* entries and assert verification.
*
* The typedef for the image_len callback is as follows:
@@ -507,29 +507,29 @@ typedef struct H5C_t H5C_t;
* typedef herr_t (*H5C_image_len_func_t)(void *thing,
* size_t *image_len_ptr);
*
- * The parameters of the image_len callback are as follows:
+ * The parameters of the image_len callback are as follows:
*
- * thing: Pointer to the in core representation of the entry.
+ * thing: Pointer to the in core representation of the entry.
*
- * image_len_ptr: Pointer to size_t in which the callback will return
- * the length (in bytes) of the cache entry.
+ * image_len_ptr: Pointer to size_t in which the callback will return
+ * the length (in bytes) of the cache entry.
*
- * Processing in the image_len function should proceed as follows:
+ * Processing in the image_len function should proceed as follows:
*
- * If successful, the function will place the length of the on disk
- * image associated with the in core representation provided in the
- * thing parameter in *image_len_ptr, and then return SUCCEED.
+ * If successful, the function will place the length of the on disk
+ * image associated with the in core representation provided in the
+ * thing parameter in *image_len_ptr, and then return SUCCEED.
*
- * If the function fails, it must return FAIL and push error information
+ * If the function fails, it must return FAIL and push error information
* onto the error stack with the error API routines, and return without
* modifying the values pointed to by the image_len_ptr parameter.
*
*
* PRE_SERIALIZE: Pointer to the pre-serialize callback.
*
- * The pre-serialize callback is invoked by the metadata cache before
- * it needs a current on-disk image of the metadata entry for purposes
- * either constructing a journal or flushing the entry to disk.
+ * The pre-serialize callback is invoked by the metadata cache before
+ * it needs a current on-disk image of the metadata entry for purposes
+ * either constructing a journal or flushing the entry to disk.
*
* If the client needs to change the address or length of the entry prior
* to flush, the pre-serialize callback is responsible for these actions,
@@ -537,28 +537,28 @@ typedef struct H5C_t H5C_t;
* responsible for serializing the data structure, not moving it on disk
* or resizing it.
*
- * In addition, the client may use the pre-serialize callback to
- * ensure that the entry is ready to be flushed -- in particular,
- * if the entry contains references to other entries that are in
- * temporary file space, the pre-serialize callback must move those
- * entries into real file space so that the serialzed entry will
- * contain no invalid data.
+ * In addition, the client may use the pre-serialize callback to
+ * ensure that the entry is ready to be flushed -- in particular,
+ * if the entry contains references to other entries that are in
+ * temporary file space, the pre-serialize callback must move those
+ * entries into real file space so that the serialzed entry will
+ * contain no invalid data.
*
- * One would think that the base address and length of
- * the length of the entry's image on disk would be well known.
- * However, that need not be the case as free space section info
- * entries will change size (and possibly location) depending on the
- * number of blocks of free space being manages, and fractal heap
- * direct blocks can change compressed size (and possibly location)
- * on serialization if compression is enabled. Similarly, it may
- * be necessary to move entries from temporary to real file space.
+ * One would think that the base address and length of
+ * the length of the entry's image on disk would be well known.
+ * However, that need not be the case as free space section info
+ * entries will change size (and possibly location) depending on the
+ * number of blocks of free space being manages, and fractal heap
+ * direct blocks can change compressed size (and possibly location)
+ * on serialization if compression is enabled. Similarly, it may
+ * be necessary to move entries from temporary to real file space.
*
- * The pre-serialize callback must report any such changes to the
- * cache, which must then update its internal structures as needed.
+ * The pre-serialize callback must report any such changes to the
+ * cache, which must then update its internal structures as needed.
*
- * The typedef for the pre-serialize callback is as follows:
+ * The typedef for the pre-serialize callback is as follows:
*
- * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f,
+ * typedef herr_t (*H5C_pre_serialize_func_t)(H5F_t *f,
* void * thing,
* haddr_t addr,
* size_t len,
@@ -566,154 +566,154 @@ typedef struct H5C_t H5C_t;
* size_t * new_len_ptr,
* unsigned * flags_ptr);
*
- * The parameters of the pre-serialize callback are as follows:
+ * The parameters of the pre-serialize callback are as follows:
*
- * f: File pointer -- needed if other metadata cache entries
- * must be modified in the process of serializing the
- * target entry.
+ * f: File pointer -- needed if other metadata cache entries
+ * must be modified in the process of serializing the
+ * target entry.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry.
- * This is the same pointer returned by a protect of the
- * addr and len given above.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry.
+ * This is the same pointer returned by a protect of the
+ * addr and len given above.
*
- * addr: Base address in file of the entry to be serialized.
+ * addr: Base address in file of the entry to be serialized.
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * len: Length in bytes of the in file image of the entry to be
- * serialized. Also the size the image passed to the
- * serialize callback (discussed below) unless that
- * value is altered by this function.
+ * len: Length in bytes of the in file image of the entry to be
+ * serialized. Also the size the image passed to the
+ * serialize callback (discussed below) unless that
+ * value is altered by this function.
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * new_addr_ptr: Pointer to haddr_t. If the entry is moved by
- * the serialize function, the new on disk base address must
- * be stored in *new_addr_ptr, and the appropriate flag set
- * in *flags_ptr.
+ * new_addr_ptr: Pointer to haddr_t. If the entry is moved by
+ * the serialize function, the new on disk base address must
+ * be stored in *new_addr_ptr, and the appropriate flag set
+ * in *flags_ptr.
*
- * If the entry is not moved by the serialize function,
- * *new_addr_ptr is undefined on pre-serialize callback
- * return.
+ * If the entry is not moved by the serialize function,
+ * *new_addr_ptr is undefined on pre-serialize callback
+ * return.
*
- * new_len_ptr: Pointer to size_t. If the entry is resized by the
- * serialize function, the new length of the on disk image
- * must be stored in *new_len_ptr, and the appropriate flag set
+ * new_len_ptr: Pointer to size_t. If the entry is resized by the
+ * serialize function, the new length of the on disk image
+ * must be stored in *new_len_ptr, and the appropriate flag set
* in *flags_ptr.
*
- * If the entry is not resized by the pre-serialize function,
- * *new_len_ptr is undefined on pre-serialize callback
- * return.
+ * If the entry is not resized by the pre-serialize function,
+ * *new_len_ptr is undefined on pre-serialize callback
+ * return.
*
- * flags_ptr: Pointer to an unsigned integer used to return flags
- * indicating whether the preserialize function resized or moved
- * the entry. If the entry was neither resized or moved, the
+ * flags_ptr: Pointer to an unsigned integer used to return flags
+ * indicating whether the preserialize function resized or moved
+ * the entry. If the entry was neither resized or moved, the
* serialize function must set *flags_ptr to zero. The
* H5C__SERIALIZE_RESIZED_FLAG or H5C__SERIALIZE_MOVED_FLAG must
* be set to indicate a resize or move respectively.
*
- * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
- * must be stored in *new_len_ptr.
+ * If the H5C__SERIALIZE_RESIZED_FLAG is set, the new length
+ * must be stored in *new_len_ptr.
*
- * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the
- * new image base address must be stored in *new_addr_ptr.
+ * If the H5C__SERIALIZE_MOVED_FLAG flag is set, the
+ * new image base address must be stored in *new_addr_ptr.
*
- * Processing in the pre-serialize function should proceed as follows:
+ * Processing in the pre-serialize function should proceed as follows:
*
- * The pre-serialize function must examine the in core representation
- * indicated by the thing parameter, if the pre-serialize function does
+ * The pre-serialize function must examine the in core representation
+ * indicated by the thing parameter, if the pre-serialize function does
* not need to change the size or location of the on-disk image, it must
* set *flags_ptr to zero.
*
- * If the size of the on-disk image must be changed, the pre-serialize
+ * If the size of the on-disk image must be changed, the pre-serialize
* function must load the length of the new image into *new_len_ptr, and
* set the H5C__SERIALIZE_RESIZED_FLAG in *flags_ptr.
*
- * If the base address of the on disk image must be changed, the
+ * If the base address of the on disk image must be changed, the
* pre-serialize function must set *new_addr_ptr to the new base address,
* and set the H5C__SERIALIZE_MOVED_FLAG in *flags_ptr.
*
- * In addition, the pre-serialize callback may perform any other
- * processing required before the entry is written to disk
+ * In addition, the pre-serialize callback may perform any other
+ * processing required before the entry is written to disk
*
- * If it is successful, the function must return SUCCEED.
+ * If it is successful, the function must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* SERIALIZE: Pointer to the serialize callback.
*
- * The serialize callback is invoked by the metadata cache whenever
- * it needs a current on disk image of the metadata entry for purposes
- * either constructing a journal entry or flushing the entry to disk.
+ * The serialize callback is invoked by the metadata cache whenever
+ * it needs a current on disk image of the metadata entry for purposes
+ * either constructing a journal entry or flushing the entry to disk.
*
- * At this point, the base address and length of the entry's image on
+ * At this point, the base address and length of the entry's image on
* disk must be well known and not change during the serialization
* process.
*
- * While any size and/or location changes must have been handled
- * by a pre-serialize call, the client may elect to handle any other
- * changes to the entry required to place it in correct form for
- * writing to disk in this call.
+ * While any size and/or location changes must have been handled
+ * by a pre-serialize call, the client may elect to handle any other
+ * changes to the entry required to place it in correct form for
+ * writing to disk in this call.
*
- * The typedef for the serialize callback is as follows:
+ * The typedef for the serialize callback is as follows:
*
- * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f,
+ * typedef herr_t (*H5C_serialize_func_t)(const H5F_t *f,
* void * image_ptr,
* size_t len,
* void * thing);
*
- * The parameters of the serialize callback are as follows:
+ * The parameters of the serialize callback are as follows:
*
- * f: File pointer -- needed if other metadata cache entries
- * must be modified in the process of serializing the
- * target entry.
+ * f: File pointer -- needed if other metadata cache entries
+ * must be modified in the process of serializing the
+ * target entry.
*
- * image_ptr: Pointer to a buffer of length len bytes into which a
- * serialized image of the target metadata cache entry is
- * to be written.
+ * image_ptr: Pointer to a buffer of length len bytes into which a
+ * serialized image of the target metadata cache entry is
+ * to be written.
*
- * Note that this buffer will not in general be initialized
- * to any particular value. Thus the serialize function may
- * not assume any initial value and must set each byte in
- * the buffer.
+ * Note that this buffer will not in general be initialized
+ * to any particular value. Thus the serialize function may
+ * not assume any initial value and must set each byte in
+ * the buffer.
*
- * len: Length in bytes of the in file image of the entry to be
- * serialized. Also the size of *image_ptr (below).
+ * len: Length in bytes of the in file image of the entry to be
+ * serialized. Also the size of *image_ptr (below).
*
- * This parameter is supplied mainly for sanity checking.
- * Sanity checks should be performed when compiled in debug
- * mode, but the parameter may be unused when compiled in
- * production mode.
+ * This parameter is supplied mainly for sanity checking.
+ * Sanity checks should be performed when compiled in debug
+ * mode, but the parameter may be unused when compiled in
+ * production mode.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry.
- * This is the same pointer returned by a protect of the
- * addr and len given above.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry.
+ * This is the same pointer returned by a protect of the
+ * addr and len given above.
*
- * Processing in the serialize function should proceed as follows:
+ * Processing in the serialize function should proceed as follows:
*
- * If there are any remaining changes to the entry required before
- * write to disk, they must be dealt with first.
+ * If there are any remaining changes to the entry required before
+ * write to disk, they must be dealt with first.
*
- * The serialize function must then examine the in core
- * representation indicated by the thing parameter, and write a
- * serialized image of its contents into the provided buffer.
+ * The serialize function must then examine the in core
+ * representation indicated by the thing parameter, and write a
+ * serialized image of its contents into the provided buffer.
*
- * If it is successful, the function must return SUCCEED.
+ * If it is successful, the function must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* NOTIFY: Pointer to the notify callback.
@@ -722,98 +722,98 @@ typedef struct H5C_t H5C_t;
* action on an entry has taken/will take place and the client indicates
* it wishes to be notified about the action.
*
- * The typedef for the notify callback is as follows:
+ * The typedef for the notify callback is as follows:
*
- * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action,
+ * typedef herr_t (*H5C_notify_func_t)(H5C_notify_action_t action,
* void *thing);
*
- * The parameters of the notify callback are as follows:
+ * The parameters of the notify callback are as follows:
*
- * action: An enum indicating the metadata cache action that has taken/
+ * action: An enum indicating the metadata cache action that has taken/
* will take place.
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry. This
- * is the same pointer that would be returned by a protect
- * of the addr and len of the entry.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry. This
+ * is the same pointer that would be returned by a protect
+ * of the addr and len of the entry.
*
- * Processing in the notify function should proceed as follows:
+ * Processing in the notify function should proceed as follows:
*
- * The notify function may perform any action it would like, including
+ * The notify function may perform any action it would like, including
* metadata cache calls.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
*
* FREE_ICR: Pointer to the free ICR callback.
*
- * The free ICR callback is invoked by the metadata cache when it
- * wishes to evict an entry, and needs the client to free the memory
- * allocated for the in core representation.
+ * The free ICR callback is invoked by the metadata cache when it
+ * wishes to evict an entry, and needs the client to free the memory
+ * allocated for the in core representation.
*
- * The typedef for the free ICR callback is as follows:
+ * The typedef for the free ICR callback is as follows:
*
- * typedef herr_t (*H5C_free_icr_func_t)(void * thing));
+ * typedef herr_t (*H5C_free_icr_func_t)(void * thing));
*
- * The parameters of the free ICR callback are as follows:
+ * The parameters of the free ICR callback are as follows:
*
- * thing: Pointer to void containing the address of the in core
- * representation of the target metadata cache entry. This
- * is the same pointer that would be returned by a protect
- * of the addr and len of the entry.
+ * thing: Pointer to void containing the address of the in core
+ * representation of the target metadata cache entry. This
+ * is the same pointer that would be returned by a protect
+ * of the addr and len of the entry.
*
- * Processing in the free ICR function should proceed as follows:
+ * Processing in the free ICR function should proceed as follows:
*
- * The free ICR function must free all memory allocated to the
- * in core representation.
+ * The free ICR function must free all memory allocated to the
+ * in core representation.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
- * If it fails for any reason, the function must return FAIL and
- * push error information on the error stack with the error API
- * routines.
+ * If it fails for any reason, the function must return FAIL and
+ * push error information on the error stack with the error API
+ * routines.
*
- * At least when compiled with debug, it would be useful if the
- * free ICR call would fail if the in core representation has been
- * modified since the last serialize callback.
+ * At least when compiled with debug, it would be useful if the
+ * free ICR call would fail if the in core representation has been
+ * modified since the last serialize callback.
*
* GET_FSF_SIZE: Pointer to the get file space free size callback.
*
- * In principle, there is no need for the get file space free size
- * callback. However, as an optimization, it is sometimes convenient
- * to allocate and free file space for a number of cache entries
- * simultaneously in a single contiguous block of file space.
+ * In principle, there is no need for the get file space free size
+ * callback. However, as an optimization, it is sometimes convenient
+ * to allocate and free file space for a number of cache entries
+ * simultaneously in a single contiguous block of file space.
*
- * File space allocation is done by the client, so the metadata cache
- * need not be involved. However, since the metadata cache typically
+ * File space allocation is done by the client, so the metadata cache
+ * need not be involved. However, since the metadata cache typically
* handles file space release when an entry is destroyed, some
- * adjustment on the part of the metadata cache is required for this
- * operation.
+ * adjustment on the part of the metadata cache is required for this
+ * operation.
*
* The get file space free size callback exists to support this
- * operation.
+ * operation.
*
- * If a group of cache entries that were allocated as a group are to
- * be discarded and their file space released, the type of the first
- * (i.e. lowest address) entry in the group must implement the
- * get free file space size callback.
+ * If a group of cache entries that were allocated as a group are to
+ * be discarded and their file space released, the type of the first
+ * (i.e. lowest address) entry in the group must implement the
+ * get free file space size callback.
*
- * To free the file space of all entries in the group in a single
- * operation, first expunge all entries other than the first without
- * the free file space flag.
+ * To free the file space of all entries in the group in a single
+ * operation, first expunge all entries other than the first without
+ * the free file space flag.
*
- * Then, to complete the operation, unprotect or expunge the first
- * entry in the block with the free file space flag set. Since
- * the get free file space callback is implemented, the metadata
- * cache will use this callback to get the size of the block to be
- * freed, instead of using the size of the entry as is done otherwise.
+ * Then, to complete the operation, unprotect or expunge the first
+ * entry in the block with the free file space flag set. Since
+ * the get free file space callback is implemented, the metadata
+ * cache will use this callback to get the size of the block to be
+ * freed, instead of using the size of the entry as is done otherwise.
*
- * At present this callback is used only by the H5FA and H5EA dblock
- * and dblock page client classes.
+ * At present this callback is used only by the H5FA and H5EA dblock
+ * and dblock page client classes.
*
* The typedef for the get_fsf_size callback is as follows:
*
@@ -827,15 +827,15 @@ typedef struct H5C_t H5C_t;
* is the same pointer that would be returned by a protect()
* call of the associated addr and len.
*
- * fs_size_ptr: Pointer to hsize_t in which the callback will return
+ * fs_size_ptr: Pointer to hsize_t in which the callback will return
* the size of the piece of file space to be freed. Note
- * that the space to be freed is presumed to have the same
- * base address as the cache entry.
+ * that the space to be freed is presumed to have the same
+ * base address as the cache entry.
*
* The function simply returns the size of the block of file space
- * to be freed in *fsf_size_ptr.
+ * to be freed in *fsf_size_ptr.
*
- * If the function is successful, it must return SUCCEED.
+ * If the function is successful, it must return SUCCEED.
*
* If it fails for any reason, the function must return FAIL and
* push error information on the error stack with the error API
@@ -848,11 +848,11 @@ typedef enum H5C_notify_action_t {
H5C_NOTIFY_ACTION_AFTER_INSERT, /* Entry has been added to the cache
* via the insert call
*/
- H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the
+ H5C_NOTIFY_ACTION_AFTER_LOAD, /* Entry has been loaded into the
* from file via the protect call
*/
- H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to
- * file.
+ H5C_NOTIFY_ACTION_AFTER_FLUSH, /* Entry has just been flushed to
+ * file.
*/
H5C_NOTIFY_ACTION_BEFORE_EVICT, /* Entry is about to be evicted
* from cache.
@@ -883,20 +883,20 @@ typedef herr_t (*H5C_get_fsf_size_t)(const void * thing, hsize_t *fsf_size_ptr);
/* Metadata cache client class definition */
typedef struct H5C_class_t {
- int id;
- const char * name;
- H5FD_mem_t mem_type;
- unsigned flags;
- H5C_get_initial_load_size_func_t get_initial_load_size;
- H5C_get_final_load_size_func_t get_final_load_size;
- H5C_verify_chksum_func_t verify_chksum;
- H5C_deserialize_func_t deserialize;
- H5C_image_len_func_t image_len;
- H5C_pre_serialize_func_t pre_serialize;
- H5C_serialize_func_t serialize;
- H5C_notify_func_t notify;
- H5C_free_icr_func_t free_icr;
- H5C_get_fsf_size_t fsf_size;
+ int id;
+ const char * name;
+ H5FD_mem_t mem_type;
+ unsigned flags;
+ H5C_get_initial_load_size_func_t get_initial_load_size;
+ H5C_get_final_load_size_func_t get_final_load_size;
+ H5C_verify_chksum_func_t verify_chksum;
+ H5C_deserialize_func_t deserialize;
+ H5C_image_len_func_t image_len;
+ H5C_pre_serialize_func_t pre_serialize;
+ H5C_serialize_func_t serialize;
+ H5C_notify_func_t notify;
+ H5C_free_icr_func_t free_icr;
+ H5C_get_fsf_size_t fsf_size;
} H5C_class_t;
/* Type definitions of callback functions used by the cache as a whole */
@@ -978,9 +978,9 @@ typedef int H5C_ring_t;
*
* The fields of this structure are discussed individually below:
*
- * JRM - 4/26/04
+ * JRM - 4/26/04
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C__H5C_CACHE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
@@ -999,129 +999,129 @@ typedef int H5C_ring_t;
* detect this case, and re-start its scan from the bottom
* of the LRU when this situation occurs.
*
- * cache_ptr: Pointer to the cache that this entry is contained within.
+ * cache_ptr: Pointer to the cache that this entry is contained within.
*
- * addr: Base address of the cache entry on disk.
+ * addr: Base address of the cache entry on disk.
*
- * size: Length of the cache entry on disk in bytes Note that unlike
+ * size: Length of the cache entry on disk in bytes Note that unlike
* normal caches, the entries in this cache are of arbitrary size.
*
- * The file space allocations for cache entries implied by the
+ * The file space allocations for cache entries implied by the
* addr and size fields must be disjoint.
*
- * image_ptr: Pointer to void. When not NULL, this field points to a
- * dynamically allocated block of size bytes in which the
- * on disk image of the metadata cache entry is stored.
+ * image_ptr: Pointer to void. When not NULL, this field points to a
+ * dynamically allocated block of size bytes in which the
+ * on disk image of the metadata cache entry is stored.
*
- * If the entry is dirty, the pre-serialize and serialize
- * callbacks must be used to update this image before it is
- * written to disk
+ * If the entry is dirty, the pre-serialize and serialize
+ * callbacks must be used to update this image before it is
+ * written to disk
*
* image_up_to_date: Boolean flag that is set to TRUE when *image_ptr
- * is up to date, and set to false when the entry is dirtied.
+ * is up to date, and set to false when the entry is dirtied.
*
- * type: Pointer to the instance of H5C_class_t containing pointers
- * to the methods for cache entries of the current type. This
- * field should be NULL when the instance of H5C_cache_entry_t
- * is not in use.
+ * type: Pointer to the instance of H5C_class_t containing pointers
+ * to the methods for cache entries of the current type. This
+ * field should be NULL when the instance of H5C_cache_entry_t
+ * is not in use.
*
- * The name is not particularly descriptive, but is retained
- * to avoid changes in existing code.
+ * The name is not particularly descriptive, but is retained
+ * to avoid changes in existing code.
*
- * is_dirty: Boolean flag indicating whether the contents of the cache
- * entry has been modified since the last time it was written
- * to disk.
+ * is_dirty: Boolean flag indicating whether the contents of the cache
+ * entry has been modified since the last time it was written
+ * to disk.
*
- * dirtied: Boolean flag used to indicate that the entry has been
- * dirtied while protected.
+ * dirtied: Boolean flag used to indicate that the entry has been
+ * dirtied while protected.
*
- * This field is set to FALSE in the protect call, and may
- * be set to TRUE by the H5C_mark_entry_dirty() call at any
- * time prior to the unprotect call.
+ * This field is set to FALSE in the protect call, and may
+ * be set to TRUE by the H5C_mark_entry_dirty() call at any
+ * time prior to the unprotect call.
*
- * The H5C_mark_entry_dirty() call exists as a convenience
- * function for the fractal heap code which may not know if
- * an entry is protected or pinned, but knows that is either
- * protected or pinned. The dirtied field was added as in
- * the parallel case, it is necessary to know whether a
- * protected entry is dirty prior to the protect call.
+ * The H5C_mark_entry_dirty() call exists as a convenience
+ * function for the fractal heap code which may not know if
+ * an entry is protected or pinned, but knows that is either
+ * protected or pinned. The dirtied field was added as in
+ * the parallel case, it is necessary to know whether a
+ * protected entry is dirty prior to the protect call.
*
* is_protected: Boolean flag indicating whether this entry is protected
- * (or locked, to use more conventional terms). When it is
- * protected, the entry cannot be flushed or accessed until
- * it is unprotected (or unlocked -- again to use more
- * conventional terms).
+ * (or locked, to use more conventional terms). When it is
+ * protected, the entry cannot be flushed or accessed until
+ * it is unprotected (or unlocked -- again to use more
+ * conventional terms).
*
- * Note that protected entries are removed from the LRU lists
- * and inserted on the protected list.
+ * Note that protected entries are removed from the LRU lists
+ * and inserted on the protected list.
*
* is_read_only: Boolean flag that is only meaningful if is_protected is
- * TRUE. In this circumstance, it indicates whether the
- * entry has been protected read-only, or read/write.
+ * TRUE. In this circumstance, it indicates whether the
+ * entry has been protected read-only, or read/write.
*
- * If the entry has been protected read-only (i.e. is_protected
- * and is_read_only are both TRUE), we allow the entry to be
- * protected more than once.
+ * If the entry has been protected read-only (i.e. is_protected
+ * and is_read_only are both TRUE), we allow the entry to be
+ * protected more than once.
*
- * In this case, the number of readers is maintained in the
- * ro_ref_count field (see below), and unprotect calls simply
- * decrement that field until it drops to zero, at which point
- * the entry is actually unprotected.
+ * In this case, the number of readers is maintained in the
+ * ro_ref_count field (see below), and unprotect calls simply
+ * decrement that field until it drops to zero, at which point
+ * the entry is actually unprotected.
*
* ro_ref_count: Integer field used to maintain a count of the number of
- * outstanding read-only protects on this entry. This field
- * must be zero whenever either is_protected or is_read_only
- * are TRUE.
+ * outstanding read-only protects on this entry. This field
+ * must be zero whenever either is_protected or is_read_only
+ * are TRUE.
*
- * is_pinned: Boolean flag indicating whether the entry has been pinned
- * in the cache.
+ * is_pinned: Boolean flag indicating whether the entry has been pinned
+ * in the cache.
*
- * For very hot entries, the protect / unprotect overhead
- * can become excessive. Thus the cache has been extended
- * to allow an entry to be "pinned" in the cache.
+ * For very hot entries, the protect / unprotect overhead
+ * can become excessive. Thus the cache has been extended
+ * to allow an entry to be "pinned" in the cache.
*
- * Pinning an entry in the cache has several implications:
+ * Pinning an entry in the cache has several implications:
*
- * 1) A pinned entry cannot be evicted. Thus unprotected
- * pinned entries must be stored in the pinned entry
- * list, instead of being managed by the replacement
- * policy code (LRU at present).
+ * 1) A pinned entry cannot be evicted. Thus unprotected
+ * pinned entries must be stored in the pinned entry
+ * list, instead of being managed by the replacement
+ * policy code (LRU at present).
*
- * 2) A pinned entry can be accessed or modified at any time.
- * This places an extra burden on the pre-serialize and
- * serialize callbacks, which must ensure that a pinned
- * entry is consistent and ready to write to disk before
- * generating an image.
+ * 2) A pinned entry can be accessed or modified at any time.
+ * This places an extra burden on the pre-serialize and
+ * serialize callbacks, which must ensure that a pinned
+ * entry is consistent and ready to write to disk before
+ * generating an image.
*
- * 3) A pinned entry can be marked as dirty (and possibly
- * change size) while it is unprotected.
+ * 3) A pinned entry can be marked as dirty (and possibly
+ * change size) while it is unprotected.
*
- * 4) The flush-destroy code must allow pinned entries to
- * be unpinned (and possibly unprotected) during the
- * flush.
+ * 4) The flush-destroy code must allow pinned entries to
+ * be unpinned (and possibly unprotected) during the
+ * flush.
*
- * JRM -- 3/16/06
+ * JRM -- 3/16/06
*
- * in_slist: Boolean flag indicating whether the entry is in the skip list
- * As a general rule, entries are placed in the list when they
+ * in_slist: Boolean flag indicating whether the entry is in the skip list
+ * As a general rule, entries are placed in the list when they
* are marked dirty. However they may remain in the list after
* being flushed.
*
* Update: Dirty entries are now removed from the skip list
- * when they are flushed.
+ * when they are flushed.
*
* flush_marker: Boolean flag indicating that the entry is to be flushed
- * the next time H5C_flush_cache() is called with the
- * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
- * the entry is flushed for whatever reason.
+ * the next time H5C_flush_cache() is called with the
+ * H5C__FLUSH_MARKED_ENTRIES_FLAG. The flag is reset when
+ * the entry is flushed for whatever reason.
*
* flush_me_last: Boolean flag indicating that this entry should not be
- * flushed from the cache until all other entries without
+ * flushed from the cache until all other entries without
* the flush_me_last flag set have been flushed.
*
- * Note:
+ * Note:
*
- * At this time, the flush_me_last
+ * At this time, the flush_me_last
* flag will only be applied to one entry, the superblock,
* and the code utilizing these flags is protected with HDasserts
* to enforce this. This restraint can certainly be relaxed in
@@ -1130,37 +1130,37 @@ typedef int H5C_ring_t;
* will need to be expanded and tested appropriately if that
* functionality is desired.
*
- * Update: There are now two possible last entries
- * (superblock and file driver info message). This
- * number will probably increase as we add superblock
- * messages. JRM -- 11/18/14
+ * Update: There are now two possible last entries
+ * (superblock and file driver info message). This
+ * number will probably increase as we add superblock
+ * messages. JRM -- 11/18/14
*
* clear_on_unprotect: Boolean flag used only in PHDF5. When H5C is used
- * to implement the metadata cache In the parallel case, only
- * the cache with mpi rank 0 is allowed to actually write to
- * file -- all other caches must retain dirty entries until they
- * are advised that the entry is clean.
+ * to implement the metadata cache In the parallel case, only
+ * the cache with mpi rank 0 is allowed to actually write to
+ * file -- all other caches must retain dirty entries until they
+ * are advised that the entry is clean.
*
- * This flag is used in the case that such an advisory is
- * received when the entry is protected. If it is set when an
- * entry is unprotected, and the dirtied flag is not set in
- * the unprotect, the entry's is_dirty flag is reset by flushing
- * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
+ * This flag is used in the case that such an advisory is
+ * received when the entry is protected. If it is set when an
+ * entry is unprotected, and the dirtied flag is not set in
+ * the unprotect, the entry's is_dirty flag is reset by flushing
+ * it with the H5C__FLUSH_CLEAR_ONLY_FLAG.
*
* flush_immediately: Boolean flag used only in Phdf5 -- and then only
- * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
+ * for H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED.
*
- * When a distributed metadata write is triggered at a
- * sync point, this field is used to mark entries that
- * must be flushed before leaving the sync point. At all
- * other times, this field should be set to FALSE.
+ * When a distributed metadata write is triggered at a
+ * sync point, this field is used to mark entries that
+ * must be flushed before leaving the sync point. At all
+ * other times, this field should be set to FALSE.
*
* flush_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed. This allows the cache
- * to detect when a call is the result of a flush callback.
+ * is in the process of being flushed. This allows the cache
+ * to detect when a call is the result of a flush callback.
*
* destroy_in_progress: Boolean flag that is set to true iff the entry
- * is in the process of being flushed and destroyed.
+ * is in the process of being flushed and destroyed.
*
*
* Fields supporting rings for flush ordering:
@@ -1178,8 +1178,8 @@ typedef int H5C_ring_t;
* within rings. Unlike rings, flush dependencies are applied to ALL
* writes, not just those triggered by flush or serialize calls.
*
- * ring: Instance of H5C_ring_t indicating the ring to which this
- * entry is assigned.
+ * ring: Instance of H5C_ring_t indicating the ring to which this
+ * entry is assigned.
*
*
* Fields supporting the 'flush dependency' feature:
@@ -1209,18 +1209,18 @@ typedef int H5C_ring_t;
* this field is nonzero, then this entry cannot be flushed.
*
* flush_dep_nunser_children: Number of flush dependency children
- * that are either unserialized, or have a non-zero number of
- * positive number of unserialized children.
+ * that are either unserialized, or have a non-zero number of
+ * positive number of unserialized children.
*
- * Note that since there is no requirement that a clean entry
- * be serialized, it is possible that flush_dep_nunser_children
- * to be greater than flush_dep_ndirty_children.
+ * Note that since there is no requirement that a clean entry
+ * be serialized, it is possible that flush_dep_nunser_children
+ * to be greater than flush_dep_ndirty_children.
*
- * This field exist to facilitate correct ordering of entry
- * serializations when it is necessary to serialize all the
- * entries in the metadata cache. Thus in the cache
- * serialization, no entry can be serialized unless this
- * field contains 0.
+ * This field exist to facilitate correct ordering of entry
+ * serializations when it is necessary to serialize all the
+ * entries in the metadata cache. Thus in the cache
+ * serialization, no entry can be serialized unless this
+ * field contains 0.
*
* Fields supporting the hash table:
*
@@ -1237,25 +1237,25 @@ typedef int H5C_ring_t;
* The il_next and il_prev fields discussed below were added to support
* the index list.
*
- * ht_next: Next pointer used by the hash table to store multiple
- * entries in a single hash bin. This field points to the
- * next entry in the doubly linked list of entries in the
- * hash bin, or NULL if there is no next entry.
+ * ht_next: Next pointer used by the hash table to store multiple
+ * entries in a single hash bin. This field points to the
+ * next entry in the doubly linked list of entries in the
+ * hash bin, or NULL if there is no next entry.
*
* ht_prev: Prev pointer used by the hash table to store multiple
* entries in a single hash bin. This field points to the
* previous entry in the doubly linked list of entries in
- * the hash bin, or NULL if there is no previuos entry.
+ * the hash bin, or NULL if there is no previuos entry.
*
- * il_next: Next pointer used by the index to maintain a doubly linked
- * list of all entries in the index (and thus in the cache).
- * This field contains a pointer to the next entry in the
- * index list, or NULL if there is no next entry.
+ * il_next: Next pointer used by the index to maintain a doubly linked
+ * list of all entries in the index (and thus in the cache).
+ * This field contains a pointer to the next entry in the
+ * index list, or NULL if there is no next entry.
*
- * il_prev: Prev pointer used by the index to maintain a doubly linked
- * list of all entries in the index (and thus in the cache).
- * This field contains a pointer to the previous entry in the
- * index list, or NULL if there is no previous entry.
+ * il_prev: Prev pointer used by the index to maintain a doubly linked
+ * list of all entries in the index (and thus in the cache).
+ * This field contains a pointer to the previous entry in the
+ * index list, or NULL if there is no previous entry.
*
*
* Fields supporting replacement policies:
@@ -1292,43 +1292,43 @@ typedef int H5C_ring_t;
* The use of the replacement policy fields under the Modified LRU policy
* is discussed below:
*
- * next: Next pointer in either the LRU, the protected list, or
- * the pinned list depending on the current values of
- * is_protected and is_pinned. If there is no next entry
- * on the list, this field should be set to NULL.
+ * next: Next pointer in either the LRU, the protected list, or
+ * the pinned list depending on the current values of
+ * is_protected and is_pinned. If there is no next entry
+ * on the list, this field should be set to NULL.
*
- * prev: Prev pointer in either the LRU, the protected list,
- * or the pinned list depending on the current values of
- * is_protected and is_pinned. If there is no previous
- * entry on the list, this field should be set to NULL.
+ * prev: Prev pointer in either the LRU, the protected list,
+ * or the pinned list depending on the current values of
+ * is_protected and is_pinned. If there is no previous
+ * entry on the list, this field should be set to NULL.
*
- * aux_next: Next pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when either is_protected or
- * is_pinned is true.
+ * aux_next: Next pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when either is_protected or
+ * is_pinned is true.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * true, it should point to the next item on the dirty LRU
- * list.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * true, it should point to the next item on the dirty LRU
+ * list.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * false, it should point to the next item on the clean LRU
- * list. In either case, when there is no next item, it
- * should be NULL.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * false, it should point to the next item on the clean LRU
+ * list. In either case, when there is no next item, it
+ * should be NULL.
*
- * aux_prev: Previous pointer on either the clean or dirty LRU lists.
- * This entry should be NULL when either is_protected or
- * is_pinned is true.
+ * aux_prev: Previous pointer on either the clean or dirty LRU lists.
+ * This entry should be NULL when either is_protected or
+ * is_pinned is true.
*
- * When is_protected and is_pinned are false, and is_dirty is
- * true, it should point to the previous item on the dirty
- * LRU list.
+ * When is_protected and is_pinned are false, and is_dirty is
+ * true, it should point to the previous item on the dirty
+ * LRU list.
*
- * When is_protected and is_pinned are false, and is_dirty
- * is false, it should point to the previous item on the
- * clean LRU list.
+ * When is_protected and is_pinned are false, and is_dirty
+ * is false, it should point to the previous item on the
+ * clean LRU list.
*
- * In either case, when there is no previous item, it should
- * be NULL.
+ * In either case, when there is no previous item, it should
+ * be NULL.
*
* Fields supporting the cache image feature:
*
@@ -1344,170 +1344,170 @@ typedef int H5C_ring_t;
* further details.
*
* include_in_image: Boolean flag indicating whether this entry should
- * be included in the metadata cache image. This field should
- * always be false prior to the H5C_prep_for_file_close() call.
- * During that call, it should be set to TRUE for all entries
- * that are to be included in the metadata cache image. At
- * present, only the superblock, the superblock extension
- * object header and its chunks (if any) are omitted from
- * the image.
+ * be included in the metadata cache image. This field should
+ * always be false prior to the H5C_prep_for_file_close() call.
+ * During that call, it should be set to TRUE for all entries
+ * that are to be included in the metadata cache image. At
+ * present, only the superblock, the superblock extension
+ * object header and its chunks (if any) are omitted from
+ * the image.
*
- * lru_rank: Rank of the entry in the LRU just prior to file close.
+ * lru_rank: Rank of the entry in the LRU just prior to file close.
*
- * Note that the first entry on the LRU has lru_rank 1,
- * and that entries not on the LRU at that time will have
- * either lru_rank -1 (if pinned) or 0 (if loaded during
- * the process of flushing the cache.
+ * Note that the first entry on the LRU has lru_rank 1,
+ * and that entries not on the LRU at that time will have
+ * either lru_rank -1 (if pinned) or 0 (if loaded during
+ * the process of flushing the cache.
*
* image_dirty: Boolean flag indicating whether the entry should be marked
- * as dirty in the metadata cache image. The flag is set to
- * TRUE iff the entry is dirty when H5C_prep_for_file_close()
- * is called.
+ * as dirty in the metadata cache image. The flag is set to
+ * TRUE iff the entry is dirty when H5C_prep_for_file_close()
+ * is called.
*
* fd_parent_count: If the entry is a child in one or more flush dependency
- * relationships, this field contains the number of flush
- * dependency parents.
+ * relationships, this field contains the number of flush
+ * dependency parents.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
- * that are not in the image are removed from this count and
- * from the fd_parent_addrs array below.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any parents
+ * that are not in the image are removed from this count and
+ * from the fd_parent_addrs array below.
*
- * Finally observe that if the entry is dirty and in the
- * cache image, and its parent is dirty and not in the cache
- * image, then the entry must be removed from the cache image
- * to avoid violating the flush dependency flush ordering.
+ * Finally observe that if the entry is dirty and in the
+ * cache image, and its parent is dirty and not in the cache
+ * image, then the entry must be removed from the cache image
+ * to avoid violating the flush dependency flush ordering.
*
* fd_parent_addrs: If the entry is a child in one or more flush dependency
- * relationship when H5C_prep_for_file_close() is called, this
- * field must contain a pointer to an array of size
- * fd_parent_count containing the on disk addresses of the
- * parent.
+ * relationship when H5C_prep_for_file_close() is called, this
+ * field must contain a pointer to an array of size
+ * fd_parent_count containing the on disk addresses of the
+ * parent.
*
- * In all other cases, the field is set to NULL.
+ * In all other cases, the field is set to NULL.
*
- * Note that while this list of addresses is initially taken
- * from the flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any parents
- * that are not in the image are removed from this list, and
- * and from the fd_parent_count above.
+ * Note that while this list of addresses is initially taken
+ * from the flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any parents
+ * that are not in the image are removed from this list, and
+ * and from the fd_parent_count above.
*
- * Finally observe that if the entry is dirty and in the
- * cache image, and its parent is dirty and not in the cache
- * image, then the entry must be removed from the cache image
- * to avoid violating the flush dependency flush ordering.
+ * Finally observe that if the entry is dirty and in the
+ * cache image, and its parent is dirty and not in the cache
+ * image, then the entry must be removed from the cache image
+ * to avoid violating the flush dependency flush ordering.
*
* fd_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of flush
- * dependency children.
+ * relationship, this field contains the number of flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any children
- * that are not in the image are removed from this count.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any children
+ * that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of dirty flush
- * dependency children.
+ * relationship, this field contains the number of dirty flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
- * Note that while this count is initially taken from the
- * flush dependency fields above, if the entry is in the
- * cache image (i.e. include_in_image is TRUE), any dirty
- * children that are not in the image are removed from this
- * count.
+ * Note that while this count is initially taken from the
+ * flush dependency fields above, if the entry is in the
+ * cache image (i.e. include_in_image is TRUE), any dirty
+ * children that are not in the image are removed from this
+ * count.
*
* image_fd_height: Flush dependency height of the entry in the cache image.
*
- * The flush dependency height of any entry involved in a
- * flush dependency relationship is defined to be the
- * longest flush dependency path from that entry to an entry
- * with no flush dependency children.
- *
- * Since the image_fd_height is used to order entries in the
- * cache image so that fd parents preceed fd children, for
- * purposes of this field, and entry is at flush dependency
- * level 0 if it either has no children, or if all of its
- * children are not in the cache image.
- *
- * Note that if a child in a flush dependency relationship is
- * dirty and in the cache image, and its parent is dirty and
- * not in the cache image, then the child must be excluded
- * from the cache image to maintain flush ordering.
- *
- * prefetched: Boolean flag indicating that the on disk image of the entry
- * has been loaded into the cache prior any request for the
- * entry by the rest of the library.
- *
- * As of this writing (8/10/15), this can only happen through
- * the load of a cache image block, although other scenarios
- * are contemplated for the use of this feature. Note that
- * unlike the usual prefetch situation, this means that a
- * prefetched entry can be dirty, and/or can be a party to
- * flush dependency relationship(s). This complicates matters
- * somewhat.
- *
- * The essential feature of a prefetched entry is that it
- * consists only of a buffer containing the on disk image of
- * the entry. Thus it must be deserialized before it can
- * be passed back to the library on a protect call. This
- * task is handled by H5C_deserialized_prefetched_entry().
- * In essence, this routine calls the deserialize callback
- * provided in the protect call with the on disk image,
- * deletes the prefetched entry from the cache, and replaces
- * it with the deserialized entry returned by the deserialize
- * callback.
- *
- * Further, if the prefetched entry is a flush dependency parent,
- * all its flush dependency children (which must also be
- * prefetched entries), must be transferred to the new cache
- * entry returned by the deserialization callback.
- *
- * Finally, if the prefetched entry is a flush dependency child,
- * this flush dependency must be destroyed prior to the
- * deserialize call.
- *
- * In addition to the above special processing on the first
- * protect call on a prefetched entry (after which is no longer
- * a prefetched entry), prefetched entries also require special
- * tretment on flush and evict.
- *
- * On flush, a dirty prefetched entry must simply be written
- * to disk and marked clean without any call to any client
- * callback.
- *
- * On eviction, if a prefetched entry is a flush dependency
- * child, that flush dependency relationship must be destroyed
- * just prior to the eviction. If the flush dependency code
- * is working properly, it should be impossible for any entry
- * that is a flush dependency parent to be evicted.
+ * The flush dependency height of any entry involved in a
+ * flush dependency relationship is defined to be the
+ * longest flush dependency path from that entry to an entry
+ * with no flush dependency children.
+ *
+ * Since the image_fd_height is used to order entries in the
+ * cache image so that fd parents preceed fd children, for
+ * purposes of this field, and entry is at flush dependency
+ * level 0 if it either has no children, or if all of its
+ * children are not in the cache image.
+ *
+ * Note that if a child in a flush dependency relationship is
+ * dirty and in the cache image, and its parent is dirty and
+ * not in the cache image, then the child must be excluded
+ * from the cache image to maintain flush ordering.
+ *
+ * prefetched: Boolean flag indicating that the on disk image of the entry
+ * has been loaded into the cache prior any request for the
+ * entry by the rest of the library.
+ *
+ * As of this writing (8/10/15), this can only happen through
+ * the load of a cache image block, although other scenarios
+ * are contemplated for the use of this feature. Note that
+ * unlike the usual prefetch situation, this means that a
+ * prefetched entry can be dirty, and/or can be a party to
+ * flush dependency relationship(s). This complicates matters
+ * somewhat.
+ *
+ * The essential feature of a prefetched entry is that it
+ * consists only of a buffer containing the on disk image of
+ * the entry. Thus it must be deserialized before it can
+ * be passed back to the library on a protect call. This
+ * task is handled by H5C_deserialized_prefetched_entry().
+ * In essence, this routine calls the deserialize callback
+ * provided in the protect call with the on disk image,
+ * deletes the prefetched entry from the cache, and replaces
+ * it with the deserialized entry returned by the deserialize
+ * callback.
+ *
+ * Further, if the prefetched entry is a flush dependency parent,
+ * all its flush dependency children (which must also be
+ * prefetched entries), must be transferred to the new cache
+ * entry returned by the deserialization callback.
+ *
+ * Finally, if the prefetched entry is a flush dependency child,
+ * this flush dependency must be destroyed prior to the
+ * deserialize call.
+ *
+ * In addition to the above special processing on the first
+ * protect call on a prefetched entry (after which is no longer
+ * a prefetched entry), prefetched entries also require special
+ * tretment on flush and evict.
+ *
+ * On flush, a dirty prefetched entry must simply be written
+ * to disk and marked clean without any call to any client
+ * callback.
+ *
+ * On eviction, if a prefetched entry is a flush dependency
+ * child, that flush dependency relationship must be destroyed
+ * just prior to the eviction. If the flush dependency code
+ * is working properly, it should be impossible for any entry
+ * that is a flush dependency parent to be evicted.
*
* prefetch_type_id: Integer field containing the type ID of the prefetched
- * entry. This ID must match the ID of the type provided in any
- * protect call on the prefetched entry.
+ * entry. This ID must match the ID of the type provided in any
+ * protect call on the prefetched entry.
*
- * The value of this field is undefined in prefetched is FALSE.
+ * The value of this field is undefined in prefetched is FALSE.
*
- * age: Number of times a prefetched entry has appeared in
- * subsequent cache images. The field exists to allow
- * imposition of a limit on how many times a prefetched
- * entry can appear in subsequent cache images without being
- * converted to a regular entry.
+ * age: Number of times a prefetched entry has appeared in
+ * subsequent cache images. The field exists to allow
+ * imposition of a limit on how many times a prefetched
+ * entry can appear in subsequent cache images without being
+ * converted to a regular entry.
*
- * This field must be zero if prefetched is FALSE.
+ * This field must be zero if prefetched is FALSE.
*
* prefetched_dirty: Boolean field that must be set to FALSE unless the
- * following conditions hold:
+ * following conditions hold:
*
- * 1) The file has been opened R/O.
+ * 1) The file has been opened R/O.
*
- * 2) The entry is either a prefetched entry, or was
+ * 2) The entry is either a prefetched entry, or was
* re-constructed from a prefetched entry.
*
* 3) The base prefetched entry was marked dirty.
@@ -1543,14 +1543,14 @@ typedef int H5C_ring_t;
* we deal with this by disabling EOC in the R/O case.
*
* serialization_count: Integer field used to maintain a count of the
- * number of times each entry is serialized during cache
- * serialization. While no entry should be serialized more than
- * once in any serialization call, throw an assertion if any
- * flush depencency parent is serialized more than once during
- * a single cache serialization.
+ * number of times each entry is serialized during cache
+ * serialization. While no entry should be serialized more than
+ * once in any serialization call, throw an assertion if any
+ * flush depencency parent is serialized more than once during
+ * a single cache serialization.
*
- * This is a debugging field, and thus is maintained only if
- * NDEBUG is undefined.
+ * This is a debugging field, and thus is maintained only if
+ * NDEBUG is undefined.
*
* Fields supporting tagged entries:
*
@@ -1561,15 +1561,15 @@ typedef int H5C_ring_t;
* not tagged. Tagged entries have a pointer to the tag info for the object,
* which is shared state for all the entries for that object.
*
- * tl_next: Pointer to the next entry in the tag list for an object.
- * NULL for the tail entry in the list, as well as untagged
- * entries.
+ * tl_next: Pointer to the next entry in the tag list for an object.
+ * NULL for the tail entry in the list, as well as untagged
+ * entries.
*
- * tl_prev: Pointer to the previous entry in the tag list for an object.
- * NULL for the head entry in the list, as well as untagged
- * entries.
+ * tl_prev: Pointer to the previous entry in the tag list for an object.
+ * NULL for the head entry in the list, as well as untagged
+ * entries.
*
- * tag_info: Pointer to the common tag state for all entries belonging to
+ * tag_info: Pointer to the common tag state for all entries belonging to
* an object. NULL for untagged entries.
*
*
@@ -1579,43 +1579,43 @@ typedef int H5C_ring_t;
* and H5C_COLLECT_CACHE_ENTRY_STATS are true. When present, they allow
* collection of statistics on individual cache entries.
*
- * accesses: int32_t containing the number of times this cache entry has
- * been referenced in its lifetime.
+ * accesses: int32_t containing the number of times this cache entry has
+ * been referenced in its lifetime.
*
- * clears: int32_t containing the number of times this cache entry has
+ * clears: int32_t containing the number of times this cache entry has
* been cleared in its life time.
*
- * flushes: int32_t containing the number of times this cache entry has
+ * flushes: int32_t containing the number of times this cache entry has
* been flushed to file in its life time.
*
- * pins: int32_t containing the number of times this cache entry has
- * been pinned in cache in its life time.
+ * pins: int32_t containing the number of times this cache entry has
+ * been pinned in cache in its life time.
*
****************************************************************************/
typedef struct H5C_cache_entry_t {
- uint32_t magic;
+ uint32_t magic;
H5C_t *cache_ptr;
- haddr_t addr;
- size_t size;
- void *image_ptr;
- hbool_t image_up_to_date;
- const H5C_class_t *type;
- hbool_t is_dirty;
- hbool_t dirtied;
- hbool_t is_protected;
- hbool_t is_read_only;
- int ro_ref_count;
- hbool_t is_pinned;
- hbool_t in_slist;
- hbool_t flush_marker;
+ haddr_t addr;
+ size_t size;
+ void *image_ptr;
+ hbool_t image_up_to_date;
+ const H5C_class_t *type;
+ hbool_t is_dirty;
+ hbool_t dirtied;
+ hbool_t is_protected;
+ hbool_t is_read_only;
+ int ro_ref_count;
+ hbool_t is_pinned;
+ hbool_t in_slist;
+ hbool_t flush_marker;
hbool_t flush_me_last;
#ifdef H5_HAVE_PARALLEL
- hbool_t clear_on_unprotect;
- hbool_t flush_immediately;
- hbool_t coll_access;
+ hbool_t clear_on_unprotect;
+ hbool_t flush_immediately;
+ hbool_t coll_access;
#endif /* H5_HAVE_PARALLEL */
- hbool_t flush_in_progress;
- hbool_t destroy_in_progress;
+ hbool_t flush_in_progress;
+ hbool_t destroy_in_progress;
/* fields supporting rings for purposes of flush ordering */
H5C_ring_t ring;
@@ -1627,8 +1627,8 @@ typedef struct H5C_cache_entry_t {
unsigned flush_dep_nchildren;
unsigned flush_dep_ndirty_children;
unsigned flush_dep_nunser_children;
- hbool_t pinned_from_client;
- hbool_t pinned_from_cache;
+ hbool_t pinned_from_client;
+ hbool_t pinned_from_cache;
/* fields supporting the hash table: */
struct H5C_cache_entry_t *ht_next;
@@ -1660,9 +1660,9 @@ typedef struct H5C_cache_entry_t {
hbool_t prefetched;
int prefetch_type_id;
int32_t age;
- hbool_t prefetched_dirty;
+ hbool_t prefetched_dirty;
-#ifndef NDEBUG /* debugging field */
+#ifndef NDEBUG /* debugging field */
int serialization_count;
#endif /* NDEBUG */
@@ -1673,10 +1673,10 @@ typedef struct H5C_cache_entry_t {
#if H5C_COLLECT_CACHE_ENTRY_STATS
/* cache entry stats fields */
- int32_t accesses;
- int32_t clears;
- int32_t flushes;
- int32_t pins;
+ int32_t accesses;
+ int32_t clears;
+ int32_t flushes;
+ int32_t pins;
#endif /* H5C_COLLECT_CACHE_ENTRY_STATS */
} H5C_cache_entry_t;
@@ -1692,43 +1692,43 @@ typedef struct H5C_cache_entry_t {
*
* The fields of this structure are discussed individually below:
*
- * JRM - 8/5/15
+ * JRM - 8/5/15
*
- * magic: Unsigned 32 bit integer that must always be set to
+ * magic: Unsigned 32 bit integer that must always be set to
* H5C_IMAGE_ENTRY_T_MAGIC when the entry is valid.
* The field must be set to H5C_IMAGE_ENTRY_T_BAD_MAGIC
* just before the entry is freed.
*
- * addr: Base address of the cache entry on disk.
+ * addr: Base address of the cache entry on disk.
*
- * size: Length of the cache entry on disk in bytes.
+ * size: Length of the cache entry on disk in bytes.
*
- * ring: Instance of H5C_ring_t indicating the flush ordering ring
- * to which this entry is assigned.
+ * ring: Instance of H5C_ring_t indicating the flush ordering ring
+ * to which this entry is assigned.
*
- * age: Number of times this prefetech entry has appeared in
- * the current sequence of cache images. This field is
- * initialized to 0 if the instance of H5C_image_entry_t
- * is constructed from a regular entry.
+ * age: Number of times this prefetech entry has appeared in
+ * the current sequence of cache images. This field is
+ * initialized to 0 if the instance of H5C_image_entry_t
+ * is constructed from a regular entry.
*
- * If the instance is constructed from a prefetched entry
- * currently residing in the metadata cache, the field is
- * set to 1 + the age of the prefetched entry, or to
- * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds
- * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX.
+ * If the instance is constructed from a prefetched entry
+ * currently residing in the metadata cache, the field is
+ * set to 1 + the age of the prefetched entry, or to
+ * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX if that sum exceeds
+ * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX.
*
- * type_id: Integer field containing the type ID of the entry.
+ * type_id: Integer field containing the type ID of the entry.
*
- * lru_rank: Rank of the entry in the LRU just prior to file close.
+ * lru_rank: Rank of the entry in the LRU just prior to file close.
*
- * Note that the first entry on the LRU has lru_rank 1,
- * and that entries not on the LRU at that time will have
- * either lru_rank -1 (if pinned) or 0 (if loaded during
- * the process of flushing the cache.
+ * Note that the first entry on the LRU has lru_rank 1,
+ * and that entries not on the LRU at that time will have
+ * either lru_rank -1 (if pinned) or 0 (if loaded during
+ * the process of flushing the cache.
*
- * is_dirty: Boolean flag indicating whether the contents of the cache
- * entry has been modified since the last time it was written
- * to disk as a regular piece of metadata.
+ * is_dirty: Boolean flag indicating whether the contents of the cache
+ * entry has been modified since the last time it was written
+ * to disk as a regular piece of metadata.
*
* image_fd_height: Flush dependency height of the entry in the cache image.
*
@@ -1756,17 +1756,17 @@ typedef struct H5C_cache_entry_t {
*
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
- * H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are
- * not in the image are removed from this count and
+ * H5C_cache_entry_t, if the entry is in the cache image
+ * (i.e. include_in_image is TRUE), any parents that are
+ * not in the image are removed from this count and
* from the fd_parent_addrs array below.
*
* Finally observe that if the entry is dirty and in the
* cache image, and its parent is dirty and not in the cache
* image, then the entry must be removed from the cache image
* to avoid violating the flush dependency flush ordering.
- * This should have happened before the construction of
- * the instance of H5C_image_entry_t.
+ * This should have happened before the construction of
+ * the instance of H5C_image_entry_t.
*
* fd_parent_addrs: If the entry is a child in one or more flush dependency
* relationship when H5C_prep_for_file_close() is called, this
@@ -1779,27 +1779,27 @@ typedef struct H5C_cache_entry_t {
* Note that while this list of addresses is initially taken
* from the flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any parents that are not
- * in the image are removed from this list, and from the
- * fd_parent_count above.
+ * (i.e. include_in_image is TRUE), any parents that are not
+ * in the image are removed from this list, and from the
+ * fd_parent_count above.
*
* Finally observe that if the entry is dirty and in the
* cache image, and its parent is dirty and not in the cache
* image, then the entry must be removed from the cache image
* to avoid violating the flush dependency flush ordering.
- * This should have happened before the construction of
- * the instance of H5C_image_entry_t.
+ * This should have happened before the construction of
+ * the instance of H5C_image_entry_t.
*
* fd_child_count: If the entry is a parent in a flush dependency
- * relationship, this field contains the number of flush
- * dependency children.
+ * relationship, this field contains the number of flush
+ * dependency children.
*
- * In all other cases, the field is set to zero.
+ * In all other cases, the field is set to zero.
*
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any children
+ * (i.e. include_in_image is TRUE), any children
* that are not in the image are removed from this count.
*
* fd_dirty_child_count: If the entry is a parent in a flush dependency
@@ -1811,16 +1811,16 @@ typedef struct H5C_cache_entry_t {
* Note that while this count is initially taken from the
* flush dependency fields in the associated instance of
* H5C_cache_entry_t, if the entry is in the cache image
- * (i.e. include_in_image is TRUE), any dirty children
- * that are not in the image are removed from this count.
+ * (i.e. include_in_image is TRUE), any dirty children
+ * that are not in the image are removed from this count.
*
- * image_ptr: Pointer to void. When not NULL, this field points to a
- * dynamically allocated block of size bytes in which the
- * on disk image of the metadata cache entry is stored.
+ * image_ptr: Pointer to void. When not NULL, this field points to a
+ * dynamically allocated block of size bytes in which the
+ * on disk image of the metadata cache entry is stored.
*
- * If the entry is dirty, the pre-serialize and serialize
- * callbacks must be used to update this image before it is
- * written to disk
+ * If the entry is dirty, the pre-serialize and serialize
+ * callbacks must be used to update this image before it is
+ * written to disk
*
*
****************************************************************************/
@@ -1852,95 +1852,95 @@ typedef struct H5C_image_entry_t {
* The fields of the structure are discussed individually below:
*
* version: Integer field containing the version number of this version
- * of the H5C_auto_size_ctl_t structure. Any instance of
- * H5C_auto_size_ctl_t passed to the cache must have a known
- * version number, or an error will be flagged.
+ * of the H5C_auto_size_ctl_t structure. Any instance of
+ * H5C_auto_size_ctl_t passed to the cache must have a known
+ * version number, or an error will be flagged.
*
* report_fcn: Pointer to the function that is to be called to report
* activities each time the auto cache resize code is executed. If the
- * field is NULL, no call is made.
+ * field is NULL, no call is made.
*
- * If the field is not NULL, it must contain the address of a function
- * of type H5C_auto_resize_report_fcn.
+ * If the field is not NULL, it must contain the address of a function
+ * of type H5C_auto_resize_report_fcn.
*
* set_initial_size: Boolean flag indicating whether the size of the
- * initial size of the cache is to be set to the value given in
- * the initial_size field. If set_initial_size is FALSE, the
- * initial_size field is ignored.
+ * initial size of the cache is to be set to the value given in
+ * the initial_size field. If set_initial_size is FALSE, the
+ * initial_size field is ignored.
*
* initial_size: If enabled, this field contain the size the cache is
- * to be set to upon receipt of this structure. Needless to say,
- * initial_size must lie in the closed interval [min_size, max_size].
+ * to be set to upon receipt of this structure. Needless to say,
+ * initial_size must lie in the closed interval [min_size, max_size].
*
* min_clean_fraction: double in the range 0 to 1 indicating the fraction
- * of the cache that is to be kept clean. This field is only used
- * in parallel mode. Typical values are 0.1 to 0.5.
+ * of the cache that is to be kept clean. This field is only used
+ * in parallel mode. Typical values are 0.1 to 0.5.
*
* max_size: Maximum size to which the cache can be adjusted. The
- * supplied value must fall in the closed interval
- * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
- * be greater than or equal to min_size.
+ * supplied value must fall in the closed interval
+ * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must
+ * be greater than or equal to min_size.
*
* min_size: Minimum size to which the cache can be adjusted. The
* supplied value must fall in the closed interval
* [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, min_size must
- * be less than or equal to max_size.
+ * be less than or equal to max_size.
*
* epoch_length: Number of accesses on the cache over which to collect
- * hit rate stats before running the automatic cache resize code,
+ * hit rate stats before running the automatic cache resize code,
* if it is enabled.
*
- * At the end of an epoch, we discard prior hit rate data and start
- * collecting afresh. The epoch_length must lie in the closed
- * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
+ * At the end of an epoch, we discard prior hit rate data and start
+ * collecting afresh. The epoch_length must lie in the closed
+ * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH].
*
*
* Cache size increase control fields:
*
* incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * increased. At present there are two possible values:
+ * value indicates how we determine whether the cache size should be
+ * increased. At present there are two possible values:
*
- * H5C_incr__off: Don't attempt to increase the size of the cache
- * automatically.
+ * H5C_incr__off: Don't attempt to increase the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size increase section ar ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size increase section ar ignored.
*
- * H5C_incr__threshold: Attempt to increase the size of the cache
- * whenever the average hit rate over the last epoch drops
- * below the value supplied in the lower_hr_threshold
- * field.
+ * H5C_incr__threshold: Attempt to increase the size of the cache
+ * whenever the average hit rate over the last epoch drops
+ * below the value supplied in the lower_hr_threshold
+ * field.
*
- * Note that this attempt will fail if the cache is already
- * at its maximum size, or if the cache is not already using
- * all available space.
+ * Note that this attempt will fail if the cache is already
+ * at its maximum size, or if the cache is not already using
+ * all available space.
*
* lower_hr_threshold: Lower hit rate threshold. If the increment mode
- * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
- * value supplied in this field in an epoch, increment the cache size by
- * size_increment. Note that cache size may not be incremented above
- * max_size, and that the increment may be further restricted by the
- * max_increment field if it is enabled.
+ * (incr_mode) is H5C_incr__threshold and the hit rate drops below the
+ * value supplied in this field in an epoch, increment the cache size by
+ * size_increment. Note that cache size may not be incremented above
+ * max_size, and that the increment may be further restricted by the
+ * max_increment field if it is enabled.
*
- * When enabled, this field must contain a value in the range [0.0, 1.0].
- * Depending on the incr_mode selected, it may also have to be less than
- * upper_hr_threshold.
+ * When enabled, this field must contain a value in the range [0.0, 1.0].
+ * Depending on the incr_mode selected, it may also have to be less than
+ * upper_hr_threshold.
*
* increment: Double containing the multiplier used to derive the new
- * cache size from the old if a cache size increment is triggered.
+ * cache size from the old if a cache size increment is triggered.
* The increment must be greater than 1.0, and should not exceed 2.0.
*
- * The new cache size is obtained by multiplying the current max cache
- * size by the increment, and then clamping to max_size and to stay
- * within the max_increment as necessary.
+ * The new cache size is obtained by multiplying the current max cache
+ * size by the increment, and then clamping to max_size and to stay
+ * within the max_increment as necessary.
*
* apply_max_increment: Boolean flag indicating whether the max_increment
- * field should be used to limit the maximum cache size increment.
+ * field should be used to limit the maximum cache size increment.
*
* max_increment: If enabled by the apply_max_increment field described
- * above, this field contains the maximum number of bytes by which the
- * cache size can be increased in a single re-size.
+ * above, this field contains the maximum number of bytes by which the
+ * cache size can be increased in a single re-size.
*
* flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated
* type whose value indicates whether and by what algorithm we should
@@ -1989,96 +1989,96 @@ typedef struct H5C_image_entry_t {
* is H5C_flash_incr__add_space.
*
* flash_threshold: Double containing the factor by which current max cache
- * size is multiplied to obtain the size threshold for the add_space
- * flash increment algorithm. The field is ignored unless
- * flash_incr_mode is H5C_flash_incr__add_space.
+ * size is multiplied to obtain the size threshold for the add_space
+ * flash increment algorithm. The field is ignored unless
+ * flash_incr_mode is H5C_flash_incr__add_space.
*
*
* Cache size decrease control fields:
*
* decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose
- * value indicates how we determine whether the cache size should be
- * decreased. At present there are four possibilities.
+ * value indicates how we determine whether the cache size should be
+ * decreased. At present there are four possibilities.
*
- * H5C_decr__off: Don't attempt to decrease the size of the cache
- * automatically.
+ * H5C_decr__off: Don't attempt to decrease the size of the cache
+ * automatically.
*
- * When this increment mode is selected, the remaining fields
- * in the cache size decrease section are ignored.
+ * When this increment mode is selected, the remaining fields
+ * in the cache size decrease section are ignored.
*
- * H5C_decr__threshold: Attempt to decrease the size of the cache
- * whenever the average hit rate over the last epoch rises
- * above the value supplied in the upper_hr_threshold
- * field.
+ * H5C_decr__threshold: Attempt to decrease the size of the cache
+ * whenever the average hit rate over the last epoch rises
+ * above the value supplied in the upper_hr_threshold
+ * field.
*
- * H5C_decr__age_out: At the end of each epoch, search the cache for
- * entries that have not been accessed for at least the number
- * of epochs specified in the epochs_before_eviction field, and
- * evict these entries. Conceptually, the maximum cache size
- * is then decreased to match the new actual cache size. However,
- * this reduction may be modified by the min_size, the
- * max_decrement, and/or the empty_reserve.
+ * H5C_decr__age_out: At the end of each epoch, search the cache for
+ * entries that have not been accessed for at least the number
+ * of epochs specified in the epochs_before_eviction field, and
+ * evict these entries. Conceptually, the maximum cache size
+ * is then decreased to match the new actual cache size. However,
+ * this reduction may be modified by the min_size, the
+ * max_decrement, and/or the empty_reserve.
*
- * H5C_decr__age_out_with_threshold: Same as age_out, but we only
- * attempt to reduce the cache size when the hit rate observed
- * over the last epoch exceeds the value provided in the
- * upper_hr_threshold field.
+ * H5C_decr__age_out_with_threshold: Same as age_out, but we only
+ * attempt to reduce the cache size when the hit rate observed
+ * over the last epoch exceeds the value provided in the
+ * upper_hr_threshold field.
*
* upper_hr_threshold: Upper hit rate threshold. The use of this field
- * varies according to the current decr_mode:
+ * varies according to the current decr_mode:
*
- * H5C_decr__off or H5C_decr__age_out: The value of this field is
- * ignored.
+ * H5C_decr__off or H5C_decr__age_out: The value of this field is
+ * ignored.
*
- * H5C_decr__threshold: If the hit rate exceeds this threshold in any
- * epoch, attempt to decrement the cache size by size_decrement.
+ * H5C_decr__threshold: If the hit rate exceeds this threshold in any
+ * epoch, attempt to decrement the cache size by size_decrement.
*
- * Note that cache size may not be decremented below min_size.
+ * Note that cache size may not be decremented below min_size.
*
- * Note also that if the upper_threshold is 1.0, the cache size
- * will never be reduced.
+ * Note also that if the upper_threshold is 1.0, the cache size
+ * will never be reduced.
*
- * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
- * threshold in any epoch, attempt to reduce the cache size
- * by evicting entries that have not been accessed for more
- * than the specified number of epochs.
+ * H5C_decr__age_out_with_threshold: If the hit rate exceeds this
+ * threshold in any epoch, attempt to reduce the cache size
+ * by evicting entries that have not been accessed for more
+ * than the specified number of epochs.
*
* decrement: This field is only used when the decr_mode is
- * H5C_decr__threshold.
+ * H5C_decr__threshold.
*
- * The field is a double containing the multiplier used to derive the
- * new cache size from the old if a cache size decrement is triggered.
- * The decrement must be in the range 0.0 (in which case the cache will
+ * The field is a double containing the multiplier used to derive the
+ * new cache size from the old if a cache size decrement is triggered.
+ * The decrement must be in the range 0.0 (in which case the cache will
* try to contract to its minimum size) to 1.0 (in which case the
* cache will never shrink).
*
* apply_max_decrement: Boolean flag used to determine whether decrements
- * in cache size are to be limited by the max_decrement field.
+ * in cache size are to be limited by the max_decrement field.
*
* max_decrement: Maximum number of bytes by which the cache size can be
- * decreased in a single re-size. Note that decrements may also be
- * restricted by the min_size of the cache, and (in age out modes) by
- * the empty_reserve field.
+ * decreased in a single re-size. Note that decrements may also be
+ * restricted by the min_size of the cache, and (in age out modes) by
+ * the empty_reserve field.
*
* epochs_before_eviction: Integer field used in H5C_decr__age_out and
- * H5C_decr__age_out_with_threshold decrement modes.
+ * H5C_decr__age_out_with_threshold decrement modes.
*
- * This field contains the number of epochs an entry must remain
- * unaccessed before it is evicted in an attempt to reduce the
- * cache size. If applicable, this field must lie in the range
- * [1, H5C__MAX_EPOCH_MARKERS].
+ * This field contains the number of epochs an entry must remain
+ * unaccessed before it is evicted in an attempt to reduce the
+ * cache size. If applicable, this field must lie in the range
+ * [1, H5C__MAX_EPOCH_MARKERS].
*
* apply_empty_reserve: Boolean field controlling whether the empty_reserve
- * field is to be used in computing the new cache size when the
- * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
+ * field is to be used in computing the new cache size when the
+ * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold.
*
* empty_reserve: To avoid a constant racheting down of cache size by small
- * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
- * modes, this field allows one to require that any cache size
- * reductions leave the specified fraction of unused space in the cache.
+ * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold
+ * modes, this field allows one to require that any cache size
+ * reductions leave the specified fraction of unused space in the cache.
*
- * The value of this field must be in the range [0.0, 1.0]. I would
- * expect typical values to be in the range of 0.01 to 0.1.
+ * The value of this field must be in the range [0.0, 1.0]. I would
+ * expect typical values to be in the range of 0.01 to 0.1.
*
****************************************************************************/
@@ -2101,34 +2101,34 @@ typedef void (*H5C_auto_resize_rpt_fcn)(H5C_t * cache_ptr, int32_t version,
typedef struct H5C_auto_size_ctl_t {
/* general configuration fields: */
- int32_t version;
- H5C_auto_resize_rpt_fcn rpt_fcn;
- hbool_t set_initial_size;
- size_t initial_size;
- double min_clean_fraction;
- size_t max_size;
- size_t min_size;
- int64_t epoch_length;
+ int32_t version;
+ H5C_auto_resize_rpt_fcn rpt_fcn;
+ hbool_t set_initial_size;
+ size_t initial_size;
+ double min_clean_fraction;
+ size_t max_size;
+ size_t min_size;
+ int64_t epoch_length;
/* size increase control fields: */
- enum H5C_cache_incr_mode incr_mode;
- double lower_hr_threshold;
- double increment;
- hbool_t apply_max_increment;
- size_t max_increment;
+ enum H5C_cache_incr_mode incr_mode;
+ double lower_hr_threshold;
+ double increment;
+ hbool_t apply_max_increment;
+ size_t max_increment;
enum H5C_cache_flash_incr_mode flash_incr_mode;
double flash_multiple;
double flash_threshold;
/* size decrease control fields: */
- enum H5C_cache_decr_mode decr_mode;
- double upper_hr_threshold;
- double decrement;
- hbool_t apply_max_decrement;
- size_t max_decrement;
- int32_t epochs_before_eviction;
- hbool_t apply_empty_reserve;
- double empty_reserve;
+ enum H5C_cache_decr_mode decr_mode;
+ double upper_hr_threshold;
+ double decrement;
+ hbool_t apply_max_decrement;
+ size_t max_decrement;
+ int32_t epochs_before_eviction;
+ hbool_t apply_empty_reserve;
+ double empty_reserve;
} H5C_auto_size_ctl_t;
/****************************************************************************
@@ -2144,12 +2144,12 @@ typedef struct H5C_auto_size_ctl_t {
* The fields of the structure are discussed individually below:
*
* version: Integer field containing the version number of this version
- * of the H5C_image_ctl_t structure. Any instance of
- * H5C_image_ctl_t passed to the cache must have a known
- * version number, or an error will be flagged.
+ * of the H5C_image_ctl_t structure. Any instance of
+ * H5C_image_ctl_t passed to the cache must have a known
+ * version number, or an error will be flagged.
*
* generate_image: Boolean flag indicating whether a cache image should
- * be created on file close.
+ * be created on file close.
*
* save_resize_status: Boolean flag indicating whether the cache image
* should include the adaptive cache resize configuration and status.
@@ -2181,24 +2181,24 @@ typedef struct H5C_auto_size_ctl_t {
* equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE.
*
* flags: Unsigned integer containing flags controlling which aspects of the
- * cache image functinality is actually executed. The primary impetus
- * behind this field is to allow development of tests for partial
- * implementations that will require little if any modification to run
- * with the full implementation. In normal operation, all flags should
- * be set.
+ * cache image functinality is actually executed. The primary impetus
+ * behind this field is to allow development of tests for partial
+ * implementations that will require little if any modification to run
+ * with the full implementation. In normal operation, all flags should
+ * be set.
*
****************************************************************************/
-#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001)
-#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002)
-#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004)
-#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008)
+#define H5C_CI__GEN_MDCI_SBE_MESG ((unsigned)0x0001)
+#define H5C_CI__GEN_MDC_IMAGE_BLK ((unsigned)0x0002)
+#define H5C_CI__SUPRESS_ENTRY_WRITES ((unsigned)0x0004)
+#define H5C_CI__WRITE_CACHE_IMAGE ((unsigned)0x0008)
/* This #define must set all defined H5C_CI flags. It is
* used in the default value for instances of H5C_cache_image_ctl_t.
* This value will only be modified in test code.
*/
-#define H5C_CI__ALL_FLAGS ((unsigned)0x000F)
+#define H5C_CI__ALL_FLAGS ((unsigned)0x000F)
#define H5C__DEFAULT_CACHE_IMAGE_CTL \
{ \
@@ -2210,11 +2210,11 @@ typedef struct H5C_auto_size_ctl_t {
}
typedef struct H5C_cache_image_ctl_t {
- int32_t version;
- hbool_t generate_image;
+ int32_t version;
+ hbool_t generate_image;
hbool_t save_resize_status;
int32_t entry_ageout;
- unsigned flags;
+ unsigned flags;
} H5C_cache_image_ctl_t;
/* The cache logging output style */
@@ -2327,7 +2327,7 @@ H5_DLL herr_t H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len,
haddr_t *ce_array_ptr);
#endif /* H5_HAVE_PARALLEL */
-#ifndef NDEBUG /* debugging functions */
+#ifndef NDEBUG /* debugging functions */
H5_DLL herr_t H5C_dump_cache(H5C_t *cache_ptr, const char *cache_name);
H5_DLL herr_t H5C_dump_cache_LRU(H5C_t *cache_ptr, const char *cache_name);
H5_DLL hbool_t H5C_get_serialization_in_progress(const H5C_t *cache_ptr);
@@ -2335,7 +2335,7 @@ H5_DLL hbool_t H5C_cache_is_clean(const H5C_t *cache_ptr, H5C_ring_t inner_ring)
H5_DLL herr_t H5C_dump_cache_skip_list(H5C_t *cache_ptr, char *calling_fcn);
H5_DLL herr_t H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr,
void **entry_ptr_ptr);
-H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
+H5_DLL herr_t H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr,
haddr_t child_addr, hbool_t *fd_exists_ptr);
H5_DLL herr_t H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr,
const H5C_class_t *expected_type, hbool_t *in_cache_ptr,
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index aa604c2..076f08c 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -12,38 +12,38 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
- * Monday, November 10, 1997
- *
- * Purpose: Implements a family of files that acts as a single hdf5
- * file. The purpose is to be able to split a huge file on a
- * 64-bit platform, transfer all the <2GB members to a 32-bit
- * platform, and then access the entire huge file on the 32-bit
- * platform.
- *
- * All family members are logically the same size although their
- * physical sizes may vary. The logical member size is
- * determined by looking at the physical size of the first member
- * when the file is opened. When creating a file family, the
- * first member is created with a predefined physical size
- * (actually, this happens when the file family is flushed, and
- * can be quite time consuming on file systems that don't
- * implement holes, like nfs).
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a family of files that acts as a single hdf5
+ * file. The purpose is to be able to split a huge file on a
+ * 64-bit platform, transfer all the <2GB members to a 32-bit
+ * platform, and then access the entire huge file on the 32-bit
+ * platform.
+ *
+ * All family members are logically the same size although their
+ * physical sizes may vary. The logical member size is
+ * determined by looking at the physical size of the first member
+ * when the file is opened. When creating a file family, the
+ * first member is created with a predefined physical size
+ * (actually, this happens when the file family is flushed, and
+ * can be quite time consuming on file systems that don't
+ * implement holes, like nfs).
*
*/
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
-#include "H5private.h" /* Generic Functions */
-#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Fprivate.h" /* File access */
-#include "H5FDprivate.h" /* File drivers */
-#include "H5FDfamily.h" /* Family file driver */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fprivate.h" /* File access */
+#include "H5FDprivate.h" /* File drivers */
+#include "H5FDfamily.h" /* Family file driver */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
/* The size of the member name buffers */
#define H5FD_FAM_MEMB_NAME_BUF_SIZE 4096
@@ -53,19 +53,19 @@ static hid_t H5FD_FAMILY_g = 0;
/* The description of a file belonging to this driver. */
typedef struct H5FD_family_t {
- H5FD_t pub; /*public stuff, must be first */
- hid_t memb_fapl_id; /*file access property list for members */
- hsize_t memb_size; /*actual size of each member file */
- hsize_t pmem_size; /*member size passed in from property */
- unsigned nmembs; /*number of family members */
- unsigned amembs; /*number of member slots allocated */
- H5FD_t **memb; /*dynamic array of member pointers */
- haddr_t eoa; /*end of allocated addresses */
- char *name; /*name generator printf format */
- unsigned flags; /*flags for opening additional members */
+ H5FD_t pub; /*public stuff, must be first */
+ hid_t memb_fapl_id; /*file access property list for members */
+ hsize_t memb_size; /*actual size of each member file */
+ hsize_t pmem_size; /*member size passed in from property */
+ unsigned nmembs; /*number of family members */
+ unsigned amembs; /*number of member slots allocated */
+ H5FD_t **memb; /*dynamic array of member pointers */
+ haddr_t eoa; /*end of allocated addresses */
+ char *name; /*name generator printf format */
+ unsigned flags; /*flags for opening additional members */
/* Information from properties set by 'h5repart' tool */
- hsize_t mem_newsize; /*new member size passed in as private
+ hsize_t mem_newsize; /*new member size passed in as private
* property. It's used only by h5repart */
hbool_t repart_members; /* Whether to mark the superblock dirty
* when it is loaded, so that the family
@@ -74,8 +74,8 @@ typedef struct H5FD_family_t {
/* Driver-specific file access properties */
typedef struct H5FD_family_fapl_t {
- hsize_t memb_size; /*size of each member */
- hid_t memb_fapl_id; /*file access property list of each memb*/
+ hsize_t memb_size; /*size of each member */
+ hid_t memb_fapl_id; /*file access property list of each memb*/
} H5FD_family_fapl_t;
/* Callback prototypes */
@@ -85,11 +85,11 @@ static void *H5FD__family_fapl_copy(const void *_old_fa);
static herr_t H5FD__family_fapl_free(void *_fa);
static hsize_t H5FD__family_sb_size(H5FD_t *_file);
static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/);
+ unsigned char *buf/*out*/);
static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name,
const unsigned char *buf);
static H5FD_t *H5FD__family_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
+ hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD__family_close(H5FD_t *_file);
static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags);
@@ -98,9 +98,9 @@ static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
+ size_t size, void *_buf/*out*/);
static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
+ size_t size, const void *_buf);
static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
@@ -108,41 +108,41 @@ static herr_t H5FD__family_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
- "family", /* name */
- HADDR_MAX, /* maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
+ "family", /* name */
+ HADDR_MAX, /* maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
H5FD__family_term, /* terminate */
- H5FD__family_sb_size, /* sb_size */
- H5FD__family_sb_encode, /* sb_encode */
- H5FD__family_sb_decode, /* sb_decode */
- sizeof(H5FD_family_fapl_t), /* fapl_size */
- H5FD__family_fapl_get, /* fapl_get */
- H5FD__family_fapl_copy, /* fapl_copy */
- H5FD__family_fapl_free, /* fapl_free */
- 0, /* dxpl_size */
- NULL, /* dxpl_copy */
- NULL, /* dxpl_free */
- H5FD__family_open, /* open */
- H5FD__family_close, /* close */
- H5FD__family_cmp, /* cmp */
- H5FD__family_query, /* query */
- NULL, /* get_type_map */
- NULL, /* alloc */
- NULL, /* free */
- H5FD__family_get_eoa, /* get_eoa */
- H5FD__family_set_eoa, /* set_eoa */
- H5FD__family_get_eof, /* get_eof */
+ H5FD__family_sb_size, /* sb_size */
+ H5FD__family_sb_encode, /* sb_encode */
+ H5FD__family_sb_decode, /* sb_decode */
+ sizeof(H5FD_family_fapl_t), /* fapl_size */
+ H5FD__family_fapl_get, /* fapl_get */
+ H5FD__family_fapl_copy, /* fapl_copy */
+ H5FD__family_fapl_free, /* fapl_free */
+ 0, /* dxpl_size */
+ NULL, /* dxpl_copy */
+ NULL, /* dxpl_free */
+ H5FD__family_open, /* open */
+ H5FD__family_close, /* close */
+ H5FD__family_cmp, /* cmp */
+ H5FD__family_query, /* query */
+ NULL, /* get_type_map */
+ NULL, /* alloc */
+ NULL, /* free */
+ H5FD__family_get_eoa, /* get_eoa */
+ H5FD__family_set_eoa, /* set_eoa */
+ H5FD__family_get_eof, /* get_eof */
H5FD__family_get_handle, /* get_handle */
- H5FD__family_read, /* read */
- H5FD__family_write, /* write */
- H5FD__family_flush, /* flush */
- H5FD__family_truncate, /* truncate */
+ H5FD__family_read, /* read */
+ H5FD__family_write, /* write */
+ H5FD__family_flush, /* flush */
+ H5FD__family_truncate, /* truncate */
H5FD__family_lock, /* lock */
H5FD__family_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
-
+
/*--------------------------------------------------------------------------
NAME
H5FD__init_package -- Initialize interface-specific information
@@ -169,7 +169,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_family_init
*
@@ -201,11 +201,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_family_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD__family_term
+ * Function: H5FD__family_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -225,21 +225,21 @@ H5FD__family_term(void)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_family
+ * Function: H5Pset_fapl_family
*
- * Purpose: Sets the file access property list FAPL_ID to use the family
- * driver. The MEMB_SIZE is the size in bytes of each file
- * member (used only when creating a new file) and the
- * MEMB_FAPL_ID is a file access property list to be used for
- * each family member.
+ * Purpose: Sets the file access property list FAPL_ID to use the family
+ * driver. The MEMB_SIZE is the size in bytes of each file
+ * member (used only when creating a new file) and the
+ * MEMB_FAPL_ID is a file access property list to be used for
+ * each family member.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -248,7 +248,7 @@ herr_t
H5Pset_fapl_family(hid_t fapl_id, hsize_t msize, hid_t memb_fapl_id)
{
herr_t ret_value;
- H5FD_family_fapl_t fa={0, -1};
+ H5FD_family_fapl_t fa={0, -1};
H5P_genplist_t *plist; /* Property list pointer */
FUNC_ENTER_API(FAIL)
@@ -275,18 +275,18 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_family
+ * Function: H5Pget_fapl_family
*
- * Purpose: Returns information about the family file access property
- * list though the function arguments.
+ * Purpose: Returns information about the family file access property
+ * list though the function arguments.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -295,7 +295,7 @@ herr_t
H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize/*out*/, hid_t *memb_fapl_id/*out*/)
{
H5P_genplist_t *plist; /* Property list pointer */
- const H5FD_family_fapl_t *fa;
+ const H5FD_family_fapl_t *fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -319,18 +319,18 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_get
+ * Function: H5FD__family_fapl_get
*
- * Purpose: Gets a file access property list which could be used to
- * create an identical file.
+ * Purpose: Gets a file access property list which could be used to
+ * create an identical file.
*
- * Return: Success: Ptr to new file access property list.
+ * Return: Success: Ptr to new file access property list.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -338,8 +338,8 @@ done:
static void *
H5FD__family_fapl_get(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- H5FD_family_fapl_t *fa = NULL;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_fapl_t *fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
@@ -364,17 +364,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_copy
+ * Function: H5FD__family_fapl_copy
*
- * Purpose: Copies the family-specific file access properties.
+ * Purpose: Copies the family-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -417,17 +417,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_fapl_free
+ * Function: H5FD__family_fapl_free
*
- * Purpose: Frees the family-specific file access properties.
+ * Purpose: Frees the family-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -435,7 +435,7 @@ done:
static herr_t
H5FD__family_fapl_free(void *_fa)
{
- H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
+ H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -448,18 +448,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_size
+ * Function: H5FD__family_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -474,21 +474,21 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
FUNC_LEAVE_NOAPI(8)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_encode
+ * Function: H5FD__family_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is the member file size and name template.
+ * The encoding is the member file size and name template.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -496,7 +496,7 @@ H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
static herr_t
H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
FUNC_ENTER_STATIC_NOERR
@@ -517,21 +517,21 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_sb_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_sb_decode
+ * Function: H5FD__family_sb_decode
*
- * Purpose: This function has 2 separate purpose. One is to decodes the
+ * Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
* the eight-character (plus null termination) name stored in i
* the file. The FILE argument is updated according to the
* information in the superblock.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
*-------------------------------------------------------------------------
@@ -539,7 +539,7 @@ H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out
static herr_t
H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
@@ -572,19 +572,19 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_sb_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_open
+ * Function: H5FD__family_open
*
- * Purpose: Creates and/or opens a family of files as an HDF5 file.
+ * Purpose: Creates and/or opens a family of files as an HDF5 file.
*
- * Return: Success: A pointer to a new file dat structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file dat structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -598,13 +598,13 @@ done:
H5_GCC_DIAG_OFF(format-nonliteral)
static H5FD_t *
H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr)
+ haddr_t maxaddr)
{
- H5FD_family_t *file = NULL;
- char *memb_name = NULL, *temp = NULL;
- hsize_t eof = HADDR_UNDEF;
- unsigned t_flags = flags & ~H5F_ACC_CREAT;
- H5FD_t *ret_value = NULL;
+ H5FD_family_t *file = NULL;
+ char *memb_name = NULL, *temp = NULL;
+ hsize_t eof = HADDR_UNDEF;
+ unsigned t_flags = flags & ~H5F_ACC_CREAT;
+ H5FD_t *ret_value = NULL;
FUNC_ENTER_STATIC
@@ -748,19 +748,19 @@ done:
} /* end H5FD__family_open() */
H5_GCC_DIAG_ON(format-nonliteral)
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_close
+ * Function: H5FD__family_close
*
- * Purpose: Closes a family of files.
+ * Purpose: Closes a family of files.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -769,8 +769,8 @@ static herr_t
H5FD__family_close(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned nerrors = 0; /* Number of errors while closing member files */
- unsigned u; /* Local index variable */
+ unsigned nerrors = 0; /* Number of errors while closing member files */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -800,19 +800,19 @@ H5FD__family_close(H5FD_t *_file)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_close() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_cmp
+ * Function: H5FD__family_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first member of the two families.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first member of the two families.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by the
+ * caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -820,8 +820,8 @@ H5FD__family_close(H5FD_t *_file)
static int
H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
- const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
+ const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
+ const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
int ret_value = 0;
FUNC_ENTER_STATIC_NOERR
@@ -834,17 +834,17 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_cmp() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_query
+ * Function: H5FD__family_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 25, 2000
*
*-------------------------------------------------------------------------
@@ -852,7 +852,7 @@ H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
static herr_t
H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
+ const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
FUNC_ENTER_STATIC_NOERR
@@ -872,19 +872,19 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__family_query() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_get_eoa
+ * Function: H5FD__family_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -892,24 +892,24 @@ H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
static haddr_t
H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_set_eoa
+ * Function: H5FD__family_set_eoa
*
- * Purpose: Set the end-of-address marker for the file.
+ * Purpose: Set the end-of-address marker for the file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -924,10 +924,10 @@ H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- haddr_t addr = abs_eoa;
- char *memb_name = NULL;
- unsigned u; /* Local index variable */
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ haddr_t addr = abs_eoa;
+ char *memb_name = NULL;
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -989,20 +989,20 @@ done:
}
H5_GCC_DIAG_ON(format-nonliteral)
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_get_eof
+ * Function: H5FD__family_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total family size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total family size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the family of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the family of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1010,9 +1010,9 @@ H5_GCC_DIAG_ON(format-nonliteral)
static haddr_t
H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_family_t *file = (const H5FD_family_t*)_file;
- haddr_t eof=0;
- int i; /* Local index variable */
+ const H5FD_family_t *file = (const H5FD_family_t*)_file;
+ haddr_t eof=0;
+ int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -1045,7 +1045,7 @@ H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_get_handle
*
@@ -1085,34 +1085,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_read
+ * Function: H5FD__family_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- void *_buf/*out*/)
+ void *_buf/*out*/)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned char *buf = (unsigned char*)_buf;
- haddr_t sub;
- size_t req;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned char *buf = (unsigned char*)_buf;
+ haddr_t sub;
+ size_t req;
hsize_t tempreq;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
@@ -1131,12 +1131,12 @@ H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
sub = addr % file->memb_size;
- /* This check is for mainly for IA32 architecture whose size_t's size
- * is 4 bytes, to prevent overflow when user application is trying to
- * write files bigger than 4GB. */
+ /* This check is for mainly for IA32 architecture whose size_t's size
+ * is 4 bytes, to prevent overflow when user application is trying to
+ * write files bigger than 4GB. */
tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ if(tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
HDassert(u<file->nmembs);
@@ -1153,33 +1153,33 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_write
+ * Function: H5FD__family_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
- const void *_buf)
+ const void *_buf)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- const unsigned char *buf = (const unsigned char*)_buf;
- haddr_t sub;
- size_t req;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ const unsigned char *buf = (const unsigned char*)_buf;
+ haddr_t sub;
+ size_t req;
hsize_t tempreq;
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
@@ -1202,8 +1202,8 @@ H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
* is 4 bytes, to prevent overflow when user application is trying to
* write files bigger than 4GB. */
tempreq = file->memb_size-sub;
- if(tempreq > SIZET_MAX)
- tempreq = SIZET_MAX;
+ if(tempreq > SIZET_MAX)
+ tempreq = SIZET_MAX;
req = MIN(size, (size_t)tempreq);
HDassert(u<file->nmembs);
@@ -1220,16 +1220,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_flush
+ * Function: H5FD__family_flush
*
- * Purpose: Flushes all family members.
+ * Purpose: Flushes all family members.
*
- * Return: Success: 0
- * Failure: -1, as many files flushed as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1237,8 +1237,8 @@ done:
static herr_t
H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1254,17 +1254,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_flush() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD__family_truncate
+ * Function: H5FD__family_truncate
*
- * Purpose: Truncates all family members.
+ * Purpose: Truncates all family members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files truncated as possible.
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, February 23, 2008
*
*-------------------------------------------------------------------------
@@ -1272,9 +1272,9 @@ done:
static herr_t
H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
- H5FD_family_t *file = (H5FD_family_t*)_file;
- unsigned u, nerrors = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_family_t *file = (H5FD_family_t*)_file;
+ unsigned u, nerrors = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1289,7 +1289,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_truncate() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_lock
*
@@ -1309,7 +1309,7 @@ H5FD__family_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1337,7 +1337,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__family_lock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5FD__family_unlock
*
@@ -1352,8 +1352,8 @@ done:
static herr_t
H5FD__family_unlock(H5FD_t *_file)
{
- H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
- unsigned u; /* Local index variable */
+ H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
+ unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index fbca8e4..53609d9 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -12,15 +12,15 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
- * Monday, November 10, 1997
- *
- * Purpose: Implements a file driver which dispatches I/O requests to
- * other file drivers depending on the purpose of the address
- * region being accessed. For instance, all meta-data could be
- * place in one file while all raw data goes to some other file.
- * This also serves as an example of coding a complex file driver,
- * therefore, it should not use any non-public definitions.
+ * Programmer: Robb Matzke
+ * Monday, November 10, 1997
+ *
+ * Purpose: Implements a file driver which dispatches I/O requests to
+ * other file drivers depending on the purpose of the address
+ * region being accessed. For instance, all meta-data could be
+ * place in one file while all raw data goes to some other file.
+ * This also serves as an example of coding a complex file driver,
+ * therefore, it should not use any non-public definitions.
*/
#include <assert.h>
#include <stdlib.h>
@@ -30,23 +30,23 @@
#ifndef FALSE
-#define FALSE 0
+#define FALSE 0
#endif
#ifndef TRUE
-#define TRUE 1
+#define TRUE 1
#endif
/* Loop through all mapped files */
-#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \
- H5FD_mem_t ITER, LOOPVAR; \
- unsigned SEEN[H5FD_MEM_NTYPES]; \
- \
- memset(SEEN, 0, sizeof SEEN); \
+#define UNIQUE_MEMBERS_CORE(MAP, ITER, SEEN, LOOPVAR) { \
+ H5FD_mem_t ITER, LOOPVAR; \
+ unsigned SEEN[H5FD_MEM_NTYPES]; \
+ \
+ memset(SEEN, 0, sizeof SEEN); \
for (ITER=H5FD_MEM_SUPER; ITER<H5FD_MEM_NTYPES; ITER=(H5FD_mem_t)(ITER+1)) { \
- LOOPVAR = MAP[ITER]; \
- if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \
- assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- if (SEEN[LOOPVAR]++) continue; \
+ LOOPVAR = MAP[ITER]; \
+ if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=ITER; \
+ assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
+ if (SEEN[LOOPVAR]++) continue; \
/* Need two front-ends, since they are nested sometimes */
#define UNIQUE_MEMBERS(MAP, LOOPVAR) \
@@ -54,12 +54,12 @@
#define UNIQUE_MEMBERS2(MAP, LOOPVAR) \
UNIQUE_MEMBERS_CORE(MAP, _unmapped2, _seen2, LOOPVAR)
-#define ALL_MEMBERS(LOOPVAR) { \
- H5FD_mem_t LOOPVAR; \
+#define ALL_MEMBERS(LOOPVAR) { \
+ H5FD_mem_t LOOPVAR; \
for (LOOPVAR=H5FD_MEM_DEFAULT; LOOPVAR<H5FD_MEM_NTYPES; LOOPVAR=(H5FD_mem_t)(LOOPVAR+1)) {
-#define END_MEMBERS }}
+#define END_MEMBERS }}
#define H5FD_MULT_MAX_FILE_NAME_LEN 1024
@@ -72,7 +72,7 @@ typedef struct H5FD_multi_fapl_t {
hid_t memb_fapl[H5FD_MEM_NTYPES]; /*member access properties */
char *memb_name[H5FD_MEM_NTYPES]; /*name generators */
haddr_t memb_addr[H5FD_MEM_NTYPES]; /*starting addr per member */
- hbool_t relax; /*less stringent error checking */
+ hbool_t relax; /*less stringent error checking */
} H5FD_multi_fapl_t;
/*
@@ -97,7 +97,7 @@ typedef struct H5FD_multi_t {
/* Driver specific data transfer properties */
typedef struct H5FD_multi_dxpl_t {
- hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/
+ hid_t memb_dxpl[H5FD_MEM_NTYPES];/*member data xfer properties*/
} H5FD_multi_dxpl_t;
/* Private functions */
@@ -109,14 +109,14 @@ static int open_members(H5FD_multi_t *file);
static herr_t H5FD_multi_term(void);
static hsize_t H5FD_multi_sb_size(H5FD_t *file);
static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/,
- unsigned char *buf/*out*/);
+ unsigned char *buf/*out*/);
static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name,
- const unsigned char *buf);
+ const unsigned char *buf);
static void *H5FD_multi_fapl_get(H5FD_t *file);
static void *H5FD_multi_fapl_copy(const void *_old_fa);
static herr_t H5FD_multi_fapl_free(void *_fa);
static H5FD_t *H5FD_multi_open(const char *name, unsigned flags,
- hid_t fapl_id, haddr_t maxaddr);
+ hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_multi_close(H5FD_t *_file);
static int H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_multi_query(const H5FD_t *_f1, unsigned long *flags);
@@ -127,11 +127,11 @@ static haddr_t H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- hsize_t size);
+ hsize_t size);
static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, void *_buf/*out*/);
+ size_t size, void *_buf/*out*/);
static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
- size_t size, const void *_buf);
+ size_t size, const void *_buf);
static herr_t H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_multi_lock(H5FD_t *_file, hbool_t rw);
@@ -139,51 +139,51 @@ static herr_t H5FD_multi_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_multi_g = {
- "multi", /*name */
- HADDR_MAX, /*maxaddr */
- H5F_CLOSE_WEAK, /* fc_degree */
+ "multi", /*name */
+ HADDR_MAX, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
H5FD_multi_term, /*terminate */
- H5FD_multi_sb_size, /*sb_size */
- H5FD_multi_sb_encode, /*sb_encode */
- H5FD_multi_sb_decode, /*sb_decode */
- sizeof(H5FD_multi_fapl_t), /*fapl_size */
- H5FD_multi_fapl_get, /*fapl_get */
- H5FD_multi_fapl_copy, /*fapl_copy */
- H5FD_multi_fapl_free, /*fapl_free */
- 0, /*dxpl_size */
- NULL, /*dxpl_copy */
- NULL, /*dxpl_free */
- H5FD_multi_open, /*open */
- H5FD_multi_close, /*close */
- H5FD_multi_cmp, /*cmp */
- H5FD_multi_query, /*query */
- H5FD_multi_get_type_map, /*get_type_map */
- H5FD_multi_alloc, /*alloc */
- H5FD_multi_free, /*free */
- H5FD_multi_get_eoa, /*get_eoa */
- H5FD_multi_set_eoa, /*set_eoa */
- H5FD_multi_get_eof, /*get_eof */
+ H5FD_multi_sb_size, /*sb_size */
+ H5FD_multi_sb_encode, /*sb_encode */
+ H5FD_multi_sb_decode, /*sb_decode */
+ sizeof(H5FD_multi_fapl_t), /*fapl_size */
+ H5FD_multi_fapl_get, /*fapl_get */
+ H5FD_multi_fapl_copy, /*fapl_copy */
+ H5FD_multi_fapl_free, /*fapl_free */
+ 0, /*dxpl_size */
+ NULL, /*dxpl_copy */
+ NULL, /*dxpl_free */
+ H5FD_multi_open, /*open */
+ H5FD_multi_close, /*close */
+ H5FD_multi_cmp, /*cmp */
+ H5FD_multi_query, /*query */
+ H5FD_multi_get_type_map, /*get_type_map */
+ H5FD_multi_alloc, /*alloc */
+ H5FD_multi_free, /*free */
+ H5FD_multi_get_eoa, /*get_eoa */
+ H5FD_multi_set_eoa, /*set_eoa */
+ H5FD_multi_get_eof, /*get_eof */
H5FD_multi_get_handle, /*get_handle */
- H5FD_multi_read, /*read */
- H5FD_multi_write, /*write */
- H5FD_multi_flush, /*flush */
- H5FD_multi_truncate, /*truncate */
+ H5FD_multi_read, /*read */
+ H5FD_multi_write, /*write */
+ H5FD_multi_flush, /*flush */
+ H5FD_multi_truncate, /*truncate */
H5FD_multi_lock, /*lock */
H5FD_multi_unlock, /*unlock */
- H5FD_FLMAP_DEFAULT /*fl_map */
+ H5FD_FLMAP_DEFAULT /*fl_map */
};
-
+
/*-------------------------------------------------------------------------
- * Function: my_strdup
+ * Function: my_strdup
*
- * Purpose: Private version of strdup()
+ * Purpose: Private version of strdup()
*
- * Return: Success: Ptr to new copy of string
+ * Return: Success: Ptr to new copy of string
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -204,7 +204,7 @@ my_strdup(const char *s)
return x;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_multi_init
*
@@ -231,11 +231,11 @@ H5FD_multi_init(void)
return H5FD_MULTI_g;
} /* end H5FD_multi_init() */
-
+
/*---------------------------------------------------------------------------
- * Function: H5FD_multi_term
+ * Function: H5FD_multi_term
*
- * Purpose: Shut down the VFD
+ * Purpose: Shut down the VFD
*
* Returns: Non-negative on success or negative on failure
*
@@ -253,33 +253,33 @@ H5FD_multi_term(void)
return 0;
} /* end H5FD_multi_term() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_split
+ * Function: H5Pset_fapl_split
*
- * Purpose: Compatibility function. Makes the multi driver act like the
- * old split driver which stored meta data in one file and raw
- * data in another file.
+ * Purpose: Compatibility function. Makes the multi driver act like the
+ * old split driver which stored meta data in one file and raw
+ * data in another file.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 11, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
- const char *raw_ext, hid_t raw_plist_id)
+ const char *raw_ext, hid_t raw_plist_id)
{
- H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
- hid_t memb_fapl[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN];
- char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char meta_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ char raw_name[H5FD_MULT_MAX_FILE_NAME_LEN];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
/*NO TRACE*/
@@ -288,11 +288,11 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
/* Initialize */
ALL_MEMBERS(mt) {
- /* Treat global heap as raw data, not metadata */
- memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
- memb_fapl[mt] = -1;
- memb_name[mt] = NULL;
- memb_addr[mt] = HADDR_UNDEF;
+ /* Treat global heap as raw data, not metadata */
+ memb_map[mt] = ((mt == H5FD_MEM_DRAW || mt == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : H5FD_MEM_SUPER);
+ memb_fapl[mt] = -1;
+ memb_name[mt] = NULL;
+ memb_addr[mt] = HADDR_UNDEF;
} END_MEMBERS;
/* The file access properties */
@@ -302,36 +302,36 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
/* The names */
/* process meta filename */
if(meta_ext) {
- if(strstr(meta_ext, "%s")) {
+ if(strstr(meta_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(meta_name) - QK & JK - 2013/01/17
*/
- strncpy(meta_name, meta_ext, sizeof(meta_name));
+ strncpy(meta_name, meta_ext, sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
- else
- sprintf(meta_name, "%%s%s", meta_ext);
+ else
+ sprintf(meta_name, "%%s%s", meta_ext);
}
else {
- strncpy(meta_name, "%s.meta", sizeof(meta_name));
+ strncpy(meta_name, "%s.meta", sizeof(meta_name));
meta_name[sizeof(meta_name) - 1] = '\0';
}
memb_name[H5FD_MEM_SUPER] = meta_name;
/* process raw filename */
if(raw_ext) {
- if(strstr(raw_ext, "%s")) {
+ if(strstr(raw_ext, "%s")) {
/* Note: this doesn't accommodate for when the '%s' in the user's
* string is at a position >sizeof(raw_name) - QK & JK - 2013/01/17
*/
- strncpy(raw_name, raw_ext, sizeof(raw_name));
+ strncpy(raw_name, raw_ext, sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
- else
- sprintf(raw_name, "%%s%s", raw_ext);
+ else
+ sprintf(raw_name, "%%s%s", raw_ext);
}
else {
- strncpy(raw_name, "%s.raw", sizeof(raw_name));
+ strncpy(raw_name, "%s.raw", sizeof(raw_name));
raw_name[sizeof(raw_name) - 1] = '\0';
}
memb_name[H5FD_MEM_DRAW] = raw_name;
@@ -343,96 +343,96 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id,
return H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, TRUE);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pset_fapl_multi
+ * Function: H5Pset_fapl_multi
*
- * Purpose: Sets the file access property list FAPL_ID to use the multi
- * driver. The MEMB_MAP array maps memory usage types to other
- * memory usage types and is the mechanism which allows the
- * caller to specify how many files are created. The array
- * contains H5FD_MEM_NTYPES entries which are either the value
- * H5FD_MEM_DEFAULT or a memory usage type and the number of
- * unique values determines the number of files which are
- * opened. For each memory usage type which will be associated
- * with a file the MEMB_FAPL array should have a property list
- * and the MEMB_NAME array should be a name generator (a
- * printf-style format with a %s which will be replaced with the
- * name passed to H5FDopen(), usually from H5Fcreate() or
- * H5Fopen()).
+ * Purpose: Sets the file access property list FAPL_ID to use the multi
+ * driver. The MEMB_MAP array maps memory usage types to other
+ * memory usage types and is the mechanism which allows the
+ * caller to specify how many files are created. The array
+ * contains H5FD_MEM_NTYPES entries which are either the value
+ * H5FD_MEM_DEFAULT or a memory usage type and the number of
+ * unique values determines the number of files which are
+ * opened. For each memory usage type which will be associated
+ * with a file the MEMB_FAPL array should have a property list
+ * and the MEMB_NAME array should be a name generator (a
+ * printf-style format with a %s which will be replaced with the
+ * name passed to H5FDopen(), usually from H5Fcreate() or
+ * H5Fopen()).
*
- * If RELAX is set then opening an existing file for read-only
- * access will not fail if some file members are missing. This
- * allows a file to be accessed in a limited sense if just the
- * meta data is available.
+ * If RELAX is set then opening an existing file for read-only
+ * access will not fail if some file members are missing. This
+ * allows a file to be accessed in a limited sense if just the
+ * meta data is available.
*
- * Defaults: Default values for each of the optional arguments are:
+ * Defaults: Default values for each of the optional arguments are:
*
- * memb_map: The default member map has the value
- * H5FD_MEM_DEFAULT for each element.
+ * memb_map: The default member map has the value
+ * H5FD_MEM_DEFAULT for each element.
*
- * memb_fapl: The value H5P_DEFAULT for each element.
+ * memb_fapl: The value H5P_DEFAULT for each element.
*
- * memb_name: The string `%s-X.h5' where `X' is one of the
- * letters `s' (H5FD_MEM_SUPER),
- * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
- * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
- * `o' (H5FD_MEM_OHDR).
+ * memb_name: The string `%s-X.h5' where `X' is one of the
+ * letters `s' (H5FD_MEM_SUPER),
+ * `b' (H5FD_MEM_BTREE), `r' (H5FD_MEM_DRAW),
+ * `g' (H5FD_MEM_GHEAP), 'l' (H5FD_MEM_LHEAP),
+ * `o' (H5FD_MEM_OHDR).
*
- * memb_addr: The value HADDR_UNDEF for each element.
+ * memb_addr: The value HADDR_UNDEF for each element.
*
*
- * Example: To set up a multi file access property list which partitions
- * data into meta and raw files each being 1/2 of the address
- * space one would say:
+ * Example: To set up a multi file access property list which partitions
+ * data into meta and raw files each being 1/2 of the address
+ * space one would say:
*
- * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
- * hid_t memb_fapl[H5FD_MEM_NTYPES];
- * const char *memb[H5FD_MEM_NTYPES];
- * haddr_t memb_addr[H5FD_MEM_NTYPES];
+ * H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
+ * hid_t memb_fapl[H5FD_MEM_NTYPES];
+ * const char *memb[H5FD_MEM_NTYPES];
+ * haddr_t memb_addr[H5FD_MEM_NTYPES];
*
- * // The mapping...
- * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
- * memb_map[mt] = H5FD_MEM_SUPER;
- * }
- * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
+ * // The mapping...
+ * for (mt=0; mt<H5FD_MEM_NTYPES; mt++) {
+ * memb_map[mt] = H5FD_MEM_SUPER;
+ * }
+ * memb_map[H5FD_MEM_DRAW] = H5FD_MEM_DRAW;
*
- * // Member information
- * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_SUPER] = "%s.meta";
- * memb_addr[H5FD_MEM_SUPER] = 0;
+ * // Member information
+ * memb_fapl[H5FD_MEM_SUPER] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_SUPER] = "%s.meta";
+ * memb_addr[H5FD_MEM_SUPER] = 0;
*
- * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
- * memb_name[H5FD_MEM_DRAW] = "%s.raw";
- * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
+ * memb_fapl[H5FD_MEM_DRAW] = H5P_DEFAULT;
+ * memb_name[H5FD_MEM_DRAW] = "%s.raw";
+ * memb_addr[H5FD_MEM_DRAW] = HADDR_MAX/2;
*
- * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
- * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
- * memb_name, memb_addr, TRUE);
+ * hid_t fapl = H5Pcreate(H5P_FILE_ACCESS);
+ * H5Pset_fapl_multi(fapl, memb_map, memb_fapl,
+ * memb_name, memb_addr, TRUE);
*
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
- const hid_t *memb_fapl, const char * const *memb_name,
- const haddr_t *memb_addr, hbool_t relax)
+ const hid_t *memb_fapl, const char * const *memb_name,
+ const haddr_t *memb_addr, hbool_t relax)
{
- H5FD_multi_fapl_t fa;
- H5FD_mem_t mt, mmt;
- H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
- hid_t _memb_fapl[H5FD_MEM_NTYPES];
- char _memb_name[H5FD_MEM_NTYPES][16];
- const char *_memb_name_ptrs[H5FD_MEM_NTYPES];
- haddr_t _memb_addr[H5FD_MEM_NTYPES];
- static const char *letters = "Xsbrglo";
+ H5FD_multi_fapl_t fa;
+ H5FD_mem_t mt, mmt;
+ H5FD_mem_t _memb_map[H5FD_MEM_NTYPES];
+ hid_t _memb_fapl[H5FD_MEM_NTYPES];
+ char _memb_name[H5FD_MEM_NTYPES][16];
+ const char *_memb_name_ptrs[H5FD_MEM_NTYPES];
+ haddr_t _memb_addr[H5FD_MEM_NTYPES];
+ static const char *letters = "Xsbrglo";
static const char *func="H5FDset_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
@@ -445,45 +445,45 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
TRUE != H5Pisa_class(fapl_id, H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_PLIST, H5E_BADVALUE, "not an access list", -1)
if (!memb_map) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_map[mt] = H5FD_MEM_DEFAULT;
- memb_map = _memb_map;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_map[mt] = H5FD_MEM_DEFAULT;
+ memb_map = _memb_map;
}
if (!memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
- memb_fapl = _memb_fapl;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_fapl[mt] = H5Pcreate(H5P_FILE_ACCESS);
+ memb_fapl = _memb_fapl;
}
if (!memb_name) {
- assert(strlen(letters)==H5FD_MEM_NTYPES);
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
- _memb_name_ptrs[mt] = _memb_name[mt];
- }
- memb_name = _memb_name_ptrs;
+ assert(strlen(letters)==H5FD_MEM_NTYPES);
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ sprintf(_memb_name[mt], "%%s-%c.h5", letters[mt]);
+ _memb_name_ptrs[mt] = _memb_name[mt];
+ }
+ memb_name = _memb_name_ptrs;
}
if (!memb_addr) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
- _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1));
- memb_addr = _memb_addr;
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1))
+ _memb_addr[mt] = (hsize_t)(mt ? (mt - 1) : 0) * (HADDR_MAX / (H5FD_MEM_NTYPES-1));
+ memb_addr = _memb_addr;
}
for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- /* Map usage type */
- mmt = memb_map[mt];
- if (mmt<0 || mmt>=H5FD_MEM_NTYPES)
+ /* Map usage type */
+ mmt = memb_map[mt];
+ if (mmt<0 || mmt>=H5FD_MEM_NTYPES)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADRANGE, "file resource type out of range", -1)
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
+ if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
- /*
- * All members of MEMB_FAPL must be either defaults or actual file
- * access property lists.
- */
- if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
+ /*
+ * All members of MEMB_FAPL must be either defaults or actual file
+ * access property lists.
+ */
+ if (H5P_DEFAULT!=memb_fapl[mmt] && TRUE!=H5Pisa_class(memb_fapl[mmt], H5P_FILE_ACCESS))
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type incorrect", -1)
- /* All names must be defined */
- if (!memb_name[mmt] || !memb_name[mmt][0])
+ /* All names must be defined */
+ if (!memb_name[mmt] || !memb_name[mmt][0])
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1)
}
@@ -506,30 +506,30 @@ H5Pset_fapl_multi(hid_t fapl_id, const H5FD_mem_t *memb_map,
return H5Pset_driver(fapl_id, H5FD_MULTI, &fa);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5Pget_fapl_multi
+ * Function: H5Pget_fapl_multi
*
- * Purpose: Returns information about the multi file access property
- * list though the function arguments which are the same as for
- * H5Pset_fapl_multi() above.
+ * Purpose: Returns information about the multi file access property
+ * list though the function arguments which are the same as for
+ * H5Pset_fapl_multi() above.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
- hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
- haddr_t *memb_addr/*out*/, hbool_t *relax)
+ hid_t *memb_fapl/*out*/, char **memb_name/*out*/,
+ haddr_t *memb_addr/*out*/, hbool_t *relax)
{
const H5FD_multi_fapl_t *fa;
- H5FD_mem_t mt;
+ H5FD_mem_t mt;
static const char *func="H5FDget_fapl_multi"; /* Function Name for error reporting */
/*NO TRACE*/
@@ -548,41 +548,41 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
if (memb_map)
memcpy(memb_map, fa->memb_map, H5FD_MEM_NTYPES*sizeof(H5FD_mem_t));
if (memb_fapl) {
- for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (fa->memb_fapl[mt]>=0)
- memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
- else
- memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
- }
+ for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
+ if (fa->memb_fapl[mt]>=0)
+ memb_fapl[mt] = H5Pcopy(fa->memb_fapl[mt]);
+ else
+ memb_fapl[mt] = fa->memb_fapl[mt]; /*default or bad ID*/
+ }
}
if(memb_name) {
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(fa->memb_name[mt])
- memb_name[mt] = my_strdup(fa->memb_name[mt]);
- else
- memb_name[mt] = NULL;
- }
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
+ if(fa->memb_name[mt])
+ memb_name[mt] = my_strdup(fa->memb_name[mt]);
+ else
+ memb_name[mt] = NULL;
+ }
}
if (memb_addr)
- memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
+ memcpy(memb_addr, fa->memb_addr, H5FD_MEM_NTYPES*sizeof(haddr_t));
if (relax)
- *relax = fa->relax;
+ *relax = fa->relax;
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_size
+ * Function: H5FD_multi_sb_size
*
- * Purpose: Returns the size of the private information to be stored in
- * the superblock.
+ * Purpose: Returns the size of the private information to be stored in
+ * the superblock.
*
- * Return: Success: The super block driver data size.
+ * Return: Success: The super block driver data size.
*
- * Failure: never fails
+ * Failure: never fails
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
@@ -590,16 +590,16 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map/*out*/,
static hsize_t
H5FD_multi_sb_size(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- unsigned nseen = 0;
- hsize_t nbytes = 8; /*size of header*/
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ unsigned nseen = 0;
+ hsize_t nbytes = 8; /*size of header*/
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* How many unique files? */
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
- nseen++;
+ nseen++;
} END_MEMBERS;
/* Addresses and EOA markers */
@@ -614,40 +614,40 @@ H5FD_multi_sb_size(H5FD_t *_file)
return nbytes;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_encode
+ * Function: H5FD_multi_sb_encode
*
- * Purpose: Encode driver information for the superblock. The NAME
- * argument is a nine-byte buffer which will be initialized with
- * an eight-character name/version number and null termination.
+ * Purpose: Encode driver information for the superblock. The NAME
+ * argument is a nine-byte buffer which will be initialized with
+ * an eight-character name/version number and null termination.
*
- * The encoding is a six-byte member mapping followed two bytes
- * which are unused. For each unique file in usage-type order
- * encode all the starting addresses as unsigned 64-bit integers,
- * then all the EOA values as unsigned 64-bit integers, then all
- * the template names as null terminated strings which are
- * multiples of 8 characters.
+ * The encoding is a six-byte member mapping followed two bytes
+ * which are unused. For each unique file in usage-type order
+ * encode all the starting addresses as unsigned 64-bit integers,
+ * then all the EOA values as unsigned 64-bit integers, then all
+ * the template names as null terminated strings which are
+ * multiples of 8 characters.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
- unsigned char *buf/*out*/)
+ unsigned char *buf/*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- haddr_t memb_eoa;
- unsigned char *p;
- size_t nseen;
- size_t i;
- H5FD_mem_t m;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ haddr_t memb_eoa;
+ unsigned char *p;
+ size_t nseen;
+ size_t i;
+ H5FD_mem_t m;
static const char *func="H5FD_multi_sb_encode"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -698,23 +698,23 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
return 0;
} /* end H5FD_multi_sb_encode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_sb_decode
+ * Function: H5FD_multi_sb_decode
*
- * Purpose: Decodes the superblock information for this driver. The NAME
- * argument is the eight-character (plus null termination) name
- * stored in the file.
+ * Purpose: Decodes the superblock information for this driver. The NAME
+ * argument is the eight-character (plus null termination) name
+ * stored in the file.
*
- * The FILE argument is updated according to the information in
- * the superblock. This may mean that some member files are
- * closed and others are opened.
+ * The FILE argument is updated according to the information in
+ * the superblock. This may mean that some member files are
+ * closed and others are opened.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 16, 1999
*
*-------------------------------------------------------------------------
@@ -722,17 +722,17 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name/*out*/,
static herr_t
H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- char x[2*H5FD_MEM_NTYPES*8];
- H5FD_mem_t map[H5FD_MEM_NTYPES];
- int i;
- size_t nseen=0;
- hbool_t map_changed=FALSE;
- hbool_t in_use[H5FD_MEM_NTYPES];
- const char *memb_name[H5FD_MEM_NTYPES];
- haddr_t memb_addr[H5FD_MEM_NTYPES];
- haddr_t memb_eoa[H5FD_MEM_NTYPES];
- haddr_t *ap;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ char x[2*H5FD_MEM_NTYPES*8];
+ H5FD_mem_t map[H5FD_MEM_NTYPES];
+ int i;
+ size_t nseen=0;
+ hbool_t map_changed=FALSE;
+ hbool_t in_use[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+ haddr_t memb_eoa[H5FD_MEM_NTYPES];
+ haddr_t *ap;
static const char *func="H5FD_multi_sb_decode"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -839,20 +839,20 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
return 0;
} /* end H5FD_multi_sb_decode() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_get
+ * Function: H5FD_multi_fapl_get
*
- * Purpose: Returns a file access property list which indicates how the
- * specified file is being accessed. The return list could be
- * used to access another file the same way.
+ * Purpose: Returns a file access property list which indicates how the
+ * specified file is being accessed. The return list could be
+ * used to access another file the same way.
*
- * Return: Success: Ptr to new file access property list with all
- * members copied from the file struct.
+ * Return: Success: Ptr to new file access property list with all
+ * members copied from the file struct.
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, August 13, 1999
*
*-------------------------------------------------------------------------
@@ -860,7 +860,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
static void *
H5FD_multi_fapl_get(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -868,17 +868,17 @@ H5FD_multi_fapl_get(H5FD_t *_file)
return H5FD_multi_fapl_copy(&(file->fa));
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_copy
+ * Function: H5FD_multi_fapl_copy
*
- * Purpose: Copies the multi-specific file access properties.
+ * Purpose: Copies the multi-specific file access properties.
*
- * Return: Success: Ptr to a new property list
+ * Return: Success: Ptr to a new property list
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -898,20 +898,20 @@ H5FD_multi_fapl_copy(const void *_old_fa)
memcpy(new_fa, old_fa, sizeof(H5FD_multi_fapl_t));
ALL_MEMBERS(mt) {
- if (old_fa->memb_fapl[mt]>=0) {
- if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) {
+ if (old_fa->memb_fapl[mt]>=0) {
+ if (H5Iinc_ref(old_fa->memb_fapl[mt]) < 0) {
nerrors++;
break;
}
- new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt];
- }
- if (old_fa->memb_name[mt]) {
- new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
+ new_fa->memb_fapl[mt] = old_fa->memb_fapl[mt];
+ }
+ if (old_fa->memb_name[mt]) {
+ new_fa->memb_name[mt] = my_strdup(old_fa->memb_name[mt]);
if (NULL == new_fa->memb_name[mt]) {
nerrors++;
break;
}
- }
+ }
} END_MEMBERS;
if (nerrors) {
@@ -927,17 +927,17 @@ H5FD_multi_fapl_copy(const void *_old_fa)
return new_fa;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_fapl_free
+ * Function: H5FD_multi_fapl_free
*
- * Purpose: Frees the multi-specific file access properties.
+ * Purpose: Frees the multi-specific file access properties.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -945,17 +945,17 @@ H5FD_multi_fapl_copy(const void *_old_fa)
static herr_t
H5FD_multi_fapl_free(void *_fa)
{
- H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
+ H5FD_multi_fapl_t *fa = (H5FD_multi_fapl_t*)_fa;
static const char *func="H5FD_multi_fapl_free"; /* Function Name for error reporting */
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
- if (fa->memb_fapl[mt]>=0)
+ if (fa->memb_fapl[mt]>=0)
if(H5Idec_ref(fa->memb_fapl[mt])<0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", -1)
- if (fa->memb_name[mt])
+ if (fa->memb_name[mt])
free(fa->memb_name[mt]);
} END_MEMBERS;
free(fa);
@@ -963,19 +963,19 @@ H5FD_multi_fapl_free(void *_fa)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_open
+ * Function: H5FD_multi_open
*
- * Purpose: Creates and/or opens a multi HDF5 file.
+ * Purpose: Creates and/or opens a multi HDF5 file.
*
- * Return: Success: A pointer to a new file data structure. The
- * public fields will be initialized by the
- * caller, which is always H5FD_open().
+ * Return: Success: A pointer to a new file data structure. The
+ * public fields will be initialized by the
+ * caller, which is always H5FD_open().
*
- * Failure: NULL
+ * Failure: NULL
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -983,10 +983,10 @@ H5FD_multi_fapl_free(void *_fa)
static H5FD_t *
H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
- H5FD_multi_t *file=NULL;
- hid_t close_fapl=-1;
+ H5FD_multi_t *file=NULL;
+ hid_t close_fapl=-1;
const H5FD_multi_fapl_t *fa;
- H5FD_mem_t m;
+ H5FD_mem_t m;
static const char *func="H5FD_multi_open"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1060,19 +1060,19 @@ error:
return NULL;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_close
+ * Function: H5FD_multi_close
*
- * Purpose: Closes a multi file.
+ * Purpose: Closes a multi file.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative with as many members closed as
- * possible. The only subsequent operation
- * permitted on the file is a close operation.
+ * Failure: Negative with as many members closed as
+ * possible. The only subsequent operation
+ * permitted on the file is a close operation.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1080,8 +1080,8 @@ error:
static herr_t
H5FD_multi_close(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors=0;
static const char *func="H5FD_multi_close"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1089,21 +1089,21 @@ H5FD_multi_close(H5FD_t *_file)
/* Close as many members as possible */
ALL_MEMBERS(mt) {
- if (file->memb[mt]) {
- if (H5FDclose(file->memb[mt])<0) {
+ if (file->memb[mt]) {
+ if (H5FDclose(file->memb[mt])<0) {
nerrors++;
- } else {
+ } else {
file->memb[mt] = NULL;
- }
- }
+ }
+ }
} END_MEMBERS;
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1)
/* Clean up other stuff */
ALL_MEMBERS(mt) {
- if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]);
- if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
+ if (file->fa.memb_fapl[mt]>=0) (void)H5Idec_ref(file->fa.memb_fapl[mt]);
+ if (file->fa.memb_name[mt]) free(file->fa.memb_name[mt]);
} END_MEMBERS;
free(file->name);
@@ -1111,22 +1111,21 @@ H5FD_multi_close(H5FD_t *_file)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_cmp
+ * Function: H5FD_multi_cmp
*
- * Purpose: Compares two file families to see if they are the same. It
- * does this by comparing the first common member of the two
- * families. If the families have no members in common then the
- * file with the earliest member is smaller than the other file.
- * We abort if neither file has any members.
+ * Purpose: Compares two file families to see if they are the same. It
+ * does this by comparing the first common member of the two
+ * families. If the families have no members in common then the
+ * file with the earliest member is smaller than the other file.
+ * We abort if neither file has any members.
*
- * Return: Success: like strcmp()
+ * Return: Success: like strcmp()
*
- * Failure: never fails (arguments were checked by the
- * caller).
+ * Failure: never fails (arguments were checked by th caller).
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1134,24 +1133,24 @@ H5FD_multi_close(H5FD_t *_file)
static int
H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
- const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
- const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
- H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
- int cmp=0;
+ const H5FD_multi_t *f1 = (const H5FD_multi_t*)_f1;
+ const H5FD_multi_t *f2 = (const H5FD_multi_t*)_f2;
+ H5FD_mem_t out_mt = H5FD_MEM_DEFAULT;
+ int cmp=0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
out_mt = mt;
- if(f1->memb[mt] && f2->memb[mt])
+ if(f1->memb[mt] && f2->memb[mt])
break;
- if(!cmp) {
- if(f1->memb[mt])
+ if(!cmp) {
+ if(f1->memb[mt])
cmp = -1;
- else if(f2->memb[mt])
+ else if(f2->memb[mt])
cmp = 1;
- }
+ }
} END_MEMBERS;
assert(cmp || out_mt<H5FD_MEM_NTYPES);
if(out_mt>=H5FD_MEM_NTYPES)
@@ -1160,18 +1159,18 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
return H5FDcmp(f1->memb[out_mt], f2->memb[out_mt]);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_query
+ * Function: H5FD_multi_query
*
- * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, September 26, 2000
*
*-------------------------------------------------------------------------
@@ -1194,16 +1193,16 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
return(0);
} /* end H5FD_multi_query() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_type_map
+ * Function: H5FD_multi_get_type_map
*
- * Purpose: Retrieve the memory type mapping for this file
+ * Purpose: Retrieve the memory type mapping for this file
*
- * Return: Success: non-negative
- * Failure: negative
+ * Return: Success: non-negative
+ * Failure: negative
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 9, 2008
*
*-------------------------------------------------------------------------
@@ -1211,7 +1210,7 @@ H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */)
static herr_t
H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
/* Copy file's free space type mapping */
memcpy(type_map, file->fa.memb_map, sizeof(file->fa.memb_map));
@@ -1219,19 +1218,19 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
return(0);
} /* end H5FD_multi_get_type_map() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eoa
+ * Function: H5FD_multi_get_eoa
*
- * Purpose: Returns the end-of-address marker for the file. The EOA
- * marker is the first address past the last byte allocated in
- * the format address space.
+ * Purpose: Returns the end-of-address marker for the file. The EOA
+ * marker is the first address past the last byte allocated in
+ * the format address space.
*
- * Return: Success: The end-of-address-marker
+ * Return: Success: The end-of-address-marker
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1239,7 +1238,7 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
static haddr_t
H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
haddr_t eoa = 0;
static const char *func="H5FD_multi_get_eoa"; /* Function Name for error reporting */
@@ -1256,26 +1255,26 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
UNIQUE_MEMBERS(file->fa.memb_map, mt) {
haddr_t memb_eoa;
- if (file->memb[mt]) {
+ if (file->memb[mt]) {
/* Retrieve EOA */
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY {
memb_eoa = H5FDget_eoa(file->memb[mt], mt);
- } H5E_END_TRY;
+ } H5E_END_TRY;
- if(HADDR_UNDEF == memb_eoa)
+ if(HADDR_UNDEF == memb_eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
if(memb_eoa>0)
memb_eoa += file->fa.memb_addr[mt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- memb_eoa = file->memb_next[mt];
- assert(HADDR_UNDEF != memb_eoa);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ memb_eoa = file->memb_next[mt];
+ assert(HADDR_UNDEF != memb_eoa);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
if(memb_eoa > eoa)
eoa = memb_eoa;
@@ -1286,44 +1285,44 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
- if(file->memb[mmt]) {
+ if(file->memb[mmt]) {
H5E_BEGIN_TRY {
- eoa = H5FDget_eoa(file->memb[mmt], mmt);
+ eoa = H5FDget_eoa(file->memb[mmt], mmt);
} H5E_END_TRY;
- if(HADDR_UNDEF == eoa)
+ if(HADDR_UNDEF == eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa", HADDR_UNDEF)
- if(eoa > 0)
+ if(eoa > 0)
eoa += file->fa.memb_addr[mmt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- eoa = file->memb_next[mmt];
- assert(HADDR_UNDEF != eoa);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ eoa = file->memb_next[mmt];
+ assert(HADDR_UNDEF != eoa);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eoa", HADDR_UNDEF)
- }
+ }
}
return eoa;
} /* end H5FD_multi_get_eoa() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_set_eoa
+ * Function: H5FD_multi_set_eoa
*
- * Purpose: Set the end-of-address marker for the file by savig the new
- * EOA value in the file struct. Also set the EOA marker for the
- * subfile in which the new EOA value falls. We don't set the
- * EOA values of any other subfiles.
+ * Purpose: Set the end-of-address marker for the file by savig the new
+ * EOA value in the file struct. Also set the EOA marker for the
+ * subfile in which the new EOA value falls. We don't set the
+ * EOA values of any other subfiles.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1331,9 +1330,9 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
static herr_t
H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- herr_t status;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
+ herr_t status;
static const char *func="H5FD_multi_set_eoa"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1364,7 +1363,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
assert(eoa < file->memb_next[mmt]);
H5E_BEGIN_TRY {
- status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
+ status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
} H5E_END_TRY;
if(status < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1)
@@ -1372,20 +1371,20 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
return 0;
} /* end H5FD_multi_set_eoa() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_get_eof
+ * Function: H5FD_multi_get_eof
*
- * Purpose: Returns the end-of-file marker, which is the greater of
- * either the total multi size or the current EOA marker.
+ * Purpose: Returns the end-of-file marker, which is the greater of
+ * either the total multi size or the current EOA marker.
*
- * Return: Success: End of file address, the first address past
- * the end of the multi of files or the current
- * EOA, whichever is larger.
+ * Return: Success: End of file address, the first address past
+ * the end of the multi of files or the current
+ * EOA, whichever is larger.
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1393,8 +1392,8 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
static haddr_t
H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
- const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
- haddr_t eof = 0;
+ const H5FD_multi_t *file = (const H5FD_multi_t*)_file;
+ haddr_t eof = 0;
static const char *func="H5FD_multi_get_eof"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1433,31 +1432,31 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
if(H5FD_MEM_DEFAULT == mmt)
mmt = type;
- if(file->memb[mmt]) {
+ if(file->memb[mmt]) {
/* Retrieve EOF */
H5E_BEGIN_TRY {
- eof = H5FDget_eof(file->memb[mmt], mmt);
+ eof = H5FDget_eof(file->memb[mmt], mmt);
} H5E_END_TRY;
- if(HADDR_UNDEF == eof)
+ if(HADDR_UNDEF == eof)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof", HADDR_UNDEF)
- if(eof > 0)
+ if(eof > 0)
eof += file->fa.memb_addr[mmt];
- } else if(file->fa.relax) {
- /*
- * The member is not open yet (maybe it doesn't exist). Make the
- * best guess about the end-of-file.
- */
- eof = file->memb_next[mmt];
- assert(HADDR_UNDEF != eof);
- } else {
+ } else if(file->fa.relax) {
+ /*
+ * The member is not open yet (maybe it doesn't exist). Make the
+ * best guess about the end-of-file.
+ */
+ eof = file->memb_next[mmt];
+ assert(HADDR_UNDEF != eof);
+ } else {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "bad eof", HADDR_UNDEF)
- }
+ }
}
return eof;
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_multi_get_handle
*
@@ -1488,17 +1487,17 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
return (H5FDget_vfd_handle(file->memb[mmt], fapl, file_handle));
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_alloc
+ * Function: H5FD_multi_alloc
*
- * Purpose: Allocate file memory.
+ * Purpose: Allocate file memory.
*
- * Return: Success: Address of new memory
+ * Return: Success: Address of new memory
*
- * Failure: HADDR_UNDEF
+ * Failure: HADDR_UNDEF
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
*-------------------------------------------------------------------------
@@ -1506,9 +1505,9 @@ H5FD_multi_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
static haddr_t
H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
- haddr_t addr;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
+ haddr_t addr;
static const char *func="H5FD_multi_alloc"; /* Function Name for error reporting */
mmt = file->fa.memb_map[type];
@@ -1529,31 +1528,31 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
/*#ifdef TMP
if ( addr + size > file->eoa ) {
- if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
+ if ( H5FD_multi_set_eoa(_file, addr + size) < 0 ) {
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, \
- "can't set eoa", HADDR_UNDEF)
- }
+ "can't set eoa", HADDR_UNDEF)
+ }
}
#else
if ( addr + size > file->eoa )
- file->eoa = addr + size;
+ file->eoa = addr + size;
#endif */
return addr;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_free
+ * Function: H5FD_multi_free
*
- * Purpose: Frees memory
+ * Purpose: Frees memory
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 12, 1999
*
*-------------------------------------------------------------------------
@@ -1561,8 +1560,8 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
static herr_t
H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mmt;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mmt;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
@@ -1575,20 +1574,20 @@ H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsi
return H5FDfree(file->memb[mmt], mmt, dxpl_id, addr-file->fa.memb_addr[mmt], size);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_read
+ * Function: H5FD_multi_read
*
- * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
- * into buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
+ * into buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero. Result is stored in caller-supplied
- * buffer BUF.
+ * Return: Success: Zero. Result is stored in caller-supplied
+ * buffer BUF.
*
- * Failure: -1, contents of buffer BUF are undefined.
+ * Failure: -1, contents of buffer BUF are undefined.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1597,26 +1596,26 @@ static herr_t
H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ mmt = file->fa.memb_map[mt];
+ if(H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt < H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if(file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
+ if(file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
} /* end for */
assert(hi > 0);
@@ -1624,19 +1623,19 @@ H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
return H5FDread(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf);
} /* end H5FD_multi_read() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_write
+ * Function: H5FD_multi_write
*
- * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
- * from buffer BUF according to data transfer properties in
- * DXPL_ID.
+ * Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
+ * from buffer BUF according to data transfer properties in
+ * DXPL_ID.
*
- * Return: Success: Zero
+ * Return: Success: Zero
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1645,26 +1644,26 @@ static herr_t
H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *_buf)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
- haddr_t start_addr = 0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt, mmt, hi = H5FD_MEM_DEFAULT;
+ haddr_t start_addr = 0;
/* Clear the error stack */
H5Eclear2(H5E_DEFAULT);
/* Find the file to which this address belongs */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- mmt = file->fa.memb_map[mt];
- if(H5FD_MEM_DEFAULT == mmt)
+ mmt = file->fa.memb_map[mt];
+ if(H5FD_MEM_DEFAULT == mmt)
mmt = mt;
- assert(mmt > 0 && mmt<H5FD_MEM_NTYPES);
+ assert(mmt > 0 && mmt<H5FD_MEM_NTYPES);
- if(file->fa.memb_addr[mmt] > addr)
+ if(file->fa.memb_addr[mmt] > addr)
continue;
- if(file->fa.memb_addr[mmt] >= start_addr) {
- start_addr = file->fa.memb_addr[mmt];
- hi = mmt;
- } /* end if */
+ if(file->fa.memb_addr[mmt] >= start_addr) {
+ start_addr = file->fa.memb_addr[mmt];
+ hi = mmt;
+ } /* end if */
} /* end for */
assert(hi > 0);
@@ -1672,17 +1671,17 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
return H5FDwrite(file->memb[hi], type, dxpl_id, addr - start_addr, size, _buf);
} /* end H5FD_multi_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_flush
+ * Function: H5FD_multi_flush
*
- * Purpose: Flushes all multi members.
+ * Purpose: Flushes all multi members.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1, as many files flushed as possible.
+ * Failure: -1, as many files flushed as possible.
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
*-------------------------------------------------------------------------
@@ -1690,13 +1689,13 @@ H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t
H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt;
+ int nerrors=0;
static const char *func="H5FD_multi_flush"; /* Function Name for error reporting */
#if 0
- H5FD_mem_t mmt;
+ H5FD_mem_t mmt;
/* Debugging stuff... */
fprintf(stderr, "multifile access information:\n");
@@ -1704,9 +1703,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* print the map */
fprintf(stderr, " map=");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- mmt = file->memb_map[mt];
- if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
- fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
+ mmt = file->memb_map[mt];
+ if (H5FD_MEM_DEFAULT==mmt) mmt = mt;
+ fprintf(stderr, "%s%d", 1==mt?"":",", (int)mmt);
}
fprintf(stderr, "\n");
@@ -1716,14 +1715,14 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
fprintf(stderr, " ------ -------------------- -------------------- -------------------- ------------------------------\n");
for (mt=1; mt<H5FD_MEM_NTYPES; mt++) {
- if (HADDR_UNDEF!=file->memb_addr[mt]) {
- haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
- fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
- (int)mt, (unsigned long long)(file->memb_addr[mt]),
- (unsigned long long)eoa,
- (unsigned long long)(file->memb_next[mt]),
- file->memb_name[mt]);
- }
+ if (HADDR_UNDEF!=file->memb_addr[mt]) {
+ haddr_t eoa = H5FDget_eoa(file->memb[mt], mt);
+ fprintf(stderr, " %6d %20llu %20llu %20llu %s\n",
+ (int)mt, (unsigned long long)(file->memb_addr[mt]),
+ (unsigned long long)eoa,
+ (unsigned long long)(file->memb_next[mt]),
+ file->memb_name[mt]);
+ }
}
#endif
@@ -1732,11 +1731,11 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* Flush each file */
for (mt=H5FD_MEM_SUPER; mt<H5FD_MEM_NTYPES; mt=(H5FD_mem_t)(mt+1)) {
- if (file->memb[mt]) {
- H5E_BEGIN_TRY {
- if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++;
- } H5E_END_TRY;
- }
+ if (file->memb[mt]) {
+ H5E_BEGIN_TRY {
+ if (H5FDflush(file->memb[mt],dxpl_id,closing)<0) nerrors++;
+ } H5E_END_TRY;
+ }
}
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error flushing member files", -1)
@@ -1744,16 +1743,16 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_truncate
+ * Function: H5FD_multi_truncate
*
- * Purpose: Truncates all multi members.
+ * Purpose: Truncates all multi members.
*
- * Return: Success: 0
- * Failure: -1, as many files truncated as possible.
+ * Return: Success: 0
+ * Failure: -1, as many files truncated as possible.
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, January 31, 2008
*
*-------------------------------------------------------------------------
@@ -1761,9 +1760,9 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
static herr_t
H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- H5FD_mem_t mt;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ H5FD_mem_t mt;
+ int nerrors=0;
static const char *func="H5FD_multi_truncate"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1771,12 +1770,12 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
/* Truncate each file */
for(mt = H5FD_MEM_SUPER; mt < H5FD_MEM_NTYPES; mt = (H5FD_mem_t)(mt + 1)) {
- if(file->memb[mt]) {
- H5E_BEGIN_TRY {
- if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
+ if(file->memb[mt]) {
+ H5E_BEGIN_TRY {
+ if(H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
nerrors++;
- } H5E_END_TRY;
- }
+ } H5E_END_TRY;
+ }
}
if(nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error truncating member files", -1)
@@ -1784,28 +1783,28 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
return 0;
} /* end H5FD_multi_truncate() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_lock
+ * Function: H5FD_multi_lock
*
- * Purpose: Place a lock on all multi members.
- * When there is error in locking a member file, it will not
- * proceed further and will try to remove the locks of those
- * member files that are locked before error is encountered.
+ * Purpose: Place a lock on all multi members.
+ * When there is error in locking a member file, it will not
+ * proceed further and will try to remove the locks of those
+ * member files that are locked before error is encountered.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Vailin Choi; March 2015
+ * Programmer: Vailin Choi; March 2015
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors = 0;
- H5FD_mem_t out_mt;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors = 0;
+ H5FD_mem_t out_mt;
static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1842,26 +1841,26 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
} /* H5FD_multi_lock() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5FD_multi_unlock
+ * Function: H5FD_multi_unlock
*
- * Purpose: Remove the lock on all multi members.
- * It will try to unlock all member files but will record error
- * encountered.
+ * Purpose: Remove the lock on all multi members.
+ * It will try to unlock all member files but will record error
+ * encountered.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Vailin Choi; March 2015
+ * Programmer: Vailin Choi; March 2015
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_multi_unlock(H5FD_t *_file)
{
- H5FD_multi_t *file = (H5FD_multi_t*)_file;
- int nerrors=0;
+ H5FD_multi_t *file = (H5FD_multi_t*)_file;
+ int nerrors=0;
static const char *func="H5FD_multi_unlock"; /* Function Name for error reporting */
/* Clear the error stack */
@@ -1870,7 +1869,7 @@ H5FD_multi_unlock(H5FD_t *_file)
ALL_MEMBERS(mt) {
if(file->memb[mt])
if(H5FDunlock(file->memb[mt]) < 0)
- nerrors++;
+ nerrors++;
} END_MEMBERS;
if(nerrors)
@@ -1879,18 +1878,18 @@ H5FD_multi_unlock(H5FD_t *_file)
return 0;
} /* H5FD_multi_unlock() */
-
+
/*-------------------------------------------------------------------------
- * Function: compute_next
+ * Function: compute_next
*
- * Purpose: Compute the memb_next[] values of the file based on the
- * file's member map and the member starting addresses.
+ * Purpose: Compute the memb_next[] values of the file based on the
+ * file's member map and the member starting addresses.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
*-------------------------------------------------------------------------
@@ -1902,36 +1901,36 @@ compute_next(H5FD_multi_t *file)
H5Eclear2(H5E_DEFAULT);
ALL_MEMBERS(mt) {
- file->memb_next[mt] = HADDR_UNDEF;
+ file->memb_next[mt] = HADDR_UNDEF;
} END_MEMBERS;
UNIQUE_MEMBERS(file->fa.memb_map, mt1) {
- UNIQUE_MEMBERS2(file->fa.memb_map, mt2) {
- if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] &&
- (HADDR_UNDEF==file->memb_next[mt1] ||
- file->memb_next[mt1]>file->fa.memb_addr[mt2])) {
- file->memb_next[mt1] = file->fa.memb_addr[mt2];
- }
- } END_MEMBERS;
- if (HADDR_UNDEF==file->memb_next[mt1]) {
- file->memb_next[mt1] = HADDR_MAX; /*last member*/
- }
+ UNIQUE_MEMBERS2(file->fa.memb_map, mt2) {
+ if (file->fa.memb_addr[mt1]<file->fa.memb_addr[mt2] &&
+ (HADDR_UNDEF==file->memb_next[mt1] ||
+ file->memb_next[mt1]>file->fa.memb_addr[mt2])) {
+ file->memb_next[mt1] = file->fa.memb_addr[mt2];
+ }
+ } END_MEMBERS;
+ if (HADDR_UNDEF==file->memb_next[mt1]) {
+ file->memb_next[mt1] = HADDR_MAX; /*last member*/
+ }
} END_MEMBERS;
return 0;
}
-
+
/*-------------------------------------------------------------------------
- * Function: open_members
+ * Function: open_members
*
- * Purpose: Opens all members which are not opened yet.
+ * Purpose: Opens all members which are not opened yet.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, August 23, 1999
*
*-------------------------------------------------------------------------
@@ -1942,7 +1941,7 @@ compute_next(H5FD_multi_t *file)
* tmp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
open_members(H5FD_multi_t *file)
{
@@ -1976,9 +1975,9 @@ open_members(H5FD_multi_t *file)
return 0;
}
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
#ifdef _H5private_H
/*
* This is not related to the functionality of the driver code.
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index c5d1be1..dcca0f6 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -22,13 +22,13 @@
#include "H5FDpublic.h"
/* Private headers needed by this file */
-#include "H5Pprivate.h" /* Property lists */
+#include "H5Pprivate.h" /* Property lists */
/*
* The MPI drivers are needed because there are
* places where we check for things that aren't handled by these drivers.
*/
-#include "H5FDmpi.h" /* MPI-based file drivers */
+#include "H5FDmpi.h" /* MPI-based file drivers */
/**************************/
@@ -75,16 +75,16 @@ typedef struct {
/* Define default file image info */
#define H5FD_DEFAULT_FILE_IMAGE_INFO { \
- /* file image buffer */ NULL, \
- /* buffer size */ 0, \
+ NULL, /* file image buffer */ \
+ 0, /* buffer size */ \
{ /* Callbacks */ \
- /* image_malloc */ NULL, \
- /* image_memcpy */ NULL, \
- /* image_realloc */ NULL, \
- /* image_free */ NULL, \
- /* udata_copy */ NULL, \
- /* udata_free */ NULL, \
- /* udata */ NULL, \
+ NULL, /* image_malloc */ \
+ NULL, /* image_memcpy */ \
+ NULL, /* image_realloc */ \
+ NULL, /* image_free */ \
+ NULL, /* udata_copy */ \
+ NULL, /* udata_free */ \
+ NULL, /* udata */ \
} \
}
@@ -117,7 +117,7 @@ H5_DLL void *H5FD_fapl_get(H5FD_t *file);
H5_DLL herr_t H5FD_free_driver_info(hid_t driver_id, const void *driver_info);
H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref);
H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id,
- haddr_t maxaddr);
+ haddr_t maxaddr);
H5_DLL herr_t H5FD_close(H5FD_t *file);
H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/);
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 51233a0..62263f2 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -2277,7 +2277,7 @@ H5FS__sect_assert(const H5FS_t *fspace)
*
* Return: TRUE/FALSE/FAIL
*
- * Programmer: Vailin Choi
+ * Programmer: Vailin Choi
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 6e80f4b..a370cee 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -246,6 +246,7 @@ typedef struct H5F_t H5F_t;
(p) += 8; \
}
+/* clang-format off */
/* Address-related macros */
#define H5F_addr_overflow(X,Z) (HADDR_UNDEF==(X) || \
HADDR_UNDEF==(X)+(haddr_t)(Z) || \
@@ -274,6 +275,7 @@ typedef struct H5F_t H5F_t;
#define H5F_addr_pow2(N) ((haddr_t)1<<(N))
#define H5F_addr_overlap(O1,L1,O2,L2) (((O1) < (O2) && ((O1) + (L1)) > (O2)) || \
((O1) >= (O2) && (O1) < ((O2) + (L2))))
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5F_MODULE
@@ -467,9 +469,11 @@ typedef struct H5F_t H5F_t;
#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */
#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
-#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */
+/* Number of shared object header message indexes */
+#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes"
#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */
-#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */
+/* Minimum size of messages in each index */
+#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize"
#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 9289ab5..4dd3c88 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -47,7 +47,7 @@
/* Size of a symbol table node on disk */
#define H5G_NODE_SIZE(f) ( \
/* General metadata fields */ \
- H5_SIZEOF_MAGIC \
+ H5_SIZEOF_MAGIC /*magic number */ \
+ 1 /* Version */ \
+ 1 /* Reserved */ \
+ 2 /* Number of symbols */ \
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 96e695d..09b2dd3 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -61,6 +61,7 @@
/* Definitions for link info settings */
#define H5G_CRT_LINK_INFO_NAME "link info"
#define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t)
+/* clang-format off */
#define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_TRACK_CORDER, \
H5G_CRT_LINFO_INDEX_CORDER, \
H5G_CRT_LINFO_MAX_CORDER, \
@@ -69,6 +70,7 @@
H5G_CRT_LINFO_LINK_FHEAP_ADDR, \
H5G_CRT_LINFO_NAME_BT2_ADDR \
}
+/* clang-format on */
/* Defaults for group info values */
#define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0
@@ -82,6 +84,7 @@
/* Definitions for group info settings */
#define H5G_CRT_GROUP_INFO_NAME "group info"
#define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t)
+/* clang-format off */
#define H5G_CRT_GROUP_INFO_DEF {H5G_CRT_GINFO_LHEAP_SIZE_HINT, \
H5G_CRT_GINFO_STORE_LINK_PHASE_CHANGE, \
H5G_CRT_GINFO_MAX_COMPACT, \
@@ -90,6 +93,7 @@
H5G_CRT_GINFO_EST_NUM_ENTRIES, \
H5G_CRT_GINFO_EST_NAME_LEN \
}
+/* clang-format on */
/* If the module using this macro is allowed access to the private variables, access them directly */
#ifdef H5G_MODULE
diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h
index df842f3..1e096ef 100644
--- a/src/H5Lprivate.h
+++ b/src/H5Lprivate.h
@@ -22,8 +22,8 @@
#include "H5Lpublic.h"
/* Private headers needed by this file */
-#include "H5Gprivate.h" /* Groups */
-#include "H5Oprivate.h" /* Object headers */
+#include "H5Gprivate.h" /* Groups */
+#include "H5Oprivate.h" /* Object headers */
/**************************/
@@ -37,11 +37,16 @@
#define H5L_CRT_INTERMEDIATE_GROUP_NAME "intermediate_group" /* Create intermediate groups flag */
/* ======== Link access property names ======== */
-#define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */
-#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */
-#define H5L_ACS_ELINK_FAPL_NAME "external link fapl" /* file access property list for external link access */
-#define H5L_ACS_ELINK_FLAGS_NAME "external link flags" /* file access flags for external link traversal */
-#define H5L_ACS_ELINK_CB_NAME "external link callback" /* callback function for external link traversal */
+/* Number of soft links to traverse */
+#define H5L_ACS_NLINKS_NAME "max soft links"
+/* External link prefix */
+#define H5L_ACS_ELINK_PREFIX_NAME "external link prefix"
+/* file access property list for external link access */
+#define H5L_ACS_ELINK_FAPL_NAME "external link fapl"
+/* file access flags for external link traversal */
+#define H5L_ACS_ELINK_FLAGS_NAME "external link flags"
+/* callback function for external link traversal */
+#define H5L_ACS_ELINK_CB_NAME "external link callback"
/****************************/
diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h
index 861fafc..62a0b3e 100644
--- a/src/H5Lpublic.h
+++ b/src/H5Lpublic.h
@@ -25,10 +25,10 @@
#define _H5Lpublic_H
/* Public headers needed by this file */
-#include "H5public.h" /* Generic Functions */
-#include "H5Ipublic.h" /* IDs */
-#include "H5Opublic.h" /* Object Headers */
-#include "H5Tpublic.h" /* Datatypes */
+#include "H5public.h" /* Generic Functions */
+#include "H5Ipublic.h" /* IDs */
+#include "H5Opublic.h" /* Object Headers */
+#include "H5Tpublic.h" /* Datatypes */
/*****************/
/* Public Macros */
@@ -65,10 +65,12 @@ typedef enum {
H5L_TYPE_HARD = 0, /* Hard link id */
H5L_TYPE_SOFT = 1, /* Soft link id */
H5L_TYPE_EXTERNAL = 64, /* External link id */
- H5L_TYPE_MAX = 255 /* Maximum link type id */
+ H5L_TYPE_MAX = 255 /* Maximum link type id */
} H5L_type_t;
-#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT /* Maximum value link value for "built-in" link types */
-#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL /* Link ids at or above this value are "user-defined" link types. */
+/* Maximum value link value for "built-in" link types */
+#define H5L_TYPE_BUILTIN_MAX H5L_TYPE_SOFT
+/* Link ids at or above this value are "user-defined" link types. */
+#define H5L_TYPE_UD_MIN H5L_TYPE_EXTERNAL
/* Information struct for link (for H5Lget_info2/H5Lget_info_by_idx2)
* H5O_token_t version used in VOL layer and future public API calls
diff --git a/src/H5MF.c b/src/H5MF.c
index aa65db2..0997834 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -1553,11 +1553,11 @@ HDfprintf(stderr, "%s: Entering\n", FUNC);
if(H5F_PAGED_AGGR(f)) {
if((ret_value = H5MF__close_pagefs(f)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close free-space managers for 'page' file space")
- } /* end if */
+ }
else {
if((ret_value = H5MF__close_aggrfs(f)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't close free-space managers for 'aggr' file space")
- } /* end else */
+ }
done:
#ifdef H5MF_ALLOC_DEBUG
@@ -3047,7 +3047,7 @@ done:
* 3) Reduce the EOA to the extent possible, and make note
* of the resulting value. This value will be stored
* in the fsinfo superblock extension message and be used
- * in the subsequent file open.
+ * in the subsequent file open.
*
* 4) Re-allocate space for any free space manager(s) that:
*
diff --git a/src/H5MFpkg.h b/src/H5MFpkg.h
index 7d72658..ef03f48 100644
--- a/src/H5MFpkg.h
+++ b/src/H5MFpkg.h
@@ -30,7 +30,7 @@
#include "H5MFprivate.h"
/* Other private headers needed by this file */
-#include "H5FSprivate.h" /* File free space */
+#include "H5FSprivate.h" /* File free space */
/**************************/
@@ -51,9 +51,12 @@
/* Free-space section types for file */
/* (values stored in free space data structures in file) */
-#define H5MF_FSPACE_SECT_SIMPLE 0 /* For non-paged aggregation: section is a range of actual bytes in file */
-#define H5MF_FSPACE_SECT_SMALL 1 /* For paged aggregation: "small" meta/raw data section which is < fsp_size) */
-#define H5MF_FSPACE_SECT_LARGE 2 /* For paged aggregation: "large" Section which is >= fsp_size) */
+/* For non-paged aggregation: section is a range of actual bytes in file */
+#define H5MF_FSPACE_SECT_SIMPLE 0
+/* For paged aggregation: "small" meta/raw data section which is < fsp_size) */
+#define H5MF_FSPACE_SECT_SMALL 1
+/* For paged aggregation: "large" Section which is >= fsp_size) */
+#define H5MF_FSPACE_SECT_LARGE 2
/* Get section class type based on size */
#define H5MF_SECT_CLASS_TYPE(F, S) \
@@ -155,7 +158,7 @@ typedef struct H5MF_fs_t {
H5F_fs_state_t *fs_state;
haddr_t *fs_addr;
H5FS_t **fs_man;
- hsize_t align_thres; /* Threshold for alignment */
+ hsize_t align_thres; /* Threshold for alignment */
hsize_t alignment; /* Alignment */
} H5MF_fs_t;
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index a795957..d6b9f7a 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -13,7 +13,7 @@
/*-------------------------------------------------------------------------
*
- * Created: H5Oattribute.c
+ * Created: H5Oattribute.c
*
* Purpose: Object header attribute routines.
*
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index aca0d59..b37fde5 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -13,7 +13,7 @@
/*-------------------------------------------------------------------------
*
- * Purpose: Deprecated functions from the H5O interface. These
+ * Purpose: Deprecated functions from the H5O interface. These
* functions are here for compatibility purposes and may be
* removed in the future. Applications should switch to the
* newer APIs.
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 846bbf3..09a8210 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -11,10 +11,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke
- * Friday, July 24, 1998
+/* Programmer: Robb Matzke
+ * Friday, July 24, 1998
*
- * Purpose: The object modification time message.
+ * Purpose: The object modification time message.
*/
#include "H5Omodule.h" /* This source code file is part of the H5O module */
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 5650d10..4a1d997 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -12,8 +12,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke
- * Wednesday, April 15, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, April 15, 1998
*
* Purpose: Data filter pipeline message.
*/
diff --git a/src/H5PLint.c b/src/H5PLint.c
index b69a788..7e8ad89 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -77,7 +77,7 @@ static unsigned int H5PL_plugin_control_mask_g = H5PL_ALL_PLUGIN;
static hbool_t H5PL_allow_plugins_g = TRUE;
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__get_plugin_control_mask
*
@@ -104,7 +104,7 @@ H5PL__get_plugin_control_mask(unsigned int *mask /*out*/)
} /* end H5PL__get_plugin_control_mask() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__set_plugin_control_mask
*
@@ -133,7 +133,7 @@ H5PL__set_plugin_control_mask(unsigned int mask)
} /* end H5PL__set_plugin_control_mask() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__init_package
*
@@ -174,7 +174,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__init_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL_term_package
*
@@ -219,7 +219,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_term_package() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL_load
*
@@ -281,7 +281,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL_load() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__open
*
@@ -304,7 +304,7 @@ done:
* get_plugin_info function pointer, but early (4.4.7, at least) gcc
* only allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(pedantic)
+H5_GCC_DIAG_OFF("pedantic")
herr_t
H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key,
hbool_t *success, const void **plugin_info)
@@ -416,9 +416,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__open() */
-H5_GCC_DIAG_ON(pedantic)
+H5_GCC_DIAG_ON("pedantic")
+
-
/*-------------------------------------------------------------------------
* Function: H5PL__close
*
diff --git a/src/H5PLplugin_cache.c b/src/H5PLplugin_cache.c
index c58828f..5a8b595 100644
--- a/src/H5PLplugin_cache.c
+++ b/src/H5PLplugin_cache.c
@@ -93,7 +93,7 @@ static unsigned int H5PL_num_plugins_g = 0;
static unsigned int H5PL_cache_capacity_g = 0;
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__create_plugin_cache
*
@@ -130,7 +130,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__create_plugin_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__close_plugin_cache
*
@@ -170,7 +170,7 @@ H5PL__close_plugin_cache(hbool_t *already_closed /*out*/)
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__close_plugin_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__expand_cache
*
@@ -205,7 +205,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__expand_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__add_plugin
*
@@ -238,7 +238,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__add_plugin() */
-
+
/*-------------------------------------------------------------------------
* Function: H5PL__find_plugin_in_cache
*
@@ -253,7 +253,7 @@ done:
/* See the other use of H5PL_GET_LIB_FUNC() for an explanation
* for why we disable -Wpedantic here.
*/
-H5_GCC_DIAG_OFF(pedantic)
+H5_GCC_DIAG_OFF("pedantic")
herr_t
H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *found, const void **plugin_info)
{
@@ -302,5 +302,5 @@ H5PL__find_plugin_in_cache(const H5PL_search_params_t *search_params, hbool_t *f
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__find_plugin_in_cache() */
-H5_GCC_DIAG_ON(pedantic)
+H5_GCC_DIAG_ON("pedantic")
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c
index 6dae5ed..c3cb81d 100644
--- a/src/H5Pdapl.c
+++ b/src/H5Pdapl.c
@@ -37,7 +37,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* Files */
#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5Ppkg.h" /* Property lists */
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 8b10971..35a5569 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -332,7 +332,7 @@ static int
H5P__encode_cb(H5P_genprop_t *prop, void *_udata)
{
H5P_enc_iter_ud_t *udata = (H5P_enc_iter_ud_t *)_udata; /* Pointer to user data */
- int ret_value = H5_ITER_CONT; /* Return value */
+ int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index caf81cb..ea8d756 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -242,7 +242,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5T_get_member_type
*
- * Purpose: Returns a copy of the data type of the specified member.
+ * Purpose: Returns a copy of the data type of the specified member.
*
* Return: Success: A copy of the member datatype;
* modifying the returned datatype does not
@@ -582,7 +582,7 @@ H5T__pack(const H5T_t *dt)
for(i = 0, offset = 0; i < dt->shared->u.compnd.nmembs; i++) {
dt->shared->u.compnd.memb[i].offset = offset;
offset += dt->shared->u.compnd.memb[i].size;
- } /* end for */
+ }
/* Change total size */
dt->shared->size = MAX(1, offset);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 95c83f9..6dae0b4 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Module Info: Datatype conversions for the H5T interface.
+ * Module Info: Datatype conversions for the H5T interface.
*/
/****************/
@@ -25,15 +25,15 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Dprivate.h" /* Datasets */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free Lists */
-#include "H5Iprivate.h" /* IDs */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Dprivate.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free Lists */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5Tpkg.h" /* Datatypes */
/****************/
@@ -56,57 +56,57 @@
* source value has a magnitude that cannot be represented by the destination
* type.
*
- * Suffix Description
- * ------ -----------
- * sS: Signed integers to signed integers where the destination is
- * at least as wide as the source. This case cannot generate
- * overflows.
+ * Suffix Description
+ * ------ -----------
+ * sS: Signed integers to signed integers where the destination is
+ * at least as wide as the source. This case cannot generate
+ * overflows.
*
- * sU: Signed integers to unsigned integers where the destination is
- * at least as wide as the source. This case experiences
- * overflows when the source value is negative.
+ * sU: Signed integers to unsigned integers where the destination is
+ * at least as wide as the source. This case experiences
+ * overflows when the source value is negative.
*
- * uS: Unsigned integers to signed integers where the destination is
- * at least as wide as the source. This case can experience
- * overflows when the source and destination are the same size.
+ * uS: Unsigned integers to signed integers where the destination is
+ * at least as wide as the source. This case can experience
+ * overflows when the source and destination are the same size.
*
- * uU: Unsigned integers to unsigned integers where the destination
- * is at least as wide as the source. Overflows are not
- * possible in this case.
+ * uU: Unsigned integers to unsigned integers where the destination
+ * is at least as wide as the source. Overflows are not
+ * possible in this case.
*
- * Ss: Signed integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ss: Signed integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
- * Su: Signed integers to unsigned integers where the source is at
- * least as large as the destination. Overflows occur when the
- * source value is negative and can also occur if the
- * destination is narrower than the source.
+ * Su: Signed integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows occur when the
+ * source value is negative and can also occur if the
+ * destination is narrower than the source.
*
- * Us: Unsigned integers to signed integers where the source is at
- * least as large as the destination. Overflows can occur for
- * all sizes.
+ * Us: Unsigned integers to signed integers where the source is at
+ * least as large as the destination. Overflows can occur for
+ * all sizes.
*
- * Uu: Unsigned integers to unsigned integers where the source is at
- * least as large as the destination. Overflows can occur if the
- * destination is narrower than the source.
+ * Uu: Unsigned integers to unsigned integers where the source is at
+ * least as large as the destination. Overflows can occur if the
+ * destination is narrower than the source.
*
- * su: Conversion from signed integers to unsigned integers where
- * the source and destination are the same size. Overflow occurs
- * when the source value is negative.
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
*
- * us: Conversion from unsigned integers to signed integers where
- * the source and destination are the same size. Overflow
- * occurs when the source magnitude is too large for the
- * destination.
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
*
- * fF: Floating-point values to floating-point values where the
- * destination is at least as wide as the source. This case
+ * fF: Floating-point values to floating-point values where the
+ * destination is at least as wide as the source. This case
* cannot generate overflows.
*
- * Ff: Floating-point values to floating-point values the source is at
- * least as large as the destination. Overflows can occur when
- * the destination is narrower than the source.
+ * Ff: Floating-point values to floating-point values the source is at
+ * least as large as the destination. Overflows can occur when
+ * the destination is narrower than the source.
*
* xF: Integers to float-point(float or double) values where the destination
* is at least as wide as the source. This case cannot generate
@@ -118,29 +118,29 @@
*
* The macros take a subset of these arguments in the order listed here:
*
- * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
- * conversion function.
+ * CDATA: A pointer to the H5T_cdata_t structure that was passed to the
+ * conversion function.
*
- * STYPE: The hid_t value for the source datatype.
+ * STYPE: The hid_t value for the source datatype.
*
- * DTYPE: The hid_t value for the destination datatype.
+ * DTYPE: The hid_t value for the destination datatype.
*
- * BUF: A pointer to the conversion buffer.
+ * BUF: A pointer to the conversion buffer.
*
- * NELMTS: The number of values to be converted.
+ * NELMTS: The number of values to be converted.
*
- * ST: The C name for source datatype (e.g., int)
+ * ST: The C name for source datatype (e.g., int)
*
- * DT: The C name for the destination datatype (e.g., signed char)
+ * DT: The C name for the destination datatype (e.g., signed char)
*
- * D_MIN: The minimum possible destination value. For unsigned
- * destination types this should be zero. For signed
- * destination types it's a negative value with a magnitude that
- * is usually one greater than D_MAX. Source values which are
- * smaller than D_MIN generate overflows.
+ * D_MIN: The minimum possible destination value. For unsigned
+ * destination types this should be zero. For signed
+ * destination types it's a negative value with a magnitude that
+ * is usually one greater than D_MAX. Source values which are
+ * smaller than D_MIN generate overflows.
*
- * D_MAX: The maximum possible destination value. Source values which
- * are larger than D_MAX generate overflows.
+ * D_MAX: The maximum possible destination value. Source values which
+ * are larger than D_MAX generate overflows.
*
* The macros are implemented with a generic programming technique, similar
* to templates in C++. The macro which defines the "core" part of the
@@ -155,25 +155,25 @@
*
* The generic "core" macros are: (others are specific to particular conversion)
*
- * Suffix Description
- * ------ -----------
- * xX: Generic Conversion where the destination is at least as
+ * Suffix Description
+ * ------ -----------
+ * xX: Generic Conversion where the destination is at least as
* wide as the source. This case cannot generate overflows.
*
- * Xx: Generic signed conversion where the source is at least as large
+ * Xx: Generic signed conversion where the source is at least as large
* as the destination. Overflows can occur when the destination is
* narrower than the source.
*
- * Ux: Generic conversion for the `Us', `Uu' & `us' cases
- * Overflow occurs when the source magnitude is too large for the
- * destination.
+ * Ux: Generic conversion for the `Us', `Uu' & `us' cases
+ * Overflow occurs when the source magnitude is too large for the
+ * destination.
*
*/
-#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xX_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
/* Added a condition branch(else if (*(S) == (DT)(D_MAX))) which seems redundant.
@@ -183,13 +183,13 @@
* equal. In this case, do not return exception but make sure the maximum is assigned
* to the destination. SLU - 2005/06/29
*/
-#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -198,69 +198,69 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Xx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
} else if (*(S) < (ST)(D_MIN)) { \
- *(D) = (DT)(D_MIN); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MIN); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ux_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) > (ST)(D_MAX)) { \
- *(D) = (DT)(D_MAX); \
- } else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sS(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if (*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_sU_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_sU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_sU, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -348,23 +348,23 @@
H5T_CONV(H5T_CONV_uS, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_uU(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Xx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -373,106 +373,106 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) < 0) \
- *(D) = 0; \
+ *(D) = 0; \
else if (sizeof(ST)>sizeof(DT) && *(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ux, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_LOW, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = 0; \
+ *(D) = 0; \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_su_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) < 0) \
- *(D) = 0; \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = 0; \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_su(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_su, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if (*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- /* Assumes memory format of unsigned & signed integers is same */ \
+#define H5T_CONV_us_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ /* Assumes memory format of unsigned & signed integers is same */ \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(D_MAX); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)==sizeof(DT)); \
+#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)==sizeof(DT)); \
H5T_CONV(H5T_CONV_us, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
-#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
+#define H5T_CONV_fF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)<=sizeof(DT)); \
H5T_CONV(H5T_CONV_xX, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
/* Same as H5T_CONV_Xx_CORE, except that instead of using D_MAX and D_MIN
* when an overflow occurs, use the 'float' infinity values.
*/
-#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -481,24 +481,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } else \
- *(D) = (DT)(*(S)); \
+ } else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Ff_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
+ *(D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
else if (*(S) < (ST)(D_MIN)) \
- *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
- else \
- *(D) = (DT)(*(S)); \
+ *(D) = (H5T_NATIVE_FLOAT_NEG_INF_g); \
+ else \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
- HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
+#define H5T_CONV_Ff(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+ HDcompile_assert(sizeof(ST)>=sizeof(DT)); \
H5T_CONV(H5T_CONV_Ff, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, N) \
}
@@ -561,35 +561,35 @@
LO = count; \
}
-#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- if (sprec > dprec) { \
+#define H5T_CONV_xF_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ if (sprec > dprec) { \
unsigned low_bit_pos, high_bit_pos; \
\
/* Detect high & low bits set in source */ \
H5T_HI_LO_BIT_SET(ST, *(S), low_bit_pos, high_bit_pos) \
\
/* Check for more bits of precision in src than available in dst */ \
- if((high_bit_pos - low_bit_pos) >= dprec) { \
+ if((high_bit_pos - low_bit_pos) >= dprec) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_PRECISION, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
- } \
+ *(D) = (DT)(*(S)); \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_xF_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_xF, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -601,13 +601,13 @@
* (ST)(D_MAX))) is for some compilers like Sun, HP, IBM, and SGI where under
* the same situation the "int" doesn't overflow. SLU - 2005/9/12
*/
-#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX) || (sprec < dprec && *(S) == (ST)(D_MAX))) { \
H5T_conv_ret_t except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, \
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -616,7 +616,7 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
@@ -625,24 +625,24 @@
src_id, dst_id, S, D, cb_struct.user_data); \
if(except_ret == H5T_CONV_UNHANDLED) \
/* Let compiler convert if case is ignored by user handler*/ \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
else if(except_ret == H5T_CONV_ABORT) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") \
/* if(except_ret==H5T_CONV_HANDLED): Fall through, user handled it */ \
- } \
+ } \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx_NOEX_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
if(*(S) > (ST)(D_MAX)) \
- *(D) = (DT)(D_MAX); \
+ *(D) = (DT)(D_MAX); \
else if(*(S) < (ST)(D_MIN)) \
- *(D) = (DT)(D_MIN); \
+ *(D) = (DT)(D_MIN); \
else \
- *(D) = (DT)(*(S)); \
+ *(D) = (DT)(*(S)); \
}
-#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
+#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
H5T_CONV(H5T_CONV_Fx, STYPE, DTYPE, ST, DT, D_MIN, D_MAX, Y) \
}
@@ -651,146 +651,146 @@
* to do them all.
*/
#ifndef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
- *(D) = (DT)(*(S)); \
+#define H5T_CONV_NO_EXCEPT_CORE(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) { \
+ *(D) = (DT)(*(S)); \
}
#endif /* H5_WANT_DCONV_EXCEPTION */
/* The main part of every integer hardware conversion macro */
-#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
+#define H5T_CONV(GUTS,STYPE,DTYPE,ST,DT,D_MIN,D_MAX,PREC) \
{ \
herr_t ret_value=SUCCEED; /* Return value */ \
\
FUNC_ENTER_PACKAGE \
\
{ \
- size_t elmtno; /*element number */ \
+ size_t elmtno; /*element number */ \
H5T_CONV_DECL_PREC(PREC) /*declare precision variables, or not */ \
- void *src_buf; /*'raw' source buffer */ \
- void *dst_buf; /*'raw' destination buffer */ \
- ST *src, *s; /*source buffer */ \
- DT *dst, *d; /*destination buffer */ \
- H5T_t *st, *dt; /*datatype descriptors */ \
- ST src_aligned; /*source aligned type */ \
- DT dst_aligned; /*destination aligned type */ \
- hbool_t s_mv, d_mv; /*move data to align it? */ \
- ssize_t s_stride, d_stride; /*src and dst strides */ \
+ void *src_buf; /*'raw' source buffer */ \
+ void *dst_buf; /*'raw' destination buffer */ \
+ ST *src, *s; /*source buffer */ \
+ DT *dst, *d; /*destination buffer */ \
+ H5T_t *st, *dt; /*datatype descriptors */ \
+ ST src_aligned; /*source aligned type */ \
+ DT dst_aligned; /*destination aligned type */ \
+ hbool_t s_mv, d_mv; /*move data to align it? */ \
+ ssize_t s_stride, d_stride; /*src and dst strides */ \
size_t safe; /*how many elements are safe to process in each pass */ \
H5T_conv_cb_t cb_struct; /*conversion callback structure */ \
\
- switch (cdata->command) { \
- case H5T_CONV_INIT: \
- /* Sanity check and initialize statistics */ \
- cdata->need_bkg = H5T_BKG_NO; \
+ switch (cdata->command) { \
+ case H5T_CONV_INIT: \
+ /* Sanity check and initialize statistics */ \
+ cdata->need_bkg = H5T_BKG_NO; \
if (NULL==(st=(H5T_t*)H5I_object(src_id)) || NULL==(dt=(H5T_t*)H5I_object(dst_id))) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "unable to dereference datatype object ID") \
- if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
- "disagreement about datatype size") \
- CI_ALLOC_PRIV \
- break; \
- \
- case H5T_CONV_FREE: \
- /* Print and free statistics */ \
- CI_PRINT_STATS(STYPE,DTYPE); \
- CI_FREE_PRIV \
- break; \
- \
- case H5T_CONV_CONV: \
- /* Initialize source & destination strides */ \
- if (buf_stride) { \
- HDassert(buf_stride >= sizeof(ST)); \
- HDassert(buf_stride >= sizeof(DT)); \
- s_stride = d_stride = (ssize_t)buf_stride; \
- } else { \
- s_stride = sizeof(ST); \
- d_stride = sizeof(DT); \
- } \
- \
- /* Is alignment required for source or dest? */ \
- s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
- (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
- d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
- ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
- /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
- (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
- CI_INC_SRC(s_mv) \
- CI_INC_DST(d_mv) \
- \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "unable to dereference datatype object ID") \
+ if (st->shared->size!=sizeof(ST) || dt->shared->size!=sizeof(DT)) \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, \
+ "disagreement about datatype size") \
+ CI_ALLOC_PRIV \
+ break; \
+ \
+ case H5T_CONV_FREE: \
+ /* Print and free statistics */ \
+ CI_PRINT_STATS(STYPE,DTYPE); \
+ CI_FREE_PRIV \
+ break; \
+ \
+ case H5T_CONV_CONV: \
+ /* Initialize source & destination strides */ \
+ if (buf_stride) { \
+ HDassert(buf_stride >= sizeof(ST)); \
+ HDassert(buf_stride >= sizeof(DT)); \
+ s_stride = d_stride = (ssize_t)buf_stride; \
+ } else { \
+ s_stride = sizeof(ST); \
+ d_stride = sizeof(DT); \
+ } \
+ \
+ /* Is alignment required for source or dest? */ \
+ s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((ST*)buf)!=(size_t)buf) || \
+ (size_t)s_stride%H5T_NATIVE_##STYPE##_ALIGN_g); \
+ d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \
+ ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \
+ /* Cray */ ((size_t)((DT*)buf)!=(size_t)buf) || \
+ (size_t)d_stride%H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ CI_INC_SRC(s_mv) \
+ CI_INC_DST(d_mv) \
+ \
/* Get conversion exception callback property */ \
if(H5CX_get_dt_conv_cb(&cb_struct) < 0) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to get conversion exception callback") \
\
- /* Get source and destination datatypes */ \
+ /* Get source and destination datatypes */ \
if(NULL == (st = (H5T_t *)H5I_object(src_id)) || NULL == (dt = (H5T_t *)H5I_object(dst_id))) \
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to dereference datatype object ID") \
- \
+ \
H5T_CONV_SET_PREC(PREC) /*init precision variables, or not */ \
\
/* The outer loop of the type conversion macro, controlling which */ \
- /* direction the buffer is walked */ \
- while (nelmts>0) { \
- /* Check if we need to go backwards through the buffer */ \
- if(d_stride>s_stride) { \
+ /* direction the buffer is walked */ \
+ while (nelmts>0) { \
+ /* Check if we need to go backwards through the buffer */ \
+ if(d_stride>s_stride) { \
/* Compute the number of "safe" destination elements at */ \
/* the end of the buffer (Those which don't overlap with */ \
/* any source elements at the beginning of the buffer) */ \
safe = nelmts - (((nelmts * (size_t)s_stride) + (size_t)(d_stride - 1)) / (size_t)d_stride); \
- \
+ \
/* If we're down to the last few elements, just wrap up */ \
- /* with a "real" reverse copy */ \
- if(safe<2) { \
+ /* with a "real" reverse copy */ \
+ if(safe<2) { \
src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)s_stride)); \
dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - 1) * (size_t)d_stride)); \
- s_stride = -s_stride; \
- d_stride = -d_stride; \
- \
- safe=nelmts; \
- } /* end if */ \
- else { \
+ s_stride = -s_stride; \
+ d_stride = -d_stride; \
+ \
+ safe=nelmts; \
+ } /* end if */ \
+ else { \
src = (ST *)(src_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)s_stride)); \
dst = (DT *)(dst_buf = (void *)((uint8_t *)buf + (nelmts - safe) * (size_t)d_stride)); \
- } /* end else */ \
- } /* end if */ \
- else { \
- /* Single forward pass over all data */ \
- src = (ST *)(src_buf = buf); \
- dst = (DT *)(dst_buf = buf); \
- safe=nelmts; \
- } /* end else */ \
+ } /* end else */ \
+ } /* end if */ \
+ else { \
+ /* Single forward pass over all data */ \
+ src = (ST *)(src_buf = buf); \
+ dst = (DT *)(dst_buf = buf); \
+ safe=nelmts; \
+ } /* end else */ \
\
- /* Perform loop over elements to convert */ \
- if (s_mv && d_mv) { \
- /* Alignment is required for both source and dest */ \
- s = &src_aligned; \
+ /* Perform loop over elements to convert */ \
+ if (s_mv && d_mv) { \
+ /* Alignment is required for both source and dest */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DALIGN,POST_SALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,s,d,ST,DT,D_MIN,D_MAX) \
- } else if(s_mv) { \
- /* Alignment is required only for source */ \
- s = &src_aligned; \
+ } else if(s_mv) { \
+ /* Alignment is required only for source */ \
+ s = &src_aligned; \
H5T_CONV_LOOP_OUTER(PRE_SALIGN,PRE_DNOALIGN,POST_SALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,s,dst,ST,DT,D_MIN,D_MAX) \
- } else if(d_mv) { \
- /* Alignment is required only for destination */ \
+ } else if(d_mv) { \
+ /* Alignment is required only for destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DALIGN,POST_SNOALIGN,POST_DALIGN,GUTS,STYPE,DTYPE,src,d,ST,DT,D_MIN,D_MAX) \
- } else { \
+ } else { \
/* Alignment is not required for both source and destination */ \
H5T_CONV_LOOP_OUTER(PRE_SNOALIGN,PRE_DNOALIGN,POST_SNOALIGN,POST_DNOALIGN,GUTS,STYPE,DTYPE,src,dst,ST,DT,D_MIN,D_MAX) \
- } \
- \
- /* Decrement number of elements left to convert */ \
- nelmts-=safe; \
- } /* end while */ \
- break; \
- \
- default: \
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
- "unknown conversion command"); \
- } \
+ } \
+ \
+ /* Decrement number of elements left to convert */ \
+ nelmts-=safe; \
+ } /* end while */ \
+ break; \
+ \
+ default: \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
} \
- \
+ \
done: \
FUNC_LEAVE_NOAPI(ret_value) \
}
@@ -799,9 +799,9 @@ done: \
#define H5T_CONV_DECL_PREC(PREC) H5_GLUE(H5T_CONV_DECL_PREC_, PREC)
#define H5T_CONV_DECL_PREC_Y \
- size_t sprec; /*source precision */ \
- size_t dprec; /*destination precision */ \
- H5T_class_t tclass; /*datatype's class */
+ size_t sprec; /*source precision */ \
+ size_t dprec; /*destination precision */ \
+ H5T_class_t tclass; /*datatype's class */
#define H5T_CONV_DECL_PREC_N /*no precision variables */
@@ -809,60 +809,60 @@ done: \
#define H5T_CONV_SET_PREC(PREC) H5_GLUE(H5T_CONV_SET_PREC_, PREC)
#define H5T_CONV_SET_PREC_Y \
- /* Get source & destination precisions into a variable */ \
- tclass = st->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- sprec = st->shared->u.atomic.prec; \
- else \
- sprec = 1 + st->shared->u.atomic.u.f.msize; \
- tclass = dt->shared->type; \
- HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
- if(tclass == H5T_INTEGER) \
- dprec = dt->shared->u.atomic.prec; \
- else \
+ /* Get source & destination precisions into a variable */ \
+ tclass = st->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ sprec = st->shared->u.atomic.prec; \
+ else \
+ sprec = 1 + st->shared->u.atomic.u.f.msize; \
+ tclass = dt->shared->type; \
+ HDassert(tclass == H5T_INTEGER || tclass == H5T_FLOAT); \
+ if(tclass == H5T_INTEGER) \
+ dprec = dt->shared->u.atomic.prec; \
+ else \
dprec = 1 + dt->shared->u.atomic.u.f.msize;
#define H5T_CONV_SET_PREC_N /*don't init precision variables */
/* Macro defining action on source data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
- H5MM_memcpy(&src_aligned, src, sizeof(ST)); \
+#define H5T_CONV_LOOP_PRE_SALIGN(ST) { \
+ H5MM_memcpy(&src_aligned, src, sizeof(ST)); \
}
/* Macro defining action on source data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_PRE_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
- d = &dst_aligned; \
+#define H5T_CONV_LOOP_PRE_DALIGN(DT) { \
+ d = &dst_aligned; \
}
/* Macro defining action on destination data which doesn't need to be aligned (before main action) */
-#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_PRE_DNOALIGN(DT) { \
}
/* Macro defining action on source data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SALIGN(ST) { \
}
/* Macro defining action on source data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
+#define H5T_CONV_LOOP_POST_SNOALIGN(ST) { \
}
/* Macro defining action on destination data which needs to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
- H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \
+#define H5T_CONV_LOOP_POST_DALIGN(DT) { \
+ H5MM_memcpy(dst, &dst_aligned, sizeof(DT)); \
}
/* Macro defining action on destination data which doesn't need to be aligned (after main action) */
-#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
+#define H5T_CONV_LOOP_POST_DNOALIGN(DT) { \
}
/* The outer wrapper for the type conversion loop, to check for an exception handling routine */
#define H5T_CONV_LOOP_OUTER(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- if(cb_struct.func) { \
+ if(cb_struct.func) { \
H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
} \
else { \
@@ -871,36 +871,36 @@ done: \
/* The inner loop of the type conversion macro, actually converting the elements */
#define H5T_CONV_LOOP(PRE_SALIGN_GUTS,PRE_DALIGN_GUTS,POST_SALIGN_GUTS,POST_DALIGN_GUTS,GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- for (elmtno=0; elmtno<safe; elmtno++) { \
- /* Handle source pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
+ for (elmtno=0; elmtno<safe; elmtno++) { \
+ /* Handle source pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_SALIGN_GUTS)(ST) \
\
- /* Handle destination pre-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
+ /* Handle destination pre-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,PRE_DALIGN_GUTS)(DT) \
\
- /* ... user-defined stuff here -- the conversion ... */ \
- H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
+ H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
\
- /* Handle source post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
+ /* Handle source post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_SALIGN_GUTS)(ST) \
\
- /* Handle destination post-alignment */ \
- H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
+ /* Handle destination post-alignment */ \
+ H5_GLUE(H5T_CONV_LOOP_,POST_DALIGN_GUTS)(DT) \
\
- /* Advance pointers */ \
- src_buf = (void *)((uint8_t *)src_buf + s_stride); \
- src = (ST *)src_buf; \
- dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \
- dst = (DT *)dst_buf; \
+ /* Advance pointers */ \
+ src_buf = (void *)((uint8_t *)src_buf + s_stride); \
+ src = (ST *)src_buf; \
+ dst_buf = (void *)((uint8_t *)dst_buf + d_stride); \
+ dst = (DT *)dst_buf; \
}
/* Macro to call the actual "guts" of the type conversion, or call the "no exception" guts */
#ifdef H5_WANT_DCONV_EXCEPTION
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
- /* ... user-defined stuff here -- the conversion ... */ \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+ /* ... user-defined stuff here -- the conversion ... */ \
H5_GLUE(GUTS,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#else /* H5_WANT_DCONV_EXCEPTION */
-#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
+#define H5T_CONV_LOOP_GUTS(GUTS,STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX) \
H5_GLUE(H5T_CONV_NO_EXCEPT,_CORE)(STYPE,DTYPE,S,D,ST,DT,D_MIN,D_MAX)
#endif /* H5_WANT_DCONV_EXCEPTION */
@@ -908,27 +908,27 @@ done: \
#ifdef H5T_DEBUG
/* Print alignment statistics */
-# define CI_PRINT_STATS(STYPE,DTYPE) { \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu src elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
- (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
- } \
- if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
- HDfprintf(H5DEBUG(T), \
- " %Hu dst elements aligned on %lu-byte boundaries\n", \
- ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
- (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
- } \
+# define CI_PRINT_STATS(STYPE,DTYPE) { \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->s_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu src elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->s_aligned, \
+ (unsigned long)H5T_NATIVE_##STYPE##_ALIGN_g); \
+ } \
+ if (H5DEBUG(T) && ((H5T_conv_hw_t *)cdata->priv)->d_aligned) { \
+ HDfprintf(H5DEBUG(T), \
+ " %Hu dst elements aligned on %lu-byte boundaries\n", \
+ ((H5T_conv_hw_t *)cdata->priv)->d_aligned, \
+ (unsigned long)H5T_NATIVE_##DTYPE##_ALIGN_g); \
+ } \
}
/* Allocate private alignment structure for atomic types */
# define CI_ALLOC_PRIV \
- if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
- "memory allocation failed"); \
- }
+ if (NULL==(cdata->priv=H5MM_calloc(sizeof(H5T_conv_hw_t)))) { \
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, \
+ "memory allocation failed"); \
+ }
/* Free private alignment structure for atomic types */
# define CI_FREE_PRIV \
@@ -960,25 +960,25 @@ done: \
/* Conversion data for H5T__conv_struct() */
typedef struct H5T_conv_struct_t {
- int *src2dst; /*mapping from src to dst member num */
- hid_t *src_memb_id; /*source member type ID's */
- hid_t *dst_memb_id; /*destination member type ID's */
- H5T_path_t **memb_path; /*conversion path for each member */
+ int *src2dst; /*mapping from src to dst member num */
+ hid_t *src_memb_id; /*source member type ID's */
+ hid_t *dst_memb_id; /*destination member type ID's */
+ H5T_path_t **memb_path; /*conversion path for each member */
H5T_subset_info_t subset_info; /*info related to compound subsets */
unsigned src_nmembs; /*needed by free function */
} H5T_conv_struct_t;
/* Conversion data for H5T__conv_enum() */
typedef struct H5T_enum_struct_t {
- int base; /*lowest `in' value */
- unsigned length; /*num elements in arrays */
- int *src2dst; /*map from src to dst index */
+ int base; /*lowest `in' value */
+ unsigned length; /*num elements in arrays */
+ int *src2dst; /*map from src to dst index */
} H5T_enum_struct_t;
/* Conversion data for the hardware conversion functions */
typedef struct H5T_conv_hw_t {
- size_t s_aligned; /*number source elements aligned */
- size_t d_aligned; /*number destination elements aligned*/
+ size_t s_aligned; /*number source elements aligned */
+ size_t d_aligned; /*number destination elements aligned*/
} H5T_conv_hw_t;
/********************/
@@ -992,7 +992,7 @@ typedef struct H5T_conv_hw_t {
static herr_t H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order);
-
+
/*********************/
/* Public Variables */
/*********************/
@@ -1021,17 +1021,17 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
/* Declare a free list to manage pieces of reference data */
H5FL_BLK_DEFINE_STATIC(ref_seq);
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_noop
+ * Function: H5T__conv_noop
*
- * Purpose: The no-op conversion. The library knows about this
- * conversion without it being registered.
+ * Purpose: The no-op conversion. The library knows about this
+ * conversion without it being registered.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, January 14, 1998
*
*-------------------------------------------------------------------------
*/
@@ -1065,20 +1065,20 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_noop() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order_opt
+ * Function: H5T__conv_order_opt
*
- * Purpose: Convert one type to another when byte order is the only
- * difference. This is the optimized version of H5T__conv_order()
+ * Purpose: Convert one type to another when byte order is the only
+ * difference. This is the optimized version of H5T__conv_order()
* for a handful of different sizes.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, January 25, 2002
+ * Programmer: Robb Matzke
+ * Friday, January 25, 2002
*
*-------------------------------------------------------------------------
*/
@@ -1088,9 +1088,9 @@ H5T__conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
size_t i;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1480,30 +1480,30 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T__conv_order
+ * Function: H5T__conv_order
*
- * Purpose: Convert one type to another when byte order is the only
- * difference.
+ * Purpose: Convert one type to another when byte order is the only
+ * difference.
*
- * Note: This is a soft conversion function.
+ * Note: This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, January 13, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, January 13, 1998
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL;
- H5T_t *dst = NULL;
- size_t i;
- size_t j, md;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL;
+ H5T_t *dst = NULL;
+ size_t i;
+ size_t j, md;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -1580,34 +1580,34 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_order() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_b_b
+ * Function: H5T__conv_b_b
*
- * Purpose: Convert from one bitfield to any other bitfield.
+ * Purpose: Convert from one bitfield to any other bitfield.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, May 20, 1999
+ * Programmer: Robb Matzke
+ * Thursday, May 20, 1999
*
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *background)
{
- uint8_t *buf = (uint8_t*)_buf;
- H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
- ssize_t direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t half_size; /*1/2 of total size for swapping*/
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
- size_t msb_pad_offset; /*offset for dest MSB padding */
- size_t i;
+ uint8_t *buf = (uint8_t*)_buf;
+ H5T_t *src = NULL, *dst = NULL; /*source and dest datatypes */
+ ssize_t direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t half_size; /*1/2 of total size for swapping*/
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[256]; /*temp destination buffer */
+ size_t msb_pad_offset; /*offset for dest MSB padding */
+ size_t i;
uint8_t *src_rev=NULL; /*order-reversed source buffer */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -1822,17 +1822,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_b_b() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_free
+ * Function: H5T__conv_struct_free
*
- * Purpose: Free the private data structure used by the compound
+ * Purpose: Free the private data structure used by the compound
* conversion functions.
*
- * Return: The result of H5MM_xfree(priv) (NULL)
+ * Return: The result of H5MM_xfree(priv) (NULL)
*
- * Programmer: Neil Fortner
- * Wednesday, October 1, 2008
+ * Programmer: Neil Fortner
+ * Wednesday, October 1, 2008
*
*-------------------------------------------------------------------------
*/
@@ -1864,24 +1864,24 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
FUNC_LEAVE_NOAPI((H5T_conv_struct_t *)H5MM_xfree(priv))
} /* end H5T__conv_struct_free() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_init
+ * Function: H5T__conv_struct_init
*
- * Purpose: Initialize the `priv' field of `cdata' with conversion
- * information that is relatively constant. If `priv' is
- * already initialized then the member conversion functions
- * are recalculated.
+ * Purpose: Initialize the `priv' field of `cdata' with conversion
+ * information that is relatively constant. If `priv' is
+ * already initialized then the member conversion functions
+ * are recalculated.
*
- * Priv fields are indexed by source member number or
- * destination member number depending on whether the field
- * contains information about the source datatype or the
- * destination datatype (fields that contains the same
- * information for both source and destination are indexed by
- * source member number). The src2dst[] priv array maps source
- * member numbers to destination member numbers, but if the
- * source member doesn't have a corresponding destination member
- * then the src2dst[i]=-1.
+ * Priv fields are indexed by source member number or
+ * destination member number depending on whether the field
+ * contains information about the source datatype or the
+ * destination datatype (fields that contains the same
+ * information for both source and destination are indexed by
+ * source member number). The src2dst[] priv array maps source
+ * member numbers to destination member numbers, but if the
+ * source member doesn't have a corresponding destination member
+ * then the src2dst[i]=-1.
*
* Special optimization case when the source and destination
* members are a subset of each other, and the order is the same,
@@ -1904,20 +1904,20 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv)
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Monday, January 26, 1998
+ * Programmer: Robb Matzke
+ * Monday, January 26, 1998
*
*-------------------------------------------------------------------------
*/
static herr_t
H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
- int *src2dst = NULL;
+ H5T_conv_struct_t *priv = (H5T_conv_struct_t*)(cdata->priv);
+ int *src2dst = NULL;
unsigned src_nmembs, dst_nmembs;
- unsigned i, j;
+ unsigned i, j;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1964,8 +1964,8 @@ H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
} /* end if */
} /* end for */
if(src2dst[i] >= 0) {
- hid_t tid;
- H5T_t *type;
+ hid_t tid;
+ H5T_t *type;
type = H5T_copy(src->shared->u.compnd.memb[i].type, H5T_COPY_ALL);
tid = H5I_register(H5I_DATATYPE, type, FALSE);
@@ -2055,9 +2055,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_init() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_subset
+ * Function: H5T__conv_struct_subset
*
* Purpose: A quick way to return a field in a struct private in this
* file. The flag SMEMBS_SUBSET indicates whether the source
@@ -2075,15 +2075,15 @@ done:
* Return: A pointer to the subset info struct in p. Points directly
* into the structure.
*
- * Programmer: Raymond Lu
- * 8 June 2007
+ * Programmer: Raymond Lu
+ * 8 June 2007
*
*-------------------------------------------------------------------------
*/
H5T_subset_info_t *
H5T__conv_struct_subset(const H5T_cdata_t *cdata)
{
- H5T_conv_struct_t *priv = NULL;
+ H5T_conv_struct_t *priv = NULL;
FUNC_ENTER_PACKAGE_NOERR
@@ -2095,30 +2095,30 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata)
FUNC_LEAVE_NOAPI((H5T_subset_info_t *) &priv->subset_info)
} /* end H5T__conv_struct_subset() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct
+ * Function: H5T__conv_struct
*
- * Purpose: Converts between compound datatypes. This is a soft
- * conversion function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes. This is a soft
+ * conversion function. The algorithm is basically:
*
- * For each element do
- * For I=1..NELMTS do
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type;
- * Move member as far left as possible;
+ * For each element do
+ * For I=1..NELMTS do
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type;
+ * Move member as far left as possible;
*
- * For I=NELMTS..1 do
- * If not destination type then
- * Convert member to destination type;
- * Move member to correct position in BKG
+ * For I=NELMTS..1 do
+ * If not destination type then
+ * Convert member to destination type;
+ * Move member to correct position in BKG
*
- * Copy BKG to BUF
+ * Copy BKG to BUF
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2126,20 +2126,20 @@ herr_t
H5T__conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
uint8_t *xbuf = buf, *xbkg = bkg; /*temp pointers into buf and bkg*/
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- ssize_t src_delta; /*source stride */
- ssize_t bkg_delta; /*background stride */
- size_t elmtno;
- unsigned u; /*counters */
- int i; /*counters */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ ssize_t src_delta; /*source stride */
+ ssize_t bkg_delta; /*background stride */
+ size_t elmtno;
+ unsigned u; /*counters */
+ int i; /*counters */
H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv);
herr_t ret_value = SUCCEED; /* Return value */
@@ -2305,29 +2305,29 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_struct_opt
+ * Function: H5T__conv_struct_opt
*
- * Purpose: Converts between compound datatypes in a manner more
- * efficient than the general-purpose H5T__conv_struct()
- * function. This function isn't applicable if the destination
- * is larger than the source type. This is a soft conversion
- * function. The algorithm is basically:
+ * Purpose: Converts between compound datatypes in a manner more
+ * efficient than the general-purpose H5T__conv_struct()
+ * function. This function isn't applicable if the destination
+ * is larger than the source type. This is a soft conversion
+ * function. The algorithm is basically:
*
- * For each member of the struct
- * If sizeof destination type <= sizeof source type then
- * Convert member to destination type for all elements
- * Move memb to BKG buffer for all elements
- * Else
- * Move member as far left as possible for all elements
+ * For each member of the struct
+ * If sizeof destination type <= sizeof source type then
+ * Convert member to destination type for all elements
+ * Move memb to BKG buffer for all elements
+ * Else
+ * Move member as far left as possible for all elements
*
- * For each member of the struct (in reverse order)
- * If not destination type then
- * Convert member to destination type for all elements
- * Move member to correct position in BKG for all elements
+ * For each member of the struct (in reverse order)
+ * If not destination type then
+ * Convert member to destination type for all elements
+ * Move member to correct position in BKG for all elements
*
- * Copy BKG to BUF for all elements
+ * Copy BKG to BUF for all elements
*
* Special case when the source and destination members
* are a subset of each other, and the order is the same, and no
@@ -2342,10 +2342,10 @@ done:
* The optimization is simply moving data to the appropriate
* places in the buffer.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Thursday, January 22, 1998
+ * Programmer: Robb Matzke
+ * Thursday, January 22, 1998
*
*-------------------------------------------------------------------------
*/
@@ -2353,22 +2353,22 @@ herr_t
H5T__conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg)
{
- uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
- uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
- uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
- uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- int *src2dst = NULL; /*maps src member to dst member */
- H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
- H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
- size_t offset; /*byte offset wrt struct */
- size_t elmtno; /*element counter */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
+ uint8_t *xbuf = NULL; /*temporary pointer into `buf' */
+ uint8_t *xbkg = NULL; /*temporary pointer into `bkg' */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ int *src2dst = NULL; /*maps src member to dst member */
+ H5T_cmemb_t *src_memb = NULL; /*source struct member descript.*/
+ H5T_cmemb_t *dst_memb = NULL; /*destination struct memb desc. */
+ size_t offset; /*byte offset wrt struct */
+ size_t elmtno; /*element counter */
size_t copy_size; /*size of element for copying */
- H5T_conv_struct_t *priv = NULL; /*private data */
+ H5T_conv_struct_t *priv = NULL; /*private data */
hbool_t no_stride = FALSE; /*flag to indicate no stride */
- unsigned u; /*counters */
- int i; /*counters */
+ unsigned u; /*counters */
+ int i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2577,17 +2577,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_struct_opt() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_init
+ * Function: H5T__conv_enum_init
*
- * Purpose: Initialize information for H5T__conv_enum().
+ * Purpose: Initialize information for H5T__conv_enum().
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*
*-------------------------------------------------------------------------
@@ -2595,21 +2595,21 @@ done:
static herr_t
H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
{
- H5T_enum_struct_t *priv = NULL; /*private conversion data */
- int n; /*src value cast as native int */
- int domain[2] = {0, 0}; /*min and max source values */
- int *map = NULL; /*map from src value to dst idx */
- unsigned length; /*nelmts in map array */
- unsigned i, j; /*counters */
+ H5T_enum_struct_t *priv = NULL; /*private conversion data */
+ int n; /*src value cast as native int */
+ int domain[2] = {0, 0}; /*min and max source values */
+ int *map = NULL; /*map from src value to dst idx */
+ unsigned length; /*nelmts in map array */
+ unsigned i, j; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
cdata->need_bkg = H5T_BKG_NO;
if(NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv)))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
if(0 == src->shared->u.enumer.nmembs)
- HGOTO_DONE(SUCCEED);
+ HGOTO_DONE(SUCCEED);
/*
* Check that the source symbol names are a subset of the destination
@@ -2619,16 +2619,16 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
H5T__sort_name(src, NULL);
H5T__sort_name(dst, NULL);
if(NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
for(i = 0, j = 0;
i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs;
i++, j++) {
- while(j < dst->shared->u.enumer.nmembs &&
- HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
+ while(j < dst->shared->u.enumer.nmembs &&
+ HDstrcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]))
j++;
- if(j >= dst->shared->u.enumer.nmembs)
- HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
- priv->src2dst[i] = (int)j;
+ if(j >= dst->shared->u.enumer.nmembs)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "source type is not a subset of destination type")
+ priv->src2dst[i] = (int)j;
} /* end for */
/*
@@ -2636,12 +2636,12 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* value converted. However, if all of the following constraints are met
* then we can build a perfect hash table and use an O(1) lookup method.
*
- * A: The source datatype size matches one of our native datatype
- * sizes.
+ * A: The source datatype size matches one of our native datatype
+ * sizes.
*
- * B: After casting the source value bit pattern to a native type
- * the size of the range of values is less than 20% larger than
- * the number of values.
+ * B: After casting the source value bit pattern to a native type
+ * the size of the range of values is less than 20% larger than
+ * the number of values.
*
* If this special case is met then we use the source bit pattern cast as
* a native integer type as an index into the `val2dst'. The values of
@@ -2658,53 +2658,53 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
* situations. SLU - 2011/5/24)
*/
if(1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) {
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
- else if (sizeof(short) == src->shared->size)
- n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- else
- n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- if(0 == i) {
- domain[0] = domain[1] = n;
- } else {
- domain[0] = MIN(domain[0], n);
- domain[1] = MAX(domain[1], n);
- }
- } /* end for */
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
+ else if (sizeof(short) == src->shared->size)
+ n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ else
+ n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ if(0 == i) {
+ domain[0] = domain[1] = n;
+ } else {
+ domain[0] = MIN(domain[0], n);
+ domain[1] = MAX(domain[1], n);
+ }
+ } /* end for */
HDassert(domain[1] >= domain[0]);
- length = (unsigned)(domain[1] - domain[0]) + 1;
- if(src->shared->u.enumer.nmembs < 2 ||
+ length = (unsigned)(domain[1] - domain[0]) + 1;
+ if(src->shared->u.enumer.nmembs < 2 ||
(double)length / src->shared->u.enumer.nmembs < (double)(1.2f)) {
- priv->base = domain[0];
- priv->length = length;
- if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
- for(i = 0; i < length; i++)
+ priv->base = domain[0];
+ priv->length = length;
+ if(NULL == (map = (int *)H5MM_malloc(length * sizeof(int))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ for(i = 0; i < length; i++)
map[i] = -1; /*entry unused*/
- for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
- if(1 == src->shared->size)
- n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
- else if(sizeof(short) == src->shared->size)
- n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- else
- n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
- n -= priv->base;
- HDassert(n >= 0 && (unsigned)n < priv->length);
- HDassert(map[n] < 0);
- map[n] = priv->src2dst[i];
- } /* end for */
-
- /*
- * Replace original src2dst array with our new one. The original
- * was indexed by source member number while the new one is
- * indexed by source values.
- */
- H5MM_xfree(priv->src2dst);
- priv->src2dst = map;
- HGOTO_DONE(SUCCEED);
- }
+ for(i = 0; i < src->shared->u.enumer.nmembs; i++) {
+ if(1 == src->shared->size)
+ n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i));
+ else if(sizeof(short) == src->shared->size)
+ n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ else
+ n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size))));
+ n -= priv->base;
+ HDassert(n >= 0 && (unsigned)n < priv->length);
+ HDassert(map[n] < 0);
+ map[n] = priv->src2dst[i];
+ } /* end for */
+
+ /*
+ * Replace original src2dst array with our new one. The original
+ * was indexed by source member number while the new one is
+ * indexed by source values.
+ */
+ H5MM_xfree(priv->src2dst);
+ priv->src2dst = map;
+ HGOTO_DONE(SUCCEED);
+ }
}
/* Sort source type by value and adjust src2dst[] appropriately */
@@ -2712,24 +2712,24 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata)
done:
if (ret_value<0 && priv) {
- H5MM_xfree(priv->src2dst);
- H5MM_xfree(priv);
- cdata->priv = NULL;
+ H5MM_xfree(priv->src2dst);
+ H5MM_xfree(priv);
+ cdata->priv = NULL;
}
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum
+ * Function: H5T__conv_enum
*
- * Purpose: Converts one type of enumerated data to another.
+ * Purpose: Converts one type of enumerated data to another.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, January 4, 1999
*-------------------------------------------------------------------------
*/
@@ -2738,15 +2738,15 @@ H5T__conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
- H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
- uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
- ssize_t src_delta, dst_delta; /*conversion strides */
- int n; /*src value cast as native int */
+ uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */
+ H5T_t *src = NULL, *dst = NULL; /*src and dst datatypes */
+ uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */
+ ssize_t src_delta, dst_delta; /*conversion strides */
+ int n; /*src value cast as native int */
H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv);
H5T_conv_cb_t cb_struct; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
- size_t i; /*counters */
+ size_t i; /*counters */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -2908,30 +2908,30 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_enum_numeric
+ * Function: H5T__conv_enum_numeric
*
- * Purpose: Converts enumerated data to a numeric type (integer or
+ * Purpose: Converts enumerated data to a numeric type (integer or
* floating-point number). This function is registered into
* the conversion table twice in H5T_init_interface in H5T.c.
* Once for enum-integer conversion. Once for enum-float conversion.
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 12 October 2012
*-------------------------------------------------------------------------
*/
herr_t
H5T__conv_enum_numeric(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
- size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
+ size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src, *dst; /*src and dst datatypes */
- H5T_t *src_parent; /*parent type for src */
+ H5T_t *src, *dst; /*src and dst datatypes */
+ H5T_t *src_parent; /*parent type for src */
hid_t src_parent_id = -1; /*ID for parent of the source */
H5T_path_t *tpath; /* Conversion information */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2988,28 +2988,28 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_enum_numeric() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_vlen
+ * Function: H5T__conv_vlen
*
- * Purpose: Converts between VL datatypes in memory and on disk.
- * This is a soft conversion function. The algorithm is
- * basically:
+ * Purpose: Converts between VL datatypes in memory and on disk.
+ * This is a soft conversion function. The algorithm is
+ * basically:
*
- * For every VL struct in the main buffer:
- * 1. Allocate space for temporary dst VL data (reuse buffer
- * if possible)
+ * For every VL struct in the main buffer:
+ * 1. Allocate space for temporary dst VL data (reuse buffer
+ * if possible)
* 2. Copy VL data from src buffer into dst buffer
* 3. Convert VL data into dst representation
* 4. Allocate buffer in dst heap
- * 5. Free heap objects storing old data
+ * 5. Free heap objects storing old data
* 6. Write dst VL data into dst heap
* 7. Store (heap ID or pointer) and length in main dst buffer
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Wednesday, May 26, 1999
+ * Programmer: Quincey Koziol
+ * Wednesday, May 26, 1999
*
*-------------------------------------------------------------------------
*/
@@ -3018,27 +3018,27 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *buf, void *bkg)
{
H5T_vlen_alloc_info_t vl_alloc_info;/* VL allocation info */
- H5T_path_t *tpath = NULL; /* Type conversion path */
+ H5T_path_t *tpath = NULL; /* Type conversion path */
hbool_t noop_conv = FALSE; /* Flag to indicate a noop conversion */
hbool_t write_to_file = FALSE; /* Flag to indicate writing to file */
htri_t parent_is_vlen; /* Flag to indicate parent is vlen datatyp */
- size_t bg_seq_len = 0; /* The number of elements in the background sequence */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *s = NULL; /*source buffer */
- uint8_t *d = NULL; /*destination buffer */
- uint8_t *b = NULL; /*background buffer */
- ssize_t s_stride, d_stride; /*src and dst strides */
- ssize_t b_stride; /*bkg stride */
+ size_t bg_seq_len = 0; /* The number of elements in the background sequence */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *s = NULL; /*source buffer */
+ uint8_t *d = NULL; /*destination buffer */
+ uint8_t *b = NULL; /*background buffer */
+ ssize_t s_stride, d_stride; /*src and dst strides */
+ ssize_t b_stride; /*bkg stride */
size_t safe; /*how many elements are safe to process in each pass */
- size_t src_base_size, dst_base_size;/*source & destination base size*/
- void *conv_buf = NULL; /*temporary conversion buffer */
- size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
- void *tmp_buf = NULL; /*temporary background buffer */
- size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
+ size_t src_base_size, dst_base_size;/*source & destination base size*/
+ void *conv_buf = NULL; /*temporary conversion buffer */
+ size_t conv_buf_size = 0; /*size of conversion buffer in bytes */
+ void *tmp_buf = NULL; /*temporary background buffer */
+ size_t tmp_buf_size = 0; /*size of temporary bkg buffer */
hbool_t nested = FALSE; /*flag of nested VL case */
- size_t elmtno; /*element number counter */
+ size_t elmtno; /*element number counter */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3207,7 +3207,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't set VL data to 'nil'")
} /* end else-if */
else {
- size_t seq_len; /* The number of elements in the current sequence */
+ size_t seq_len; /* The number of elements in the current sequence */
/* Get length of element sequences */
if((*(src->shared->u.vlen.cls->getlen))(src->shared->u.vlen.file, s, &seq_len) < 0)
@@ -3220,7 +3220,7 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid source pointer")
} /* end if */
else {
- size_t src_size, dst_size; /*source & destination total size in bytes*/
+ size_t src_size, dst_size; /*source & destination total size in bytes*/
src_size = seq_len * src_base_size;
dst_size = seq_len * dst_base_size;
@@ -3228,11 +3228,11 @@ H5T__conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if conversion buffer is large enough, resize if
* necessary. If the SEQ_LEN is 0, allocate a minimal size buffer.
*/
- if(!seq_len && !conv_buf) {
+ if(!seq_len && !conv_buf) {
conv_buf_size = H5T_VLEN_MIN_CONF_BUF_SIZE;
if(NULL == (conv_buf = H5FL_BLK_CALLOC(vlen_seq, conv_buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion")
- } /* end if */
+ } /* end if */
else if(conv_buf_size < MAX(src_size, dst_size)) {
/* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */
conv_buf_size = ((MAX(src_size, dst_size) / H5T_VLEN_MIN_CONF_BUF_SIZE) + 1) * H5T_VLEN_MIN_CONF_BUF_SIZE;
@@ -3349,17 +3349,17 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_vlen() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_array
+ * Function: H5T__conv_array
*
- * Purpose: Converts between array datatypes in memory and on disk.
- * This is a soft conversion function.
+ * Purpose: Converts between array datatypes in memory and on disk.
+ * This is a soft conversion function.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Quincey Koziol
- * Monday, November 6, 2000
+ * Programmer: Quincey Koziol
+ * Monday, November 6, 2000
*
*-------------------------------------------------------------------------
*/
@@ -3367,16 +3367,16 @@ herr_t
H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg)
{
- H5T_path_t *tpath; /* Type conversion path */
- hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- uint8_t *sp, *dp; /*source and dest traversal ptrs */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number counter */
+ H5T_path_t *tpath; /* Type conversion path */
+ hid_t tsrc_id = -1, tdst_id = -1;/*temporary type atoms */
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ uint8_t *sp, *dp; /*source and dest traversal ptrs */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number counter */
unsigned u; /* local index variable */
- void *bkg_buf = NULL; /*temporary background buffer */
+ void *bkg_buf = NULL; /*temporary background buffer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -3454,7 +3454,7 @@ H5T__conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check if we need a background buffer for this conversion */
if(tpath->cdata.need_bkg) {
- size_t bkg_buf_size; /*size of background buffer in bytes */
+ size_t bkg_buf_size; /*size of background buffer in bytes */
/* Allocate background buffer */
bkg_buf_size = src->shared->u.array.nelem * MAX(src->shared->size, dst->shared->size);
@@ -3641,7 +3641,7 @@ H5T__conv_ref(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(0 == (buf_size = src->shared->u.atomic.u.r.cls->getsize(
src->shared->u.atomic.u.r.file, s, src->shared->size,
dst->shared->u.atomic.u.r.file, &dst_copy)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "incorrect size")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to obtain size of reference")
/* Check if conversion buffer is large enough, resize if necessary. */
if(conv_buf_size < buf_size) {
@@ -3696,18 +3696,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_ref() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_i
+ * Function: H5T__conv_i_i
*
- * Purpose: Convert one integer type to another. This is the catch-all
- * function for integer conversions and is probably not
- * particularly fast.
+ * Purpose: Convert one integer type to another. This is the catch-all
+ * function for integer conversions and is probably not
+ * particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Wednesday, June 10, 1998
+ * Programmer: Robb Matzke
+ * Wednesday, June 10, 1998
*
*-------------------------------------------------------------------------
*/
@@ -3715,19 +3715,19 @@ herr_t
H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src = NULL; /*source datatype */
- H5T_t *dst = NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ H5T_t *src = NULL; /*source datatype */
+ H5T_t *dst = NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
- size_t first;
- ssize_t sfirst; /*a signed version of `first' */
- size_t i; /*Local index variables */
+ uint8_t dbuf[64]; /*temp destination buffer */
+ size_t first;
+ ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*Local index variables */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -4087,18 +4087,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_f
+ * Function: H5T__conv_f_f
*
- * Purpose: Convert one floating point type to another. This is a catch
- * all for floating point conversions and is probably not
- * particularly fast!
+ * Purpose: Convert one floating point type to another. This is a catch
+ * all for floating point conversions and is probably not
+ * particularly fast!
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4107,32 +4107,32 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- ssize_t bitno = 0; /*bit number */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ ssize_t bitno = 0; /*bit number */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- int64_t expo; /*exponent */
- hssize_t expo_max; /*maximum possible dst exponent */
- size_t msize = 0; /*useful size of mantissa in src*/
- size_t mpos; /*offset to useful mant is src */
+ int64_t expo; /*exponent */
+ hssize_t expo_max; /*maximum possible dst exponent */
+ size_t msize = 0; /*useful size of mantissa in src*/
+ size_t mpos; /*offset to useful mant is src */
uint64_t sign; /*source sign bit value */
- size_t mrsh; /*amount to right shift mantissa*/
- hbool_t carry = FALSE; /*carry after rounding mantissa */
- size_t i; /*miscellaneous counters */
- size_t implied; /*destination implied bits */
+ size_t mrsh; /*amount to right shift mantissa*/
+ hbool_t carry = FALSE; /*carry after rounding mantissa */
+ size_t i; /*miscellaneous counters */
+ size_t implied; /*destination implied bits */
hbool_t denormalized = FALSE; /*is either source or destination denormalized?*/
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
@@ -4396,7 +4396,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*
* Get the exponent as an unsigned quantity from the section of
- * the source bit field where it's located. Don't worry about
+ * the source bit field where it's located. Don't worry about
* the exponent bias yet.
*/
expo = (int64_t)H5T__bit_get_d(s, src.u.f.epos, src.u.f.esize);
@@ -4482,7 +4482,7 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
else if (expo>=expo_max) {
/*
* The exponent is too large to fit in the available region
- * or it results in the maximum possible value. Use positive
+ * or it results in the maximum possible value. Use positive
* or negative infinity instead unless the application
* specifies something else. Before calling the overflow
* handler make sure the source buffer we hand it is in the
@@ -4674,16 +4674,16 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_s_s
+ * Function: H5T__conv_s_s
*
- * Purpose: Convert one fixed-length string type to another.
+ * Purpose: Convert one fixed-length string type to another.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Friday, August 7, 1998
+ * Programmer: Robb Matzke
+ * Friday, August 7, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4692,15 +4692,15 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf,
void H5_ATTR_UNUSED *bkg)
{
- H5T_t *src=NULL; /*source datatype */
- H5T_t *dst=NULL; /*destination datatype */
- ssize_t src_delta, dst_delta; /*source & destination stride */
- int direction; /*direction of traversal */
- size_t elmtno; /*element number */
- size_t olap; /*num overlapping elements */
- size_t nchars=0; /*number of characters copied */
- uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
+ H5T_t *src=NULL; /*source datatype */
+ H5T_t *dst=NULL; /*destination datatype */
+ ssize_t src_delta, dst_delta; /*source & destination stride */
+ int direction; /*direction of traversal */
+ size_t elmtno; /*element number */
+ size_t olap; /*num overlapping elements */
+ size_t nchars=0; /*number of characters copied */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -4906,18 +4906,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_s_s() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uchar
+ * Function: H5T__conv_schar_uchar
*
- * Purpose: Converts `signed char' to `unsigned char'
+ * Purpose: Converts `signed char' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4929,18 +4929,18 @@ H5T__conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_schar
+ * Function: H5T__conv_uchar_schar
*
- * Purpose: Converts `unsigned char' to `signed char'
+ * Purpose: Converts `unsigned char' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4952,18 +4952,18 @@ H5T__conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_short
+ * Function: H5T__conv_schar_short
*
- * Purpose: Converts `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4975,18 +4975,18 @@ H5T__conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ushort
+ * Function: H5T__conv_schar_ushort
*
- * Purpose: Converts `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -4998,18 +4998,18 @@ H5T__conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_short
+ * Function: H5T__conv_uchar_short
*
- * Purpose: Converts `unsigned char' to `short'
+ * Purpose: Converts `unsigned char' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5021,18 +5021,18 @@ H5T__conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ushort
+ * Function: H5T__conv_uchar_ushort
*
- * Purpose: Converts `unsigned char' to `unsigned short'
+ * Purpose: Converts `unsigned char' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5044,18 +5044,18 @@ H5T__conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, USHORT, unsigned char, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_int
+ * Function: H5T__conv_schar_int
*
- * Purpose: Converts `signed char' to `int'
+ * Purpose: Converts `signed char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5067,18 +5067,18 @@ H5T__conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, INT, signed char, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_uint
+ * Function: H5T__conv_schar_uint
*
- * Purpose: Converts `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5090,18 +5090,18 @@ H5T__conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_int
+ * Function: H5T__conv_uchar_int
*
- * Purpose: Converts `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5113,18 +5113,18 @@ H5T__conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_uint
+ * Function: H5T__conv_uchar_uint
*
- * Purpose: Converts `unsigned char' to `unsigned int'
+ * Purpose: Converts `unsigned char' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5136,18 +5136,18 @@ H5T__conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_long
+ * Function: H5T__conv_schar_long
*
- * Purpose: Converts `signed char' to `long'
+ * Purpose: Converts `signed char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5159,18 +5159,18 @@ H5T__conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ulong
+ * Function: H5T__conv_schar_ulong
*
- * Purpose: Converts `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5182,18 +5182,18 @@ H5T__conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_long
+ * Function: H5T__conv_uchar_long
*
- * Purpose: Converts `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5205,18 +5205,18 @@ H5T__conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ulong
+ * Function: H5T__conv_uchar_ulong
*
- * Purpose: Converts `unsigned char' to `unsigned long'
+ * Purpose: Converts `unsigned char' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5228,18 +5228,18 @@ H5T__conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_llong
+ * Function: H5T__conv_schar_llong
*
- * Purpose: Converts `signed char' to `long long'
+ * Purpose: Converts `signed char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5251,18 +5251,18 @@ H5T__conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ullong
+ * Function: H5T__conv_schar_ullong
*
- * Purpose: Converts `signed char' to `unsigned long long'
+ * Purpose: Converts `signed char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5274,18 +5274,18 @@ H5T__conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_llong
+ * Function: H5T__conv_uchar_llong
*
- * Purpose: Converts `unsigned char' to `long long'
+ * Purpose: Converts `unsigned char' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5297,18 +5297,18 @@ H5T__conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ullong
+ * Function: H5T__conv_uchar_ullong
*
- * Purpose: Converts `unsigned char' to `unsigned long long'
+ * Purpose: Converts `unsigned char' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5320,18 +5320,18 @@ H5T__conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UCHAR, ULLONG, unsigned char, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_schar
+ * Function: H5T__conv_short_schar
*
- * Purpose: Converts `short' to `signed char'
+ * Purpose: Converts `short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5343,18 +5343,18 @@ H5T__conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uchar
+ * Function: H5T__conv_short_uchar
*
- * Purpose: Converts `short' to `unsigned char'
+ * Purpose: Converts `short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5366,18 +5366,18 @@ H5T__conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_schar
+ * Function: H5T__conv_ushort_schar
*
- * Purpose: Converts `unsigned short' to `signed char'
+ * Purpose: Converts `unsigned short' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5389,18 +5389,18 @@ H5T__conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uchar
+ * Function: H5T__conv_ushort_uchar
*
- * Purpose: Converts `unsigned short' to `unsigned char'
+ * Purpose: Converts `unsigned short' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5412,18 +5412,18 @@ H5T__conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(USHORT, UCHAR, unsigned short, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ushort
+ * Function: H5T__conv_short_ushort
*
- * Purpose: Converts `short' to `unsigned short'
+ * Purpose: Converts `short' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5435,18 +5435,18 @@ H5T__conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_short
+ * Function: H5T__conv_ushort_short
*
- * Purpose: Converts `unsigned short' to `short'
+ * Purpose: Converts `unsigned short' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5458,18 +5458,18 @@ H5T__conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(USHORT, SHORT, unsigned short, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_int
+ * Function: H5T__conv_short_int
*
- * Purpose: Converts `short' to `int'
+ * Purpose: Converts `short' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5481,18 +5481,18 @@ H5T__conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, INT, short, int, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_uint
+ * Function: H5T__conv_short_uint
*
- * Purpose: Converts `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5504,18 +5504,18 @@ H5T__conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_int
+ * Function: H5T__conv_ushort_int
*
- * Purpose: Converts `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5527,18 +5527,18 @@ H5T__conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_uint
+ * Function: H5T__conv_ushort_uint
*
- * Purpose: Converts `unsigned short' to `unsigned int'
+ * Purpose: Converts `unsigned short' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5550,18 +5550,18 @@ H5T__conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_long
+ * Function: H5T__conv_short_long
*
- * Purpose: Converts `short' to `long'
+ * Purpose: Converts `short' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5573,18 +5573,18 @@ H5T__conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LONG, short, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ulong
+ * Function: H5T__conv_short_ulong
*
- * Purpose: Converts `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5596,18 +5596,18 @@ H5T__conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_long
+ * Function: H5T__conv_ushort_long
*
- * Purpose: Converts `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5619,18 +5619,18 @@ H5T__conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ulong
+ * Function: H5T__conv_ushort_ulong
*
- * Purpose: Converts `unsigned short' to `unsigned long'
+ * Purpose: Converts `unsigned short' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5642,18 +5642,18 @@ H5T__conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULONG, unsigned short, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_llong
+ * Function: H5T__conv_short_llong
*
- * Purpose: Converts `short' to `long long'
+ * Purpose: Converts `short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5665,18 +5665,18 @@ H5T__conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(SHORT, LLONG, short, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ullong
+ * Function: H5T__conv_short_ullong
*
- * Purpose: Converts `short' to `unsigned long long'
+ * Purpose: Converts `short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5688,18 +5688,18 @@ H5T__conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(SHORT, ULLONG, short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_llong
+ * Function: H5T__conv_ushort_llong
*
- * Purpose: Converts `unsigned short' to `long long'
+ * Purpose: Converts `unsigned short' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5711,18 +5711,18 @@ H5T__conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(USHORT, LLONG, unsigned short, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ullong
+ * Function: H5T__conv_ushort_ullong
*
- * Purpose: Converts `unsigned short' to `unsigned long long'
+ * Purpose: Converts `unsigned short' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5734,18 +5734,18 @@ H5T__conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(USHORT, ULLONG, unsigned short, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_schar
+ * Function: H5T__conv_int_schar
*
- * Purpose: Converts `int' to `signed char'
+ * Purpose: Converts `int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5757,18 +5757,18 @@ H5T__conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uchar
+ * Function: H5T__conv_int_uchar
*
- * Purpose: Converts `int' to `unsigned char'
+ * Purpose: Converts `int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5780,18 +5780,18 @@ H5T__conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_schar
+ * Function: H5T__conv_uint_schar
*
- * Purpose: Converts `unsigned int' to `signed char'
+ * Purpose: Converts `unsigned int' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5803,18 +5803,18 @@ H5T__conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_uchar
+ * Function: H5T__conv_uint_uchar
*
- * Purpose: Converts `unsigned int' to `unsigned char'
+ * Purpose: Converts `unsigned int' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5826,18 +5826,18 @@ H5T__conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_short
+ * Function: H5T__conv_int_short
*
- * Purpose: Converts `int' to `short'
+ * Purpose: Converts `int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5849,18 +5849,18 @@ H5T__conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ushort
+ * Function: H5T__conv_int_ushort
*
- * Purpose: Converts `int' to `unsigned short'
+ * Purpose: Converts `int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5872,18 +5872,18 @@ H5T__conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_short
+ * Function: H5T__conv_uint_short
*
- * Purpose: Converts `unsigned int' to `short'
+ * Purpose: Converts `unsigned int' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5895,18 +5895,18 @@ H5T__conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ushort
+ * Function: H5T__conv_uint_ushort
*
- * Purpose: Converts `unsigned int' to `unsigned short'
+ * Purpose: Converts `unsigned int' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5918,18 +5918,18 @@ H5T__conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_uint
+ * Function: H5T__conv_int_uint
*
- * Purpose: Converts `int' to `unsigned int'
+ * Purpose: Converts `int' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5941,18 +5941,18 @@ H5T__conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(INT, UINT, int, unsigned, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_int
+ * Function: H5T__conv_uint_int
*
- * Purpose: Converts `unsigned int' to `int'
+ * Purpose: Converts `unsigned int' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5964,18 +5964,18 @@ H5T__conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_long
+ * Function: H5T__conv_int_long
*
- * Purpose: Converts `int' to `long'
+ * Purpose: Converts `int' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -5987,18 +5987,18 @@ H5T__conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LONG, int, long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ulong
+ * Function: H5T__conv_int_ulong
*
- * Purpose: Converts `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6010,18 +6010,18 @@ H5T__conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, LONG, int, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_long
+ * Function: H5T__conv_uint_long
*
- * Purpose: Converts `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6033,18 +6033,18 @@ H5T__conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ulong
+ * Function: H5T__conv_uint_ulong
*
- * Purpose: Converts `unsigned int' to `unsigned long'
+ * Purpose: Converts `unsigned int' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6056,18 +6056,18 @@ H5T__conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_llong
+ * Function: H5T__conv_int_llong
*
- * Purpose: Converts `int' to `long long'
+ * Purpose: Converts `int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6079,18 +6079,18 @@ H5T__conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(INT, LLONG, int, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ullong
+ * Function: H5T__conv_int_ullong
*
- * Purpose: Converts `int' to `unsigned long long'
+ * Purpose: Converts `int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6102,18 +6102,18 @@ H5T__conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_llong
+ * Function: H5T__conv_uint_llong
*
- * Purpose: Converts `unsigned int' to `long long'
+ * Purpose: Converts `unsigned int' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6125,18 +6125,18 @@ H5T__conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ullong
+ * Function: H5T__conv_uint_ullong
*
- * Purpose: Converts `unsigned int' to `unsigned long long'
+ * Purpose: Converts `unsigned int' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6148,18 +6148,18 @@ H5T__conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_schar
+ * Function: H5T__conv_long_schar
*
- * Purpose: Converts `long' to `signed char'
+ * Purpose: Converts `long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6171,18 +6171,18 @@ H5T__conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uchar
+ * Function: H5T__conv_long_uchar
*
- * Purpose: Converts `long' to `unsigned char'
+ * Purpose: Converts `long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6194,18 +6194,18 @@ H5T__conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_schar
+ * Function: H5T__conv_ulong_schar
*
- * Purpose: Converts `unsigned long' to `signed char'
+ * Purpose: Converts `unsigned long' to `signed char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6217,18 +6217,18 @@ H5T__conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uchar
+ * Function: H5T__conv_ulong_uchar
*
- * Purpose: Converts `unsigned long' to `unsigned char'
+ * Purpose: Converts `unsigned long' to `unsigned char'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6240,18 +6240,18 @@ H5T__conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_short
+ * Function: H5T__conv_long_short
*
- * Purpose: Converts `long' to `short'
+ * Purpose: Converts `long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6263,18 +6263,18 @@ H5T__conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ushort
+ * Function: H5T__conv_long_ushort
*
- * Purpose: Converts `long' to `unsigned short'
+ * Purpose: Converts `long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6286,18 +6286,18 @@ H5T__conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_short
+ * Function: H5T__conv_ulong_short
*
- * Purpose: Converts `unsigned long' to `short'
+ * Purpose: Converts `unsigned long' to `short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6309,18 +6309,18 @@ H5T__conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ushort
+ * Function: H5T__conv_ulong_ushort
*
- * Purpose: Converts `unsigned long' to `unsigned short'
+ * Purpose: Converts `unsigned long' to `unsigned short'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6332,18 +6332,18 @@ H5T__conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, USHORT, unsigned long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_int
+ * Function: H5T__conv_long_int
*
- * Purpose: Converts `long' to `int'
+ * Purpose: Converts `long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6355,18 +6355,18 @@ H5T__conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_uint
+ * Function: H5T__conv_long_uint
*
- * Purpose: Converts `long' to `unsigned int'
+ * Purpose: Converts `long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6378,18 +6378,18 @@ H5T__conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_int
+ * Function: H5T__conv_ulong_int
*
- * Purpose: Converts `unsigned long' to `int'
+ * Purpose: Converts `unsigned long' to `int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6401,18 +6401,18 @@ H5T__conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_uint
+ * Function: H5T__conv_ulong_uint
*
- * Purpose: Converts `unsigned long' to `unsigned int'
+ * Purpose: Converts `unsigned long' to `unsigned int'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6424,18 +6424,18 @@ H5T__conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ulong
+ * Function: H5T__conv_long_ulong
*
- * Purpose: Converts `long' to `unsigned long'
+ * Purpose: Converts `long' to `unsigned long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6447,18 +6447,18 @@ H5T__conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_long
+ * Function: H5T__conv_ulong_long
*
- * Purpose: Converts `unsigned long' to `long'
+ * Purpose: Converts `unsigned long' to `long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6470,18 +6470,18 @@ H5T__conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_llong
+ * Function: H5T__conv_long_llong
*
- * Purpose: Converts `long' to `long long'
+ * Purpose: Converts `long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6493,18 +6493,18 @@ H5T__conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sS(LONG, LLONG, long, long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ullong
+ * Function: H5T__conv_long_ullong
*
- * Purpose: Converts `long' to `unsigned long long'
+ * Purpose: Converts `long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6516,18 +6516,18 @@ H5T__conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_llong
+ * Function: H5T__conv_ulong_llong
*
- * Purpose: Converts `unsigned long' to `long long'
+ * Purpose: Converts `unsigned long' to `long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6539,18 +6539,18 @@ H5T__conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ullong
+ * Function: H5T__conv_ulong_ullong
*
- * Purpose: Converts `unsigned long' to `unsigned long long'
+ * Purpose: Converts `unsigned long' to `unsigned long long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6562,18 +6562,18 @@ H5T__conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_uU(ULONG, ULLONG, unsigned long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_schar
+ * Function: H5T__conv_llong_schar
*
- * Purpose: Converts `long long' to `signed char'
+ * Purpose: Converts `long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6585,18 +6585,18 @@ H5T__conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uchar
+ * Function: H5T__conv_llong_uchar
*
- * Purpose: Converts `long long' to `unsigned char'
+ * Purpose: Converts `long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6608,18 +6608,18 @@ H5T__conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_schar
+ * Function: H5T__conv_ullong_schar
*
- * Purpose: Converts `unsigned long long' to `signed char'
+ * Purpose: Converts `unsigned long long' to `signed char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6631,18 +6631,18 @@ H5T__conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SCHAR, unsigned long long, signed char, -, SCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uchar
+ * Function: H5T__conv_ullong_uchar
*
- * Purpose: Converts `unsigned long long' to `unsigned char'
+ * Purpose: Converts `unsigned long long' to `unsigned char'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6654,18 +6654,18 @@ H5T__conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UCHAR, unsigned long long, unsigned char, -, UCHAR_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_short
+ * Function: H5T__conv_llong_short
*
- * Purpose: Converts `long long' to `short'
+ * Purpose: Converts `long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6677,18 +6677,18 @@ H5T__conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ushort
+ * Function: H5T__conv_llong_ushort
*
- * Purpose: Converts `long long' to `unsigned short'
+ * Purpose: Converts `long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6700,18 +6700,18 @@ H5T__conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, USHORT, long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_short
+ * Function: H5T__conv_ullong_short
*
- * Purpose: Converts `unsigned long long' to `short'
+ * Purpose: Converts `unsigned long long' to `short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6723,18 +6723,18 @@ H5T__conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, SHORT, unsigned long long, short, -, SHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ushort
+ * Function: H5T__conv_ullong_ushort
*
- * Purpose: Converts `unsigned long long' to `unsigned short'
+ * Purpose: Converts `unsigned long long' to `unsigned short'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6746,18 +6746,18 @@ H5T__conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, USHORT, unsigned long long, unsigned short, -, USHRT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_int
+ * Function: H5T__conv_llong_int
*
- * Purpose: Converts `long long' to `int'
+ * Purpose: Converts `long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6769,18 +6769,18 @@ H5T__conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_uint
+ * Function: H5T__conv_llong_uint
*
- * Purpose: Converts `long long' to `unsigned int'
+ * Purpose: Converts `long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6792,18 +6792,18 @@ H5T__conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_int
+ * Function: H5T__conv_ullong_int
*
- * Purpose: Converts `unsigned long long' to `int'
+ * Purpose: Converts `unsigned long long' to `int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6815,18 +6815,18 @@ H5T__conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_uint
+ * Function: H5T__conv_ullong_uint
*
- * Purpose: Converts `unsigned long long' to `unsigned int'
+ * Purpose: Converts `unsigned long long' to `unsigned int'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6838,18 +6838,18 @@ H5T__conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_long
+ * Function: H5T__conv_llong_long
*
- * Purpose: Converts `long long' to `long'
+ * Purpose: Converts `long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6861,18 +6861,18 @@ H5T__conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ulong
+ * Function: H5T__conv_llong_ulong
*
- * Purpose: Converts `long long' to `unsigned long'
+ * Purpose: Converts `long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6884,18 +6884,18 @@ H5T__conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_long
+ * Function: H5T__conv_ullong_long
*
- * Purpose: Converts `unsigned long long' to `long'
+ * Purpose: Converts `unsigned long long' to `long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6907,18 +6907,18 @@ H5T__conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ulong
+ * Function: H5T__conv_ullong_ulong
*
- * Purpose: Converts `unsigned long long' to `unsigned long'
+ * Purpose: Converts `unsigned long long' to `unsigned long'
*
- * Return: Success: Non-negative
+ * Return: Success: Non-negative
*
- * Failure: Negative
+ * Failure: Negative
*
- * Programmer: Robb Matzke
- * Friday, November 13, 1998
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6930,18 +6930,18 @@ H5T__conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Uu(ULLONG, ULONG, unsigned long long, unsigned long, -, ULONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ullong
+ * Function: H5T__conv_llong_ullong
*
- * Purpose: Converts `long long' to `unsigned long long'
+ * Purpose: Converts `long long' to `unsigned long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6953,18 +6953,18 @@ H5T__conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_su(LLONG, ULLONG, long long, unsigned long long, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_llong
+ * Function: H5T__conv_ullong_llong
*
- * Purpose: Converts `unsigned long long' to `long long'
+ * Purpose: Converts `unsigned long long' to `long long'
*
- * Return: Success: non-negative
+ * Return: Success: non-negative
*
- * Failure: negative
+ * Failure: negative
*
- * Programmer: Robb Matzke
- * Monday, November 16, 1998
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6976,17 +6976,17 @@ H5T__conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_us(ULLONG, LLONG, unsigned long long, long long, -, LLONG_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_double
+ * Function: H5T__conv_float_double
*
- * Purpose: Convert native `float' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -6998,17 +6998,17 @@ H5T__conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_fF(FLOAT, DOUBLE, float, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ldouble
+ * Function: H5T__conv_float_ldouble
*
- * Purpose: Convert native `float' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `float' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7022,17 +7022,17 @@ H5T__conv_float_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_float
+ * Function: H5T__conv_double_float
*
- * Purpose: Convert native `double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Robb Matzke
- * Tuesday, June 23, 1998
+ * Programmer: Robb Matzke
+ * Tuesday, June 23, 1998
*
*-------------------------------------------------------------------------
*/
@@ -7044,17 +7044,17 @@ H5T__conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ldouble
+ * Function: H5T__conv_double_ldouble
*
- * Purpose: Convert native `double' to native `long double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `double' to native `long double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7068,17 +7068,17 @@ H5T__conv_double_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_float
+ * Function: H5T__conv_ldouble_float
*
- * Purpose: Convert native `long double' to native `float' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `float' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7092,17 +7092,17 @@ H5T__conv_ldouble_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_double
+ * Function: H5T__conv_ldouble_double
*
- * Purpose: Convert native `long double' to native `double' using hardware.
- * This is a fast special case.
+ * Purpose: Convert native `long double' to native `double' using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 25, 2005
+ * Programmer: Raymond Lu
+ * Friday, Feb 25, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7116,17 +7116,17 @@ H5T__conv_ldouble_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5_SIZEOF_LONG_DOUBLE != 0 */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_float
+ * Function: H5T__conv_schar_float
*
- * Purpose: Convert native signed char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7138,17 +7138,17 @@ H5T__conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_double
+ * Function: H5T__conv_schar_double
*
- * Purpose: Convert native signed char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native signed char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7160,17 +7160,17 @@ H5T__conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_schar_ldouble
+ * Function: H5T__conv_schar_ldouble
*
- * Purpose: Convert native signed char to native long double using
+ * Purpose: Convert native signed char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7182,17 +7182,17 @@ H5T__conv_schar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SCHAR, LDOUBLE, signed char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_float
+ * Function: H5T__conv_uchar_float
*
- * Purpose: Convert native unsigned char to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7204,17 +7204,17 @@ H5T__conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_double
+ * Function: H5T__conv_uchar_double
*
- * Purpose: Convert native unsigned char to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned char to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7226,17 +7226,17 @@ H5T__conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uchar_ldouble
+ * Function: H5T__conv_uchar_ldouble
*
- * Purpose: Convert native unsigned char to native long double using
+ * Purpose: Convert native unsigned char to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7248,17 +7248,17 @@ H5T__conv_uchar_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UCHAR, LDOUBLE, unsigned char, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_float
+ * Function: H5T__conv_short_float
*
- * Purpose: Convert native short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7270,17 +7270,17 @@ H5T__conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, FLOAT, short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_double
+ * Function: H5T__conv_short_double
*
- * Purpose: Convert native short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7292,17 +7292,17 @@ H5T__conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_short_ldouble
+ * Function: H5T__conv_short_ldouble
*
- * Purpose: Convert native short to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native short to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7314,17 +7314,17 @@ H5T__conv_short_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(SHORT, LDOUBLE, short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_float
+ * Function: H5T__conv_ushort_float
*
- * Purpose: Convert native unsigned short to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7336,17 +7336,17 @@ H5T__conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_double
+ * Function: H5T__conv_ushort_double
*
- * Purpose: Convert native unsigned short to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned short to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7358,17 +7358,17 @@ H5T__conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ushort_ldouble
+ * Function: H5T__conv_ushort_ldouble
*
- * Purpose: Convert native unsigned short to native long double using
+ * Purpose: Convert native unsigned short to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7380,17 +7380,17 @@ H5T__conv_ushort_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(USHORT, LDOUBLE, unsigned short, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_float
+ * Function: H5T__conv_int_float
*
- * Purpose: Convert native integer to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7402,17 +7402,17 @@ H5T__conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, FLOAT, int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_double
+ * Function: H5T__conv_int_double
*
- * Purpose: Convert native integer to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7424,17 +7424,17 @@ H5T__conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, DOUBLE, int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_int_ldouble
+ * Function: H5T__conv_int_ldouble
*
- * Purpose: Convert native integer to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native integer to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7446,17 +7446,17 @@ H5T__conv_int_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_float
+ * Function: H5T__conv_uint_float
*
- * Purpose: Convert native unsigned integer to native float using
+ * Purpose: Convert native unsigned integer to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7468,17 +7468,17 @@ H5T__conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_double
+ * Function: H5T__conv_uint_double
*
- * Purpose: Convert native unsigned integer to native double using
+ * Purpose: Convert native unsigned integer to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7490,17 +7490,17 @@ H5T__conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_uint_ldouble
+ * Function: H5T__conv_uint_ldouble
*
- * Purpose: Convert native unsigned integer to native long double using
+ * Purpose: Convert native unsigned integer to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7512,17 +7512,17 @@ H5T__conv_uint_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(UINT, LDOUBLE, unsigned int, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_float
+ * Function: H5T__conv_long_float
*
- * Purpose: Convert native long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7534,17 +7534,17 @@ H5T__conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, FLOAT, long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_double
+ * Function: H5T__conv_long_double
*
- * Purpose: Convert native long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7556,17 +7556,17 @@ H5T__conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, DOUBLE, long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_long_ldouble
+ * Function: H5T__conv_long_ldouble
*
- * Purpose: Convert native long to native long double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long to native long double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7578,17 +7578,17 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LONG, LDOUBLE, long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_float
+ * Function: H5T__conv_ulong_float
*
- * Purpose: Convert native unsigned long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7600,17 +7600,17 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_double
+ * Function: H5T__conv_ulong_double
*
- * Purpose: Convert native unsigned long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native unsigned long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7622,17 +7622,17 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ulong_ldouble
+ * Function: H5T__conv_ulong_ldouble
*
- * Purpose: Convert native unsigned long to native long double using
+ * Purpose: Convert native unsigned long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7644,17 +7644,17 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_float
+ * Function: H5T__conv_llong_float
*
- * Purpose: Convert native long long to native float using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native float using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7666,17 +7666,17 @@ H5T__conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_double
+ * Function: H5T__conv_llong_double
*
- * Purpose: Convert native long long to native double using hardware.
- * This is a fast special case.
+ * Purpose: Convert native long long to native double using hardware.
+ * This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7688,17 +7688,17 @@ H5T__conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(LLONG, DOUBLE, long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_llong_ldouble
+ * Function: H5T__conv_llong_ldouble
*
- * Purpose: Convert native long long to native long double using
+ * Purpose: Convert native long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7712,17 +7712,17 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_float
+ * Function: H5T__conv_ullong_float
*
- * Purpose: Convert native unsigned long long to native float using
+ * Purpose: Convert native unsigned long long to native float using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7734,17 +7734,17 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_double
+ * Function: H5T__conv_ullong_double
*
- * Purpose: Convert native unsigned long long to native double using
+ * Purpose: Convert native unsigned long long to native double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7756,17 +7756,17 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -);
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ullong_ldouble
+ * Function: H5T__conv_ullong_ldouble
*
- * Purpose: Convert native unsigned long long to native long double using
+ * Purpose: Convert native unsigned long long to native long double using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7780,17 +7780,17 @@ H5T__conv_ullong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
}
#endif /*H5T_CONV_INTERNAL_ULLONG_LDOUBLE*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_schar
+ * Function: H5T__conv_float_schar
*
- * Purpose: Convert native float to native signed char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7799,22 +7799,22 @@ H5T__conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uchar
+ * Function: H5T__conv_float_uchar
*
- * Purpose: Convert native float to native unsigned char using
+ * Purpose: Convert native float to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7823,22 +7823,22 @@ H5T__conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_schar
+ * Function: H5T__conv_double_schar
*
- * Purpose: Convert native double to native signed char using
+ * Purpose: Convert native double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7847,22 +7847,22 @@ H5T__conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uchar
+ * Function: H5T__conv_double_uchar
*
- * Purpose: Convert native double to native unsigned char using
+ * Purpose: Convert native double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7871,22 +7871,22 @@ H5T__conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_schar
+ * Function: H5T__conv_ldouble_schar
*
- * Purpose: Convert native long double to native signed char using
+ * Purpose: Convert native long double to native signed char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7895,22 +7895,22 @@ H5T__conv_ldouble_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, SCHAR, long double, signed char, SCHAR_MIN, SCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uchar
+ * Function: H5T__conv_ldouble_uchar
*
- * Purpose: Convert native long double to native unsigned char using
+ * Purpose: Convert native long double to native unsigned char using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -7919,22 +7919,22 @@ H5T__conv_ldouble_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, UCHAR, long double, unsigned char, 0, UCHAR_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_short
+ * Function: H5T__conv_float_short
*
- * Purpose: Convert native float to native short using
+ * Purpose: Convert native float to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7943,22 +7943,22 @@ H5T__conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ushort
+ * Function: H5T__conv_float_ushort
*
- * Purpose: Convert native float to native unsigned short using
+ * Purpose: Convert native float to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7967,22 +7967,22 @@ H5T__conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_short
+ * Function: H5T__conv_double_short
*
- * Purpose: Convert native double to native short using
+ * Purpose: Convert native double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -7991,22 +7991,22 @@ H5T__conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ushort
+ * Function: H5T__conv_double_ushort
*
- * Purpose: Convert native double to native unsigned short using
+ * Purpose: Convert native double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8015,22 +8015,22 @@ H5T__conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_short
+ * Function: H5T__conv_ldouble_short
*
- * Purpose: Convert native long double to native short using
+ * Purpose: Convert native long double to native short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8039,22 +8039,22 @@ H5T__conv_ldouble_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, SHORT, long double, short, SHRT_MIN, SHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ushort
+ * Function: H5T__conv_ldouble_ushort
*
- * Purpose: Convert native long double to native unsigned short using
+ * Purpose: Convert native long double to native unsigned short using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8063,22 +8063,22 @@ H5T__conv_ldouble_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, USHORT, long double, unsigned short, 0, USHRT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_int
+ * Function: H5T__conv_float_int
*
- * Purpose: Convert native float to native int using
+ * Purpose: Convert native float to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8087,22 +8087,22 @@ H5T__conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_uint
+ * Function: H5T__conv_float_uint
*
- * Purpose: Convert native float to native unsigned int using
+ * Purpose: Convert native float to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8111,22 +8111,22 @@ H5T__conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_int
+ * Function: H5T__conv_double_int
*
- * Purpose: Convert native double to native int using
+ * Purpose: Convert native double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8135,22 +8135,22 @@ H5T__conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_uint
+ * Function: H5T__conv_double_uint
*
- * Purpose: Convert native double to native unsigned int using
+ * Purpose: Convert native double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8159,22 +8159,22 @@ H5T__conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_int
+ * Function: H5T__conv_ldouble_int
*
- * Purpose: Convert native long double to native int using
+ * Purpose: Convert native long double to native int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8183,22 +8183,22 @@ H5T__conv_ldouble_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, INT, long double, int, INT_MIN, INT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_uint
+ * Function: H5T__conv_ldouble_uint
*
- * Purpose: Convert native long double to native unsigned int using
+ * Purpose: Convert native long double to native unsigned int using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8207,22 +8207,22 @@ H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_long
+ * Function: H5T__conv_float_long
*
- * Purpose: Convert native float to native long using
+ * Purpose: Convert native float to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8231,22 +8231,22 @@ H5T__conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ulong
+ * Function: H5T__conv_float_ulong
*
- * Purpose: Convert native float to native unsigned long using
+ * Purpose: Convert native float to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8255,22 +8255,22 @@ H5T__conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_long
+ * Function: H5T__conv_double_long
*
- * Purpose: Convert native double to native long using
+ * Purpose: Convert native double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8279,22 +8279,22 @@ H5T__conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ulong
+ * Function: H5T__conv_double_ulong
*
- * Purpose: Convert native double to native unsigned long using
+ * Purpose: Convert native double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8303,22 +8303,22 @@ H5T__conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_long
+ * Function: H5T__conv_ldouble_long
*
- * Purpose: Convert native long double to native long using
+ * Purpose: Convert native long double to native long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8327,22 +8327,22 @@ H5T__conv_ldouble_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, LONG, long double, long, LONG_MIN, LONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ulong
+ * Function: H5T__conv_ldouble_ulong
*
- * Purpose: Convert native long double to native unsigned long using
+ * Purpose: Convert native long double to native unsigned long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8351,22 +8351,22 @@ H5T__conv_ldouble_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, ULONG, long double, unsigned long, 0, ULONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_llong
+ * Function: H5T__conv_float_llong
*
- * Purpose: Convert native float to native long long using
+ * Purpose: Convert native float to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8375,22 +8375,22 @@ H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_float_ullong
+ * Function: H5T__conv_float_ullong
*
- * Purpose: Convert native float to native unsigned long long using
+ * Purpose: Convert native float to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8399,22 +8399,22 @@ H5T__conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_llong
+ * Function: H5T__conv_double_llong
*
- * Purpose: Convert native double to native long long using
+ * Purpose: Convert native double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8423,22 +8423,22 @@ H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_double_ullong
+ * Function: H5T__conv_double_ullong
*
- * Purpose: Convert native double to native unsigned long long using
+ * Purpose: Convert native double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, November 7, 2003
+ * Programmer: Raymond Lu
+ * Friday, November 7, 2003
*
*-------------------------------------------------------------------------
*/
@@ -8447,22 +8447,22 @@ H5T__conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_llong
+ * Function: H5T__conv_ldouble_llong
*
- * Purpose: Convert native long double to native long long using
+ * Purpose: Convert native long double to native long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8472,23 +8472,23 @@ H5T__conv_ldouble_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, LLONG, long double, long long, LLONG_MIN, LLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_LLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_ldouble_ullong
+ * Function: H5T__conv_ldouble_ullong
*
- * Purpose: Convert native long double to native unsigned long long using
+ * Purpose: Convert native long double to native unsigned long long using
* hardware. This is a fast special case.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Tuesday, Febuary 1, 2005
+ * Programmer: Raymond Lu
+ * Tuesday, Febuary 1, 2005
*
*-------------------------------------------------------------------------
*/
@@ -8498,24 +8498,24 @@ H5T__conv_ldouble_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride,
void *buf, void H5_ATTR_UNUSED *bkg)
{
-H5_GCC_DIAG_OFF(float-equal)
+H5_GCC_DIAG_OFF("float-equal")
H5T_CONV_Fx(LDOUBLE, ULLONG, long double, unsigned long long, 0, ULLONG_MAX);
-H5_GCC_DIAG_ON(float-equal)
+H5_GCC_DIAG_ON("float-equal")
}
#endif /*H5T_CONV_INTERNAL_LDOUBLE_ULLONG*/
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_f_i
+ * Function: H5T__conv_f_i
*
- * Purpose: Convert one floating-point type to an integer. This is
+ * Purpose: Convert one floating-point type to an integer. This is
* the catch-all function for float-integer conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Wednesday, Jan 21, 2004
+ * Programmer: Raymond Lu
+ * Wednesday, Jan 21, 2004
*
*-------------------------------------------------------------------------
*/
@@ -8524,28 +8524,28 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev=NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hssize_t expo; /*source exponent */
+ hssize_t expo; /*source exponent */
hssize_t sign; /*source sign bit value */
uint8_t *int_buf=NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct={NULL, NULL}; /*conversion callback structure */
hbool_t truncated; /*if fraction value is dropped */
hbool_t reverse; /*if reverse order of destination at the end */
@@ -9074,18 +9074,18 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_f_i() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__conv_i_f
+ * Function: H5T__conv_i_f
*
- * Purpose: Convert one integer type to a floating-point type. This is
+ * Purpose: Convert one integer type to a floating-point type. This is
* the catch-all function for integer-float conversions and
* is probably not particularly fast.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
- * Programmer: Raymond Lu
- * Friday, Feb 6, 2004
+ * Programmer: Raymond Lu
+ * Friday, Feb 6, 2004
*
*-------------------------------------------------------------------------
*/
@@ -9094,31 +9094,31 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg)
{
/* Traversal-related variables */
- H5T_t *src_p; /*source datatype */
- H5T_t *dst_p; /*destination datatype */
- H5T_atomic_t src; /*atomic source info */
- H5T_atomic_t dst; /*atomic destination info */
- int direction; /*forward or backward traversal */
- size_t elmtno; /*element number */
- size_t half_size; /*half the type size */
+ H5T_t *src_p; /*source datatype */
+ H5T_t *dst_p; /*destination datatype */
+ H5T_atomic_t src; /*atomic source info */
+ H5T_atomic_t dst; /*atomic destination info */
+ int direction; /*forward or backward traversal */
+ size_t elmtno; /*element number */
+ size_t half_size; /*half the type size */
size_t tsize; /*type size for swapping bytes */
- size_t olap; /*num overlapping elements */
- uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ size_t olap; /*num overlapping elements */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
uint8_t *src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t dbuf[64]; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
- hsize_t expo; /*destination exponent */
- hsize_t expo_max; /*maximal possible exponent value */
+ hsize_t expo; /*destination exponent */
+ hsize_t expo_max; /*maximal possible exponent value */
size_t sign; /*source sign bit value */
hbool_t is_max_neg; /*source is maximal negative value*/
hbool_t do_round; /*whether there is roundup */
uint8_t *int_buf = NULL; /*buffer for temporary value */
size_t buf_size; /*buffer size for temporary value */
- size_t i; /*miscellaneous counters */
- size_t first; /*first bit(MSB) in an integer */
- ssize_t sfirst; /*a signed version of `first' */
+ size_t i; /*miscellaneous counters */
+ size_t first; /*first bit(MSB) in an integer */
+ ssize_t sfirst; /*a signed version of `first' */
H5T_conv_cb_t cb_struct = {NULL, NULL}; /*conversion callback structure */
H5T_conv_ret_t except_ret; /*return of callback function */
hbool_t reverse; /*if reverse the order of destination */
@@ -9305,10 +9305,10 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_NORM_IMPLIED==dst.u.f.norm) {
/* Imply first bit */
H5T__bit_set(int_buf, first, (size_t)1, 0);
- }
- else if (H5T_NORM_NONE==dst.u.f.norm) {
- first++;
- }
+ }
+ else if (H5T_NORM_NONE==dst.u.f.norm) {
+ first++;
+ }
/* Roundup for mantissa */
if(first > dst.u.f.msize) {
@@ -9336,7 +9336,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Check 1st dropoff bit, see if it's set. */
if(H5T__bit_get_d(int_buf, ((first - dst.u.f.msize) - 1), (size_t)1)) {
- /* Check all bits after 1st dropoff bit, see if any of them is set. */
+ /* Check all bits after 1st dropoff bit, see if any of them is set. */
if(((first - dst.u.f.msize) - 1) > 0 && H5T__bit_get_d(int_buf, (size_t)0, ((first - dst.u.f.msize) - 1)))
do_round = 1;
else { /* The .50...0 case */
@@ -9344,7 +9344,7 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(H5T__bit_get_d(int_buf, (first - dst.u.f.msize), (size_t)1))
do_round = 1;
}
- }
+ }
/* Right shift to drop off extra bits */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, buf_size * 8);
@@ -9353,28 +9353,28 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T__bit_inc(int_buf, (size_t)0, buf_size * 8);
do_round = 0;
- /* If integer is like 0x0ff...fff and we need to round up the
- * last f, we get 0x100...000. Treat this special case here.
- */
- if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
- if (H5T_NORM_IMPLIED==dst.u.f.norm) {
- /* The bit at this 1's position was impled already, so this
- * number should be 0x200...000. We need to increment the
- * exponent in this case.
- */
- expo++;
- } else if (H5T_NORM_NONE==dst.u.f.norm) {
- /* Right shift 1 bit to let the carried 1 fit in the mantissa,
- * and increment exponent by 1.
- */
+ /* If integer is like 0x0ff...fff and we need to round up the
+ * last f, we get 0x100...000. Treat this special case here.
+ */
+ if(H5T__bit_get_d(int_buf, dst.u.f.msize, (size_t)1)) {
+ if (H5T_NORM_IMPLIED==dst.u.f.norm) {
+ /* The bit at this 1's position was impled already, so this
+ * number should be 0x200...000. We need to increment the
+ * exponent in this case.
+ */
+ expo++;
+ } else if (H5T_NORM_NONE==dst.u.f.norm) {
+ /* Right shift 1 bit to let the carried 1 fit in the mantissa,
+ * and increment exponent by 1.
+ */
H5T__bit_shift(int_buf, (ssize_t)-1, (size_t)0, buf_size * 8);
- expo++;
- }
- }
+ expo++;
+ }
+ }
}
} else {
/* The bit sequence can fit mantissa part. Left shift to fit in from high-order of
- * bit position. */
+ * bit position. */
H5T__bit_shift(int_buf, (ssize_t)(dst.u.f.msize - first), (size_t)0, dst.u.f.msize);
}
@@ -9484,11 +9484,11 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__conv_i_f() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5T__reverse_order
+ * Function: H5T__reverse_order
*
- * Purpose: Internal assisting function to reverse the order of
+ * Purpose: Internal assisting function to reverse the order of
* a sequence of byte when it's big endian or VAX order.
* The byte sequence simulates the endian order.
*
@@ -9496,8 +9496,8 @@ done:
*
* Failure: Null
*
- * Programmer: Raymond Lu
- * April 26, 2004
+ * Programmer: Raymond Lu
+ * April 26, 2004
*
*-------------------------------------------------------------------------
*/
@@ -9527,7 +9527,7 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
FUNC_LEAVE_NOAPI(SUCCEED)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5T_reclaim
*
@@ -9571,7 +9571,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T_reclaim() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T_reclaim_cb
*
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index cd41a23..e1d8246 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -191,17 +191,17 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
/* The name and value had better not already exist */
for(i = 0; i < dt->shared->u.enumer.nmembs; i++) {
- if(!HDstrcmp(dt->shared->u.enumer.name[i], name))
+ if(!HDstrcmp(dt->shared->u.enumer.name[i], name))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "name redefinition")
- if(!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
+ if(!HDmemcmp((uint8_t *)dt->shared->u.enumer.value + (i * dt->shared->size), value, dt->shared->size))
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "value redefinition")
- } /* end for */
+ }
/* Increase table sizes */
if(dt->shared->u.enumer.nmembs >= dt->shared->u.enumer.nalloc) {
char **names;
uint8_t *values;
- unsigned n = MAX(32, 2*dt->shared->u.enumer.nalloc);
+ unsigned n = MAX(32, 2*dt->shared->u.enumer.nalloc);
if(NULL == (names = (char **)H5MM_realloc(dt->shared->u.enumer.name, n * sizeof(char *))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
@@ -211,7 +211,7 @@ H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
dt->shared->u.enumer.value = values;
dt->shared->u.enumer.nalloc = n;
- } /* end for */
+ }
/* Insert new member at end of member arrays */
dt->shared->u.enumer.sorted = H5T_SORT_NONE;
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 357bb08..a41e94c 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -19,13 +19,13 @@
#include "H5Tmodule.h" /* This source code file is part of the H5T module */
-#include "H5private.h" /* Generic Functions */
+#include "H5private.h" /* Generic Functions */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Pprivate.h" /* Property lists */
-#include "H5MMprivate.h" /* Memory management */
-#include "H5Tpkg.h" /* Datatypes */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5Pprivate.h" /* Property lists */
+#include "H5MMprivate.h" /* Memory management */
+#include "H5Tpkg.h" /* Datatypes */
/* Static local functions */
static H5T_t *H5T__get_native_type(H5T_t *dt, H5T_direction_t direction,
@@ -41,7 +41,7 @@ static herr_t H5T__cmp_offset(size_t *comp_size, size_t *offset, size_t elem_siz
size_t nelems, size_t align, size_t *struct_align);
-
+
/*-------------------------------------------------------------------------
* Function: H5Tget_native_type
*
@@ -107,7 +107,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tget_native_type() */
-
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_type
*
@@ -339,7 +339,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali
case H5T_ENUM:
{
- H5T_path_t *tpath; /* Type conversion info */
+ H5T_path_t *tpath; /* Type conversion info */
hid_t super_type_id, nat_super_type_id;
/* Don't need to do anything special for alignment, offset since the ENUM type usually is integer. */
@@ -530,8 +530,8 @@ done:
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_integer
*
@@ -671,7 +671,7 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_integer() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -679,8 +679,8 @@ H5_GCC_DIAG_ON(duplicated-branches)
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_float
*
@@ -702,7 +702,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
H5T_t *dt=NULL; /* Appropriate native datatype to copy */
hid_t tid=(-1); /* Datatype ID of appropriate native datatype */
size_t align=0; /* Alignment necessary for native datatype */
- size_t native_size=0; /* Datatype size of the native type */
+ size_t native_size=0; /* Datatype size of the native type */
enum match_type { /* The different kinds of floating point types we can match */
H5T_NATIVE_FLOAT_MATCH_FLOAT,
H5T_NATIVE_FLOAT_MATCH_DOUBLE,
@@ -720,50 +720,50 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
if(direction == H5T_DIR_DEFAULT || direction == H5T_DIR_ASCEND) {
if(size<=sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
+ native_size = sizeof(float);
}
else if(size<=sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
#if H5_SIZEOF_LONG_DOUBLE !=0
else if(size<=sizeof(long double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
}
#endif
else { /* If not match, return the biggest datatype */
#if H5_SIZEOF_LONG_DOUBLE !=0
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
#else
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
native_size = sizeof(double);
#endif
- }
+ }
} else {
#if H5_SIZEOF_LONG_DOUBLE !=0
if(size>sizeof(double)) {
match=H5T_NATIVE_FLOAT_MATCH_LDOUBLE;
- native_size = sizeof(long double);
+ native_size = sizeof(long double);
}
else if(size>sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
else {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
- }
+ native_size = sizeof(float);
+ }
#else
if(size>sizeof(float)) {
match=H5T_NATIVE_FLOAT_MATCH_DOUBLE;
- native_size = sizeof(double);
+ native_size = sizeof(double);
}
else {
match=H5T_NATIVE_FLOAT_MATCH_FLOAT;
- native_size = sizeof(float);
- }
+ native_size = sizeof(float);
+ }
#endif
}
@@ -804,7 +804,7 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_float() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
/* Disable warning for intentional identical branches here -QAK */
/*
@@ -812,8 +812,8 @@ H5_GCC_DIAG_ON(duplicated-branches)
* the code below, but early (4.4.7, at least) gcc only allows
* diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(duplicated-branches)
-
+H5_GCC_DIAG_OFF("duplicated-branches")
+
/*-------------------------------------------------------------------------
* Function: H5T__get_native_bitfield
*
@@ -898,22 +898,22 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5T__get_native_bitfield() */
-H5_GCC_DIAG_ON(duplicated-branches)
+H5_GCC_DIAG_ON("duplicated-branches")
+
-
/*-------------------------------------------------------------------------
- * Function: H5T__cmp_offset
+ * Function: H5T__cmp_offset
*
- * Purpose: This function is only for convenience. It computes the
+ * Purpose: This function is only for convenience. It computes the
* compound type size, offset of the member being considered
* and the alignment for the whole compound type.
*
- * Return: Success: Non-negative value.
+ * Return: Success: Non-negative value.
*
- * Failure: Negative value.
+ * Failure: Negative value.
*
- * Programmer: Raymond Lu
- * December 10, 2002
+ * Programmer: Raymond Lu
+ * December 10, 2002
*
*-------------------------------------------------------------------------
*/
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 5c975f6..56f48e0 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -19,9 +19,9 @@
#define H5VMprivate_H
/* Private headers needed by this file */
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5MMprivate.h" /* Memory management */
/* Vector-Vector sequence operation callback */
typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
@@ -41,7 +41,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
/* Other functions */
#define H5VM_vector_cpy(N,DST,SRC) { \
- HDassert(sizeof(*(DST))==sizeof(*(SRC))); \
+ HDassert(sizeof(*(DST))==sizeof(*(SRC))); \
if (SRC) H5MM_memcpy (DST, SRC, (N)*sizeof(*(DST))); \
else HDmemset (DST, 0, (N)*sizeof(*(DST))); \
}
@@ -85,32 +85,32 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off,
#define H5VM_ZERO NULL
H5_DLL hsize_t H5VM_hyper_stride(unsigned n, const hsize_t *size,
- const hsize_t *total_size,
- const hsize_t *offset,
- hsize_t *stride);
+ const hsize_t *total_size,
+ const hsize_t *offset,
+ hsize_t *stride);
H5_DLL htri_t H5VM_hyper_eq(unsigned n, const hsize_t *offset1,
- const hsize_t *size1, const hsize_t *offset2,
- const hsize_t *size2);
+ const hsize_t *size1, const hsize_t *offset2,
+ const hsize_t *size2);
H5_DLL herr_t H5VM_hyper_fill(unsigned n, const hsize_t *_size,
- const hsize_t *total_size,
- const hsize_t *offset, void *_dst,
- unsigned fill_value);
+ const hsize_t *total_size,
+ const hsize_t *offset, void *_dst,
+ unsigned fill_value);
H5_DLL herr_t H5VM_hyper_copy(unsigned n, const hsize_t *size,
- const hsize_t *dst_total_size,
- const hsize_t *dst_offset, void *_dst,
- const hsize_t *src_total_size,
- const hsize_t *src_offset, const void *_src);
+ const hsize_t *dst_total_size,
+ const hsize_t *dst_offset, void *_dst,
+ const hsize_t *src_total_size,
+ const hsize_t *src_offset, const void *_src);
H5_DLL herr_t H5VM_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
- const hsize_t *stride, void *_dst,
- unsigned fill_value);
+ const hsize_t *stride, void *_dst,
+ unsigned fill_value);
H5_DLL herr_t H5VM_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *_size,
- const hsize_t *dst_stride, void *_dst,
- const hsize_t *src_stride, const void *_src);
+ const hsize_t *dst_stride, void *_dst,
+ const hsize_t *src_stride, const void *_src);
H5_DLL herr_t H5VM_stride_copy_s(unsigned n, hsize_t elmt_size, const hsize_t *_size,
- const hssize_t *dst_stride, void *_dst,
- const hssize_t *src_stride, const void *_src);
+ const hssize_t *dst_stride, void *_dst,
+ const hssize_t *src_stride, const void *_src);
H5_DLL herr_t H5VM_array_fill(void *_dst, const void *src, size_t size,
- size_t count);
+ size_t count);
H5_DLL herr_t H5VM_array_down(unsigned n, const hsize_t *total_size,
hsize_t *down);
H5_DLL hsize_t H5VM_array_offset_pre(unsigned n,
@@ -204,7 +204,7 @@ H5VM_vector_zerop_u(int n, const hsize_t *v)
if (!v)
HGOTO_DONE(TRUE)
while (n--)
- if (*v++)
+ if (*v++)
HGOTO_DONE(FALSE)
done:
@@ -241,7 +241,7 @@ H5VM_vector_zerop_s(int n, const hssize_t *v)
if (!v)
HGOTO_DONE(TRUE)
while (n--)
- if (*v++)
+ if (*v++)
HGOTO_DONE(FALSE)
done:
@@ -291,9 +291,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
- * Function: H5VM_vector_cmp_s
+ * Function: H5VM_vector_cmp_s
*
* Purpose: Compares two vectors of the same size and determines if V1 is
* lexicographically less than, equal, or greater than V2.
@@ -308,7 +308,7 @@ done:
*
* Failure: 0 if N is zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
*-------------------------------------------------------------------------
@@ -335,7 +335,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_vector_inc
*
@@ -361,6 +361,7 @@ H5VM_vector_inc(int n, hsize_t *v1, const hsize_t *v2)
/* Lookup table for general log2(n) routine */
static const unsigned char LogTable256[] =
{
+ /* clang-clang-format off */
0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
@@ -377,9 +378,10 @@ static const unsigned char LogTable256[] =
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
+ /* clang-clang-format on */
};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_log2_gen
*
@@ -432,7 +434,7 @@ static const unsigned MultiplyDeBruijnBitPosition[32] =
31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_log2_of2
*
@@ -464,19 +466,19 @@ H5VM_log2_of2(uint32_t n)
return(MultiplyDeBruijnBitPosition[(n * (uint32_t)0x077CB531UL) >> 27]);
} /* H5VM_log2_of2() */
-
+
/*-------------------------------------------------------------------------
- * Function: H5VM_power2up
+ * Function: H5VM_power2up
*
- * Purpose: Round up a number to the next power of 2
+ * Purpose: Round up a number to the next power of 2
*
* Note: Although this routine is 'static' in this file, that's intended
* only as an optimization and the naming (with a single underscore)
* reflects its inclusion in a "private" header file.
*
- * Return: Return the number which is a power of 2
+ * Return: Return the number which is a power of 2
*
- * Programmer: Vailin Choi; Nov 2014
+ * Programmer: Vailin Choi; Nov 2014
*
*-------------------------------------------------------------------------
*/
@@ -495,7 +497,7 @@ H5VM_power2up(hsize_t n)
return(ret_value);
} /* H5VM_power2up */
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_limit_enc_size
*
@@ -522,15 +524,15 @@ H5VM_limit_enc_size(uint64_t limit)
static const unsigned char H5VM_bit_set_g[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
static const unsigned char H5VM_bit_clear_g[8] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB, 0xFD, 0xFE};
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_bit_get
*
* Purpose: Determine the value of the n'th bit in a buffer.
*
- * Note: No range checking on <offset> is performed!
+ * Note: No range checking on <offset> is performed!
*
- * Note #2: Bits are sequentially stored in the buffer, starting with bit
+ * Note #2: Bits are sequentially stored in the buffer, starting with bit
* offset 0 in the first byte's high-bit position, proceeding down
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
@@ -553,15 +555,15 @@ H5VM_bit_get(const unsigned char *buf, size_t offset)
return (hbool_t)((buf[offset / 8] & (H5VM_bit_set_g[offset % 8])) ? TRUE : FALSE);
} /* end H5VM_bit_get() */
-
+
/*-------------------------------------------------------------------------
* Function: H5VM_bit_set
*
* Purpose: Set/reset the n'th bit in a buffer.
*
- * Note: No range checking on <offset> is performed!
+ * Note: No range checking on <offset> is performed!
*
- * Note #2: Bits are sequentially stored in the buffer, starting with bit
+ * Note #2: Bits are sequentially stored in the buffer, starting with bit
* offset 0 in the first byte's high-bit position, proceeding down
* to bit offset 7 in the first byte's low-bit position, then to
* bit offset 8 in the second byte's high-bit position, etc.
diff --git a/src/H5private.h b/src/H5private.h
index f8df821..b1fd8b6 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1517,7 +1517,7 @@ typedef off_t h5_stat_size_t;
#endif /* HDstrtoul */
#ifndef HDstrtoumax
#define HDstrtoumax(S,R,N) strtoumax(S,R,N)
-#endif /* HDstrtoul */
+#endif /* HDstrtoumax */
#ifndef HDstrxfrm
#define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
#endif /* HDstrxfrm */
diff --git a/src/H5public.h b/src/H5public.h
index d76c47b..011c601 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -26,28 +26,28 @@
* it via H5public.h. The #ifndef _H5public_H guard above would
* prevent repeated include.
*/
-#include "H5pubconf.h" /*from configure */
+#include "H5pubconf.h" /* From configure */
/* API Version macro wrapper definitions */
#include "H5version.h"
#ifdef H5_HAVE_FEATURES_H
-#include <features.h> /*for setting POSIX, BSD, etc. compatibility */
+#include <features.h> /* For setting POSIX, BSD, etc. compatibility */
#endif
#ifdef H5_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef H5_STDC_HEADERS
-# include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */
-# include <stdarg.h> /*for variadic functions in H5VLpublic.h */
+# include <limits.h> /* For H5T_NATIVE_CHAR defn in H5Tpublic.h */
+# include <stdarg.h> /* For variadic functions in H5VLpublic.h */
#endif
#ifndef __cplusplus
# ifdef H5_HAVE_STDINT_H
-# include <stdint.h> /*for C9x types */
+# include <stdint.h> /* For C9x types */
# endif
#else
# ifdef H5_HAVE_STDINT_H_CXX
-# include <stdint.h> /*for C9x types when include from C++ */
+# include <stdint.h> /* For C9x types (when included from C++) */
# endif
#endif
#ifdef H5_HAVE_INTTYPES_H
@@ -61,7 +61,7 @@
# define MPICH_SKIP_MPICXX 1
# define OMPI_SKIP_MPICXX 1
# include <mpi.h>
-#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */
+#ifndef MPI_FILE_NULL /* MPIO may be defined in mpi.h already */
# include <mpio.h>
#endif
#endif
@@ -81,12 +81,11 @@ extern "C" {
*/
/* These pragmas are only implemented usefully in gcc 4.6+ */
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
- #define H5_GCC_DIAG_STR(s) #s
- #define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y)
- #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
- #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
+ #define H5_GCC_DIAG_JOINSTR(x, y) x y
+ #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma(#x)
+ #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
- #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x))
+ #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR("-W",x))
#define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop)
#else
#define H5_GCC_DIAG_OFF(x)
@@ -122,8 +121,8 @@ extern "C" {
* The negative failure value is most commonly -1, but don't bet on it. The
* proper way to detect failure is something like:
*
- * if((dset = H5Dopen2(file, name)) < 0)
- * fprintf(stderr, "unable to open the requested dataset\n");
+ * if((dset = H5Dopen2(file, name)) < 0)
+ * fprintf(stderr, "unable to open the requested dataset\n");
*/
typedef int herr_t;
@@ -135,13 +134,13 @@ typedef int herr_t;
* (false), positive (true), or negative (failure). The proper way to test
* for truth from a htri_t function is:
*
- * if ((retval = H5Tcommitted(type))>0) {
- * printf("data type is committed\n");
- * } else if (!retval) {
- * printf("data type is not committed\n");
- * } else {
- * printf("error determining whether data type is committed\n");
- * }
+ * if ((retval = H5Tcommitted(type)) > 0) {
+ * printf("data type is committed\n");
+ * } else if (!retval) {
+ * printf("data type is not committed\n");
+ * } else {
+ * printf("error determining whether data type is committed\n");
+ * }
*/
#ifdef H5_HAVE_STDBOOL_H
#include <stdbool.h>
@@ -182,10 +181,10 @@ typedef long long ssize_t;
* type.
*/
#if H5_SIZEOF_LONG_LONG >= 8
-H5_GCC_DIAG_OFF(long-long)
+H5_GCC_DIAG_OFF("long-long")
typedef unsigned long long hsize_t;
typedef signed long long hssize_t;
-H5_GCC_DIAG_ON(long-long)
+H5_GCC_DIAG_ON("long-long")
# define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG
# define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG
#else
diff --git a/src/H5system.c b/src/H5system.c
index b0b2fad..e03dcf0 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -73,7 +73,7 @@
/* Track whether tzset routine was called */
static hbool_t H5_ntzset = FALSE;
-
+
/*-------------------------------------------------------------------------
* Function: HDfprintf
*
@@ -107,7 +107,7 @@ static hbool_t H5_ntzset = FALSE;
* format_templ in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
int
HDfprintf(FILE *stream, const char *fmt, ...)
{
@@ -473,9 +473,9 @@ HDfprintf(FILE *stream, const char *fmt, ...)
HDva_end(ap);
return nout;
} /* end HDfprintf() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
* Function: HDstrtoll
*
@@ -600,7 +600,7 @@ HDstrtoll(const char *s, const char **rest, int base)
return acc;
} /* end HDstrtoll() */
#endif
-
+
/*-------------------------------------------------------------------------
* Function: HDrand/HDsrand
*
@@ -635,8 +635,8 @@ void HDsrand(unsigned int seed)
}
#endif /* H5_HAVE_RAND_R */
-
-
+
+
/*-------------------------------------------------------------------------
* Function: Pflock
*
@@ -680,7 +680,7 @@ Pflock(int fd, int operation) {
} /* end Pflock() */
#endif /* H5_HAVE_FCNTL */
-
+
/*-------------------------------------------------------------------------
* Function: Nflock
*
@@ -697,7 +697,7 @@ Nflock(int H5_ATTR_UNUSED fd, int H5_ATTR_UNUSED operation) {
return -1;
} /* end Nflock() */
-
+
/*-------------------------------------------------------------------------
* Function: H5_make_time
*
@@ -782,7 +782,7 @@ done:
/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosecond units */
#define _W32_FT_OFFSET (116444736000000000ULL)
-
+
/*-------------------------------------------------------------------------
* Function: Wgettimeofday
*
@@ -834,7 +834,7 @@ Wgettimeofday(struct timeval *tv, struct timezone *tz)
return 0;
} /* end Wgettimeofday() */
-
+
/*-------------------------------------------------------------------------
* Function: Wsetenv
*
@@ -873,7 +873,7 @@ Wsetenv(const char *name, const char *value, int overwrite)
#pragma comment(lib, "advapi32.lib")
#endif
-
+
/*-------------------------------------------------------------------------
* Function: H5_get_win32_times
*
@@ -952,7 +952,7 @@ H5_get_win32_times(H5_timevals_t *tvs /*in,out*/)
#define WloginBuffer_count 256
static char Wlogin_buffer[WloginBuffer_count];
-
+
char*
Wgetlogin(void)
{
@@ -990,7 +990,7 @@ int c99_vsnprintf(char* str, size_t size, const char* format, va_list ap)
return count;
}
-
+
/*-------------------------------------------------------------------------
* Function: Wflock
*
@@ -1058,7 +1058,7 @@ Wnanosleep(const struct timespec *req, struct timespec *rem)
} /* end Wnanosleep() */
-
+
/*-------------------------------------------------------------------------
* Function: Wllround, Wllroundf, Wlround, Wlroundf, Wround, Wroundf
*
@@ -1236,7 +1236,7 @@ done:
#endif /* H5_HAVE_WIN32_API */
-
+
/*-------------------------------------------------------------------------
* Function: H5_build_extpath
*
@@ -1356,7 +1356,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5_build_extpath() */
-
+
/*--------------------------------------------------------------------------
* Function: H5_combine_path
*
@@ -1431,7 +1431,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5_combine_path() */
-
+
/*--------------------------------------------------------------------------
* Function: H5_nanosleep
*
@@ -1463,7 +1463,7 @@ H5_nanosleep(uint64_t nanosec)
#define H5_WIN32_ENV_VAR_BUFFER_SIZE 32767
-
+
/*-------------------------------------------------------------------------
* Function: H5_expand_windows_env_vars()
*
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 311d753..1f29d49 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -20,6 +20,7 @@ set (TEST_LIB_SOURCES
set (TEST_LIB_HEADERS
${HDF5_TEST_SOURCE_DIR}/h5test.h
+ ${HDF5_TEST_SOURCE_DIR}/H5srcdir.h
${HDF5_TEST_SOURCE_DIR}/cache_common.h
${HDF5_TEST_SOURCE_DIR}/external_common.h
${HDF5_TEST_SOURCE_DIR}/external_fname.h
@@ -65,6 +66,17 @@ if (BUILD_SHARED_LIBS)
set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES FOLDER libraries/test)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_TEST_SRC_FORMAT ${HDF5_TEST_LIB_TARGET})
+ else ()
+ clang_format (HDF5_TEST_SRC_FORMAT ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+endif ()
+
#################################################################################
# If filter and vol plugin tests can be tested
#################################################################################
@@ -98,6 +110,13 @@ if (BUILD_SHARED_LIBS)
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_TEST_PLUGIN_TARGET}_FORMAT ${HDF5_TEST_PLUGIN_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -123,6 +142,13 @@ if (BUILD_SHARED_LIBS)
set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_TEST_PLUGIN_TARGET}_FORMAT ${HDF5_TEST_PLUGIN_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -160,6 +186,13 @@ if (BUILD_SHARED_LIBS)
set_target_properties (${HDF5_VOL_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${HDF5_VOL_PLUGIN_LIB_TARGET}_FORMAT ${HDF5_VOL_PLUGIN_LIB_TARGET})
+ endif ()
+
+ #-----------------------------------------------------------------------------
# Copy VOL plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
@@ -178,6 +211,7 @@ endif ()
#################################################################################
set (testhdf5_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/testhdf5.h
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
${HDF5_TEST_SOURCE_DIR}/tarray.c
${HDF5_TEST_SOURCE_DIR}/tattr.c
@@ -217,6 +251,7 @@ set(mirror_vfd_SOURCES
)
set (ttsafe_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.h
${HDF5_TEST_SOURCE_DIR}/ttsafe.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
@@ -311,6 +346,13 @@ macro (ADD_H5_EXE file)
target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (${file} PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${file}_FORMAT ${file})
+ endif ()
endmacro ()
set (H5_TESTS_MULTIPLE
@@ -346,6 +388,13 @@ else ()
endif ()
set_target_properties (chunk_info PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_SRC_chunk_info_FORMAT chunk_info)
+endif ()
+
#-- Adding test for direct_chunk
add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
target_compile_options(direct_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -359,6 +408,12 @@ else ()
endif ()
set_target_properties (direct_chunk PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_direct_chunk_FORMAT direct_chunk)
+endif ()
######### Special handling for multiple sources #############
#-- Adding test for testhdf5
@@ -374,6 +429,13 @@ else ()
endif ()
set_target_properties (testhdf5 PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_testhdf5_FORMAT testhdf5)
+endif ()
+
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
target_compile_options(cache_image PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -387,6 +449,13 @@ else ()
endif ()
set_target_properties (cache_image PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_cache_image_FORMAT cache_image)
+endif ()
+
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
target_compile_options(ttsafe PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -405,6 +474,13 @@ else ()
endif ()
set_target_properties (ttsafe PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_ttsafe_FORMAT ttsafe)
+endif ()
+
######### Special handling for extra link lib of threads #############
#-- Adding test for thread_id
add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
@@ -424,6 +500,13 @@ else ()
endif ()
set_target_properties (thread_id PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_thread_id_FORMAT thread_id)
+endif ()
+
#-- Adding test for mirror_vfd
add_executable (mirror_vfd ${mirror_vfd_SOURCES})
target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -436,6 +519,13 @@ else ()
endif ()
set_target_properties (mirror_vfd PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
+endif ()
+
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################
@@ -496,8 +586,29 @@ set (H5_VDS_SWMR_TESTS
vds_swmr_writer
)
+macro (ADD_H5_VDS_EXE file)
+ add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c ${HDF5_TEST_SOURCE_DIR}/vds_swmr.h)
+ target_include_directories (${file} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+ set_target_properties (${file} PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${file}_FORMAT ${file})
+ endif ()
+endmacro ()
+
foreach (h5_test ${H5_VDS_SWMR_TESTS})
- ADD_H5_EXE(${h5_test})
+ ADD_H5_VDS_EXE(${h5_test})
endforeach ()
#-- Adding test for accum_swmr_reader
@@ -515,6 +626,13 @@ else ()
endif ()
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_accum_swmr_reader_FORMAT accum_swmr_reader)
+endif ()
+
#-- Set accum dependencies
set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader)
@@ -528,17 +646,31 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (filter_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_filter_plugin_FORMAT filter_plugin)
+ endif ()
+
add_executable (vol_plugin ${HDF5_TEST_SOURCE_DIR}/vol_plugin.c)
target_include_directories (vol_plugin PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (vol_plugin SHARED)
target_link_libraries (vol_plugin PRIVATE ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (vol_plugin PROPERTIES FOLDER test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_vol_plugin_FORMAT vol_plugin)
+ endif ()
endif ()
##############################################################################
### U S E C A S E S T E S T S
##############################################################################
-set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
+set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
target_compile_options(use_append_chunk PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (use_append_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -551,7 +683,14 @@ else ()
endif ()
set_target_properties (use_append_chunk PROPERTIES FOLDER test)
-set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_append_chunk_FORMAT use_append_chunk)
+endif ()
+
+set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c ${HDF5_TEST_SOURCE_DIR}/use.h)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
target_compile_options(use_append_mchunks PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (use_append_mchunks PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -564,6 +703,13 @@ else ()
endif ()
set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_append_mchunks_FORMAT use_append_mchunks)
+endif ()
+
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
target_compile_options(use_disable_mdc_flushes PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -577,6 +723,13 @@ else ()
endif ()
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_use_disable_mdc_flushes_FORMAT use_disable_mdc_flushes)
+endif ()
+
if (HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 2371468..8e7a806 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -972,6 +972,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (${genfile} STATIC)
target_link_libraries (${genfile} PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_${genfile}_FORMAT ${genfile})
+ endif ()
endmacro ()
# generator executables
diff --git a/test/big.c b/test/big.c
index 5c1dcda..a0d767f 100644
--- a/test/big.c
+++ b/test/big.c
@@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
- * Modified: Albert Cheng <acheng@hdfgroup.org>
- * September 11, 2010
+ * Modified: Albert Cheng
+ * September 11, 2010
*/
/*
* The purpose of this test is to verify if a virtual file driver can handle:
@@ -53,20 +53,20 @@
*/
#include "h5test.h"
-#define DNAME "big.data"
+#define DNAME "big.data"
-#define WRT_N 50
-#define WRT_SIZE 4*1024
-#define FAMILY_SIZE 1024*1024*1024
+#define WRT_N 50
+#define WRT_SIZE 4*1024
+#define FAMILY_SIZE 1024*1024*1024
#define GB (HDoff_t)0x40000000L
-#define MAX_TRIES 100
+#define MAX_TRIES 100
#if H5_SIZEOF_LONG_LONG >= 8
-# define GB8LL ((unsigned long long)8*1024*1024*1024)
+# define GB8LL ((unsigned long long)8*1024*1024*1024)
#else
-# define GB8LL 0 /*cannot do the test*/
+# define GB8LL 0 /*cannot do the test*/
#endif
/* Define Small, Large, Extra Large, Huge File which
@@ -96,19 +96,19 @@ static int test_family(hid_t fapl);
/* Array used to record all addresses at which data has been written */
/* so far. Used to prevent overlapping writes. */
static hsize_t values_used[WRT_N];
-
+
/*-------------------------------------------------------------------------
- * Function: randll
+ * Function: randll
*
- * Purpose: Create a random long long value.
- * Ensures that a write at this value doesn't overlap any
- * previous write.
+ * Purpose: Create a random long long value.
+ * Ensures that a write at this value doesn't overlap any
+ * previous write.
*
- * Return: Success: Random value
+ * Return: Success: Random value
*
- * Failure: Random value which overlaps another write
+ * Failure: Random value which overlaps another write
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Modifications:
@@ -118,10 +118,10 @@ static hsize_t values_used[WRT_N];
static hsize_t
randll(hsize_t limit, int current_index)
{
- hsize_t acc = 0;
- int overlap = 1;
- int i;
- int tries = 0;
+ hsize_t acc = 0;
+ int overlap = 1;
+ int i;
+ int tries = 0;
/* Generate up to MAX_TRIES random numbers until one of them */
/* does not overlap with any previous writes */
@@ -147,19 +147,19 @@ randll(hsize_t limit, int current_index)
return acc;
}
-
+
/*-------------------------------------------------------------------------
- * Function: is_sparse
+ * Function: is_sparse
*
- * Purpose: Determines if the file system of the current working
- * directory supports holes.
+ * Purpose: Determines if the file system of the current working
+ * directory supports holes.
*
- * Return: Success: Non-zero if holes are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if holes are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, July 15, 1998
*
* Modifications:
@@ -169,8 +169,8 @@ randll(hsize_t limit, int current_index)
static int
is_sparse(void)
{
- int fd;
- h5_stat_t sb;
+ int fd;
+ h5_stat_t sb;
if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0;
if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
@@ -185,19 +185,19 @@ is_sparse(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
- * Function: supports_big
+ * Function: supports_big
*
- * Purpose: Determines if the file system of the current working
- * directory supports big files.
+ * Purpose: Determines if the file system of the current working
+ * directory supports big files.
*
- * Return: Success: Non-zero if big files are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if big files are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* Wednesday, April 18, 2007
*
* Modifications:
@@ -207,7 +207,7 @@ is_sparse(void)
static fsizes_t
supports_big(void)
{
- int fd = -1;
+ int fd = -1;
fsizes_t fsize = NO_FILE;
if((fd=HDopen("y.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
@@ -256,19 +256,19 @@ error:
return fsize;
}
-
+
/*-------------------------------------------------------------------------
- * Function: enough_room
+ * Function: enough_room
*
- * Purpose: Tries to create a bunch of sparse files to see if quotas will
- * get in the way. Some systems also have problems opening
- * enough files and we'll check that too.
+ * Purpose: Tries to create a bunch of sparse files to see if quotas will
+ * get in the way. Some systems also have problems opening
+ * enough files and we'll check that too.
*
- * Return: Success: Non-zero
+ * Return: Success: Non-zero
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Thursday, August 6, 1998
*
* Modifications:
@@ -281,14 +281,14 @@ error:
* 'name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
enough_room(hid_t fapl)
{
- int ret_value=0;
- int fd[68];
- size_t i, size = (size_t)1 << 30;
- char filename[1024], name[1024];
+ int ret_value=0;
+ int fd[68];
+ size_t i, size = (size_t)1 << 30;
+ char filename[1024], name[1024];
/* Initialize file descriptors */
for (i=0; i<NELMTS(fd); i++) fd[i] = -1;
@@ -322,38 +322,38 @@ done:
return ret_value;
}
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
- * Function: writer
+ * Function: writer
*
- * Purpose: Creates a *big* dataset.
+ * Purpose: Creates a *big* dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, April 8, 1998
*
* Modifications:
- * Robb Matzke, 15 Jul 1998
- * Addresses are written to the file DNAME instead of stdout.
+ * Robb Matzke, 15 Jul 1998
+ * Addresses are written to the file DNAME instead of stdout.
*
*-------------------------------------------------------------------------
*/
static int
writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n)
{
- hsize_t size1[4] = {8, 1024, 1024, 1024};
- hsize_t size2[1] = {GB8LL};
- hsize_t hs_start[1];
- hsize_t hs_size[1];
- hid_t file=-1, space1=-1, space2=-1, mem_space=-1, d1=-1, d2=-1;
- int *buf = (int*)HDmalloc (sizeof(int) * WRT_SIZE);
- int i, j;
- FILE *out = HDfopen(DNAME, "w");
+ hsize_t size1[4] = {8, 1024, 1024, 1024};
+ hsize_t size2[1] = {GB8LL};
+ hsize_t hs_start[1];
+ hsize_t hs_size[1];
+ hid_t file=-1, space1=-1, space2=-1, mem_space=-1, d1=-1, d2=-1;
+ int *buf = (int*)HDmalloc (sizeof(int) * WRT_SIZE);
+ int i, j;
+ FILE *out = HDfopen(DNAME, "w");
hid_t dcpl;
switch(testsize){
@@ -431,7 +431,7 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n)
hs_size[0] = WRT_SIZE;
if ((mem_space = H5Screate_simple (1, hs_size, hs_size)) < 0) goto error;
for (i=0; i<wrt_n; i++) {
- /* start position must be at least hs_size from the end */
+ /* start position must be at least hs_size from the end */
hs_start[0] = randll (size2[0]-hs_size[0], i);
HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]);
if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL,
@@ -468,17 +468,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: reader
+ * Function: reader
*
- * Purpose: Reads some data from random locations in the dataset.
+ * Purpose: Reads some data from random locations in the dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: >0
+ * Failure: >0
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
@@ -488,13 +488,13 @@ error:
static int
reader(char *filename, hid_t fapl)
{
- FILE *script = NULL;
- hid_t file = -1, mspace = -1, fspace = -1, d2 = -1;
- char ln[128], *s;
- hsize_t hs_offset[1];
- hsize_t hs_size[1] = {WRT_SIZE};
- int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE);
- int i, j, zero, wrong, nerrors = 0;
+ FILE *script = NULL;
+ hid_t file = -1, mspace = -1, fspace = -1, d2 = -1;
+ char ln[128], *s;
+ hsize_t hs_offset[1];
+ hsize_t hs_size[1] = {WRT_SIZE};
+ int *buf = (int *)HDmalloc(sizeof(int) * WRT_SIZE);
+ int i, j, zero, wrong, nerrors = 0;
/* Open script file */
script = HDfopen(DNAME, "r");
@@ -566,15 +566,15 @@ error:
}
-
+
/*-------------------------------------------------------------------------
- * Function: usage
+ * Function: usage
*
- * Purpose: Print command usage
+ * Purpose: Print command usage
*
- * Return: void
+ * Return: void
*
- * Programmer: Albert Chent
+ * Programmer: Albert Chent
* Mar 28, 2002
*
* Modifications:
@@ -601,8 +601,8 @@ usage(void)
static int
test_sec2(hid_t fapl)
{
- char filename[1024];
- fsizes_t testsize;
+ char filename[1024];
+ fsizes_t testsize;
testsize = supports_big();
if(testsize == NO_FILE) {
@@ -636,8 +636,8 @@ error:
static int
test_stdio(hid_t fapl)
{
- char filename[1024];
- fsizes_t testsize;
+ char filename[1024];
+ fsizes_t testsize;
testsize = supports_big();
if(testsize == NO_FILE) {
@@ -675,7 +675,7 @@ error:
static int
test_family(hid_t fapl)
{
- char filename[1024];
+ char filename[1024];
/* Test huge file with the family driver */
HDputs("Testing big file with the Family Driver ");
@@ -731,24 +731,24 @@ error:
return 1;
} /* end test_family() */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose:
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Friday, April 10, 1998
*
* Modifications:
- * Albert Cheng, 2002/03/28
- * Added command option -fsize.
- * Albert Cheng, 2002/04/19
- * Added command option -c.
+ * Albert Cheng, 2002/03/28
+ * Added command option -fsize.
+ * Albert Cheng, 2002/04/19
+ * Added command option -c.
*
* Raymond Lu, 2007/05/25
* Added similar tests for SEC2 and STDIO drivers.
diff --git a/test/cache.c b/test/cache.c
index bb18728..267f7cd 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -28146,7 +28146,6 @@ check_auto_cache_resize_aux_fcns(unsigned paged)
* Return: void
*
* Programmer: Mike McGreevy
- * <mamcgree@hdfgroup.org>
* 12/16/08
*
* Modifications:
@@ -28174,6 +28173,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
/* Set up the expected array. This is used to maintain a table of the
* expected status of every entry used in this test.
*/
+ /* clang-format off */
struct expected_entry_status expected[150] =
{
/* entry entry in at main flush dep flush dep child flush flush flush */
@@ -28329,6 +28329,7 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
{ HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
};
+ /* clang-format on */
pass = TRUE;
@@ -29008,16 +29009,19 @@ check_flush_deps(unsigned paged)
test_entry_t *base_addr; /* Base address of entries for test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
unsigned u; /* Local index variable */
+
+ /* clang-format off */
struct expected_entry_status expected[5] =
{
- /* entry entry in at main flush dep flush dep child flush flush flush */
- /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
+ /* entry entry in at main flush dep flush dep child flush flush flush */
+ /* type: index: size: cache: addr: dirty: prot: pinned: dsrlzd: srlzd: dest: par type[]: par idx[]: dep npart: dep nchd: dep ndirty chd: order: corked: */
{ PICO_ENTRY_TYPE, 0, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ PICO_ENTRY_TYPE, 1, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ PICO_ENTRY_TYPE, 2, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
};
+ /* clang-format on */
if(paged)
TESTING("flush dependencies (paged aggregation)")
@@ -30970,6 +30974,8 @@ check_flush_deps_order(unsigned paged)
H5C_t * cache_ptr = NULL; /* Metadata cache for this test */
int entry_type = PICO_ENTRY_TYPE; /* Use very small entry size (size of entries doesn't matter) */
unsigned u; /* Local index variable */
+ unsigned flush_order; /* Index for tracking flush order */
+ /* clang-format off */
struct expected_entry_status expected[5] =
{
/* entry entry in at main flush dep flush dep child flush flush flush */
@@ -30980,7 +30986,7 @@ check_flush_deps_order(unsigned paged)
{ PICO_ENTRY_TYPE, 3, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ PICO_ENTRY_TYPE, 4, PICO_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
};
- unsigned flush_order; /* Index for tracking flush order */
+ /* clang-format on */
if(paged)
TESTING("flush dependencies flush order (paged aggregation)")
@@ -33543,6 +33549,7 @@ check_notify_cb(unsigned paged)
test_entry_t * entry_ptr; /* Cache entry to examine/manipulate */
int entry_type = NOTIFY_ENTRY_TYPE; /* Use entry w/notify callback (size of entries doesn't matter) */
unsigned u; /* Local index variable */
+ /* clang-format off */
struct expected_entry_status expected[5] =
{
/* entry entry in at main flush dep flush dep child flush flush flush */
@@ -33553,6 +33560,7 @@ check_notify_cb(unsigned paged)
{ NOTIFY_ENTRY_TYPE, 3, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ NOTIFY_ENTRY_TYPE, 4, NOTIFY_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
};
+ /* clang-format on */
if(paged)
TESTING("'notify' callback (paged)")
@@ -33759,6 +33767,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
/* Set up the expected array. This is used to maintain a table of the
* expected status of every entry used in this test.
*/
+ /* clang-format off */
struct expected_entry_status expected[150] =
{
/* entry entry in at main flush dep flush dep child flush flush flush */
@@ -33914,6 +33923,7 @@ check_metadata_cork(hbool_t fill_via_insertion, unsigned paged)
{ HUGE_ENTRY_TYPE, 148, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ HUGE_ENTRY_TYPE, 149, HUGE_ENTRY_SIZE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE}
} ;
+ /* clang-format on */
pass = TRUE;
@@ -34585,6 +34595,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
H5C_t * cache_ptr = file_ptr->shared->cache;
int i;
herr_t result;
+ /* clang-format off */
struct expected_entry_status expected[36] =
{
/* the expected array is used to maintain a table of the expected status of every
@@ -34599,6 +34610,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
{ HUGE_ENTRY_TYPE, 2, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
{ HUGE_ENTRY_TYPE, 3, HUGE_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE}
};
+ /* clang-format on */
if(pass) {
@@ -34814,6 +34826,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
const int num_huge_entries = 4;
const int num_monster_entries = 32;
herr_t result;
+ /* clang-format off */
struct expected_entry_status expected[36] =
{
/* the expected array is used to maintain a table of the expected status of every
@@ -34860,6 +34873,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
{ MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
{ MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
};
+ /* clang-format on */
if(pass) {
@@ -35193,6 +35207,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
H5C_t * cache_ptr = file_ptr->shared->cache;
int i;
herr_t result;
+ /* clang-format off */
struct expected_entry_status expected[36] =
{
/* the expected array is used to maintain a table of the expected status of every
@@ -35235,6 +35250,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
{ MONSTER_ENTRY_TYPE, 30, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
{ MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,-1,-1,-1,-1,-1,-1,-1}, {-1,-1,-1,-1,-1,-1,-1,-1}, 0, 0, 0, -1, FALSE},
};
+ /* clang-format on */
H5C_auto_size_ctl_t saved_auto_size_ctl;
H5C_auto_size_ctl_t test_auto_size_ctl =
{
@@ -35669,6 +35685,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
test_entry_t * entry_ptr;
test_entry_t * base_addr = NULL;
struct H5C_cache_entry_t * scan_ptr;
+ /* clang-format off */
struct expected_entry_status expected[5] =
{
/* the expected array is used to maintain a table of the expected status of every
@@ -35684,6 +35701,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
{ MONSTER_ENTRY_TYPE, 24, MONSTER_ENTRY_SIZE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, {-1,0,0,0,0,0,0,0}, {-1,0,0,0,0,0,0,0}, 0, 0, 0, -1, FALSE},
{ MONSTER_ENTRY_TYPE, 31, MONSTER_ENTRY_SIZE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, {MONSTER_ENTRY_TYPE,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0}, 1, 0, 0, -1, FALSE},
};
+ /* clang-format on */
if(pass) {
diff --git a/test/error_test.c b/test/error_test.c
index 7c6cf9f..1408c46 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -329,7 +329,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
* 'full_desc' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_long_desc(void)
{
@@ -384,7 +384,7 @@ error:
return -1;
} /* end test_long_desc() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
diff --git a/test/fheap.c b/test/fheap.c
index 1ce7398..18d16a1 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Friday, February 24, 2006
*/
#include "h5test.h"
@@ -20,9 +20,9 @@
* This file needs to access private datatypes from the H5HF package.
* This file also needs to access the fractal heap testing code.
*/
-#define H5HF_FRIEND /*suppress error about including H5HFpkg */
+#define H5HF_FRIEND /*suppress error about including H5HFpkg */
#define H5HF_TESTING
-#include "H5HFpkg.h" /* Fractal heaps */
+#include "H5HFpkg.h" /* Fractal heaps */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
@@ -30,9 +30,9 @@
/* Other private headers that this test requires */
#include "H5CXprivate.h" /* API Contexts */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5MMprivate.h" /* Memory management */
#include "H5VLprivate.h" /* Virtual Object Layer */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Max. testfile name length */
#define FHEAP_FILENAME_LEN 1024
@@ -73,12 +73,18 @@
#define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */
#define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */
#define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */
-#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh) /* Max. # of rows in root indirect block */
-#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh) /* Width of doubling table for heap */
-#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh) /* Max. # of direct block rows in any indirect block */
-#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos) /* Max. # of direct block rows in a indirect block */
-#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) /* Size of a direct block in a given row */
-#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row */
+/* Max. # of rows in root indirect block */
+#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh)
+/* Width of doubling table for heap */
+#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh)
+/* Max. # of direct block rows in any indirect block */
+#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh)
+/* Max. # of direct block rows in a indirect block */
+#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos)
+/* Size of a direct block in a given row */
+#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r)
+/* Free space in a direct block of a given row */
+#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r)
/* The number of settings for testing: page buffering, file space strategy and persisting free-space */
#define NUM_PB_FS 6
@@ -173,18 +179,18 @@ static int check_stats(const H5HF_t *fh, const fheap_heap_state_t *state);
static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids);
-
+
/*-------------------------------------------------------------------------
- * Function: init_small_cparam
+ * Function: init_small_cparam
*
- * Purpose: Initialize heap creation parameter structure with small
+ * Purpose: Initialize heap creation parameter structure with small
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -210,18 +216,18 @@ init_small_cparam(H5HF_create_t *cparam)
return(0);
} /* init_small_cparam() */
-
+
/*-------------------------------------------------------------------------
- * Function: init_large_cparam
+ * Function: init_large_cparam
*
- * Purpose: Initialize heap creation parameter structure with large
+ * Purpose: Initialize heap creation parameter structure with large
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -247,17 +253,17 @@ init_large_cparam(H5HF_create_t *cparam)
return(0);
} /* init_large_cparam() */
-
+
/*-------------------------------------------------------------------------
- * Function: check_stats
+ * Function: check_stats
*
- * Purpose: Verify stats for a heap
+ * Purpose: Verify stats for a heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -310,17 +316,17 @@ error:
return(1);
} /* check_stats() */
-
+
/*-------------------------------------------------------------------------
- * Function: op_memcpy
+ * Function: op_memcpy
*
- * Purpose: Perform 'memcpy' for an object
+ * Purpose: Perform 'memcpy' for an object
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, September 11, 2006
*
*-------------------------------------------------------------------------
@@ -334,11 +340,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
return(SUCCEED);
} /* op_memcpy() */
-
+
/*-------------------------------------------------------------------------
- * Function: add_obj
+ * Function: add_obj
*
- * Purpose: Add an object to heap
+ * Purpose: Add an object to heap
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ any block created for the object:
@@ -350,11 +356,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
* the current state, before any block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -455,17 +461,17 @@ error:
return(1);
} /* add_obj() */
-
+
/*-------------------------------------------------------------------------
- * Function: get_del_string
+ * Function: get_del_string
*
- * Purpose: Return string describing the kind of deletion to perform
+ * Purpose: Return string describing the kind of deletion to perform
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -492,16 +498,16 @@ get_del_string(const fheap_test_param_t *tparam)
return(str);
} /* get_del_string() */
-
+
/*-------------------------------------------------------------------------
- * Function: get_fill_size
+ * Function: get_fill_size
*
- * Purpose: Retrieve the size of objects to "bulk" fill blocks with
+ * Purpose: Retrieve the size of objects to "bulk" fill blocks with
*
- * Return: Size of object to pass down to "fill_heap" routine on
+ * Return: Size of object to pass down to "fill_heap" routine on
* success/can't fail
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 27, 2006
*
*-------------------------------------------------------------------------
@@ -524,17 +530,17 @@ get_fill_size(const fheap_test_param_t *tparam)
return(0);
} /* get_fill_size() */
-
+
/*-------------------------------------------------------------------------
- * Function: begin_test
+ * Function: begin_test
*
- * Purpose: Perform common "test being" operations
+ * Purpose: Perform common "test being" operations
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -545,7 +551,7 @@ get_fill_size(const fheap_test_param_t *tparam)
* test_desc in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
begin_test(fheap_test_param_t *tparam, const char *base_desc,
fheap_heap_ids_t *keep_ids, size_t *fill_size)
@@ -574,18 +580,18 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
/* Success */
return(0);
} /* end begin_test() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/*-------------------------------------------------------------------------
- * Function: reopen_file
+ * Function: reopen_file
*
- * Purpose: Perform common "re-open" operations on file & heap for testing
+ * Purpose: Perform common "re-open" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -632,17 +638,17 @@ error:
return(-1);
} /* end reopen_file() */
-
+
/*-------------------------------------------------------------------------
- * Function: open_heap
+ * Function: open_heap
*
- * Purpose: Perform common "open" operations on file & heap for testing
+ * Purpose: Perform common "open" operations on file & heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -744,17 +750,17 @@ error:
return(-1);
} /* end open_heap() */
-
+
/*-------------------------------------------------------------------------
- * Function: reopen_heap
+ * Function: reopen_heap
*
- * Purpose: Perform common "re-open" operations on heap for testing
+ * Purpose: Perform common "re-open" operations on heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -782,16 +788,16 @@ error:
return -1;
} /* end reopen_heap() */
-
+
/*-------------------------------------------------------------------------
- * Function: close_heap
+ * Function: close_heap
*
- * Purpose: Perform common "close" operations on file & heap for testing
+ * Purpose: Perform common "close" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -850,17 +856,17 @@ error:
return(-1);
} /* end close_heap() */
-
+
/*-------------------------------------------------------------------------
- * Function: del_objs_half_refill
+ * Function: del_objs_half_refill
*
- * Purpose: Remove half of objects from heap and refill
+ * Purpose: Remove half of objects from heap and refill
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -944,17 +950,17 @@ error:
return(1);
} /* del_objs_half_refill() */
-
+
/*-------------------------------------------------------------------------
- * Function: del_objs
+ * Function: del_objs
*
- * Purpose: Remove objects from heap
+ * Purpose: Remove objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -1026,11 +1032,11 @@ error:
return(1);
} /* del_objs() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_heap
+ * Function: fill_heap
*
- * Purpose: Insert (small) objects to fill up the free space in a heap block
+ * Purpose: Insert (small) objects to fill up the free space in a heap block
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ the block has been created:
@@ -1042,11 +1048,11 @@ error:
* the current state, before the block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -1228,17 +1234,17 @@ error:
return(1);
} /* fill_heap() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_root_row
+ * Function: fill_root_row
*
- * Purpose: Fill up a row of direct blocks in the root indirect block
+ * Purpose: Fill up a row of direct blocks in the root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1325,17 +1331,17 @@ error:
return(1);
} /* fill_root_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_partial row
+ * Function: fill_partial row
*
- * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
+ * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -1371,17 +1377,17 @@ error:
return(1);
} /* fill_partial_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_row
+ * Function: fill_row
*
- * Purpose: Fill up entire row of direct blocks in an non-root indirect block
+ * Purpose: Fill up entire row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1405,20 +1411,20 @@ error:
return(1);
} /* fill_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_root_direct
+ * Function: fill_root_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in the root indirect block
* (Generally used to create & fill up direct blocks in a new
* indirect block)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -1446,19 +1452,19 @@ error:
return(1);
} /* fill_root_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect
+ * Function: fill_2nd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a second-level indirect block (which only has
* direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1486,18 +1492,18 @@ error:
return(1);
} /* fill_2nd_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_all_direct
+ * Function: fill_all_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks up to the maximum direct block size
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1525,19 +1531,19 @@ error:
return(1);
} /* fill_all_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect_row
+ * Function: fill_2nd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of second-level indirect block (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1564,19 +1570,19 @@ error:
return(1);
} /* fill_2nd_direct_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_all_2nd_indirect_rows
+ * Function: fill_all_2nd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of second-level indirect blocks (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1603,19 +1609,19 @@ error:
return(1);
} /* fill_2nd_direct_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect
+ * Function: fill_3rd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a third-level indirect block (which
* has one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -1642,19 +1648,19 @@ error:
return(1);
} /* fill_3rd_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect_row
+ * Function: fill_3rd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of third-level indirect block (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1682,19 +1688,19 @@ error:
return(1);
} /* fill_3rd_direct_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_all_3rd_indirect_rows
+ * Function: fill_all_3rd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of third-level indirect blocks (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1722,19 +1728,19 @@ error:
return(1);
} /* fill_all_3rd_direct_rows() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_4th_indirect_row
+ * Function: fill_4th_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1772,19 +1778,19 @@ error:
return(1);
} /* fill_4th_direct_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: fill_all_4th_indirect_rows
+ * Function: fill_all_4th_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1830,16 +1836,16 @@ error:
return(1);
} /* fill_all_4th_direct_rows() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_create
+ * Function: test_create
*
- * Purpose: Create fractal heap
+ * Purpose: Create fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -1847,9 +1853,9 @@ error:
static unsigned
test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Heap address in file */
@@ -1948,16 +1954,16 @@ error:
return 1;
} /* test_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_reopen
+ * Function: test_reopen
*
- * Purpose: Create & reopen a fractal heap
+ * Purpose: Create & reopen a fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -1965,9 +1971,9 @@ error:
static unsigned
test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
@@ -2100,16 +2106,16 @@ error:
return(1);
} /* test_reopen() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_open_twice
+ * Function: test_open_twice
*
- * Purpose: Open a fractal heap twice
+ * Purpose: Open a fractal heap twice
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -2117,11 +2123,11 @@ error:
static unsigned
test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- hid_t file2 = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5F_t *f2 = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ hid_t file2 = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
+ H5F_t *f2 = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
H5HF_t *fh2 = NULL; /* 2nd fractal heap wrapper */
@@ -2277,16 +2283,16 @@ error:
return 1;
} /* test_open_twice() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_delete_open
+ * Function: test_delete_open
*
- * Purpose: Delete opened fractal heap (& open deleted heap)
+ * Purpose: Delete opened fractal heap (& open deleted heap)
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, January 5, 2007
*
*-------------------------------------------------------------------------
@@ -2294,9 +2300,9 @@ error:
static unsigned
test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_create_t test_cparam; /* Creation parameters for heap */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
H5HF_t *fh2 = NULL; /* 2nd fractal heap wrapper */
@@ -2450,16 +2456,16 @@ error:
return 1;
} /* test_delete_open() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_id_limits
+ * Function: test_id_limits
*
- * Purpose: Test limits for heap ID lengths
+ * Purpose: Test limits for heap ID lengths
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2467,9 +2473,9 @@ error:
static unsigned
test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
unsigned deflate_level; /* Deflation level */
@@ -2794,16 +2800,16 @@ error:
return 1;
} /* test_id_limits() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_filtered_create
+ * Function: test_filtered_create
*
- * Purpose: Test creating a heap with I/O filters
+ * Purpose: Test creating a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2811,9 +2817,9 @@ error:
static unsigned
test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -2917,16 +2923,16 @@ error:
return 1;
} /* test_filtered_create() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_size
+ * Function: test_size
*
- * Purpose: Test querying heap size
+ * Purpose: Test querying heap size
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 14, 2007
*
*-------------------------------------------------------------------------
@@ -2934,9 +2940,9 @@ error:
static unsigned
test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
hsize_t empty_heap_size; /* Total size of empty heap on disk */
@@ -3057,7 +3063,7 @@ error:
return 1;
} /* test_size() */
-
+
/*-------------------------------------------------------------------------
* Function: test_reopen_hdr
*
@@ -3195,16 +3201,16 @@ error:
return(1);
} /* test_reopen_hdr() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_weird
+ * Function: test_man_insert_weird
*
- * Purpose: Test inserting "weird" sized objects into absolute heap
+ * Purpose: Test inserting "weird" sized objects into absolute heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -3212,9 +3218,9 @@ error:
static unsigned
test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */
@@ -3299,23 +3305,23 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_weird() */
#ifdef ALL_INSERT_TESTS
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_first
+ * Function: test_man_insert_first
*
- * Purpose: Test inserting first object into absolute heap
+ * Purpose: Test inserting first object into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -3323,9 +3329,9 @@ error:
static unsigned
test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3400,22 +3406,22 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_first() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_second
+ * Function: test_man_insert_second
*
- * Purpose: Test inserting two objects into absolute heap
+ * Purpose: Test inserting two objects into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3423,9 +3429,9 @@ error:
static unsigned
test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3494,23 +3500,23 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_second() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_root_mult
+ * Function: test_man_insert_root_mult
*
- * Purpose: Test inserting mult. objects into absolute heap, up to the
+ * Purpose: Test inserting mult. objects into absolute heap, up to the
* limit of a root direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3518,9 +3524,9 @@ error:
static unsigned
test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3591,24 +3597,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_root_mult() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_force_indirect
+ * Function: test_man_insert_force_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block and forcing the root block to be converted
* into an indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3616,9 +3622,9 @@ error:
static unsigned
test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3696,24 +3702,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_force_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_fill_second
+ * Function: test_man_insert_fill_second
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block and filling the secnod indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3721,9 +3727,9 @@ error:
static unsigned
test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3801,25 +3807,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_fill_second() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_insert_third_direct
+ * Function: test_man_insert_third_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block, filling the secnod indirect block and
* creating a third direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3827,9 +3833,9 @@ error:
static unsigned
test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -3912,24 +3918,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_insert_third_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_row
+ * Function: test_man_fill_first_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 13, 2006
*
*-------------------------------------------------------------------------
@@ -3937,9 +3943,9 @@ error:
static unsigned
test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4007,24 +4013,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_first_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_second_row
+ * Function: test_man_start_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then add another object to start second row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4032,9 +4038,9 @@ error:
static unsigned
test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4109,24 +4115,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_second_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_row
+ * Function: test_man_fill_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then fill the second row also.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4134,9 +4140,9 @@ error:
static unsigned
test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4208,25 +4214,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_second_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_third_row
+ * Function: test_man_start_third_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, fill the second row also, then add another object to
* start the third row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4234,9 +4240,9 @@ error:
static unsigned
test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4318,24 +4324,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_third_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_fourth_row
+ * Function: test_man_fill_fourth_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first four rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4343,9 +4349,9 @@ error:
static unsigned
test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4415,24 +4421,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_fourth_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_root_direct
+ * Function: test_man_fill_all_root_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4440,9 +4446,9 @@ error:
static unsigned
test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4510,24 +4516,24 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_all_root_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_first_recursive_indirect
+ * Function: test_man_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block and create first recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4535,9 +4541,9 @@ error:
static unsigned
test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4610,25 +4616,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_first_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_second_direct_recursive_indirect
+ * Function: test_man_second_direct_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and start second
* direct block in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4636,9 +4642,9 @@ error:
static unsigned
test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4719,25 +4725,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_second_direct_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_recursive_indirect
+ * Function: test_man_fill_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and filling all
* direct blocks in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4745,9 +4751,9 @@ error:
static unsigned
test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4820,26 +4826,26 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_first_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_second_recursive_indirect
+ * Function: test_man_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and adding another
* object to force creation of second recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4847,9 +4853,9 @@ error:
static unsigned
test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -4929,27 +4935,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_second_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_recursive_indirect
+ * Function: test_man_fill_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4957,9 +4963,9 @@ error:
static unsigned
test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5036,27 +5042,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_second_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_recursive_indirect_row
+ * Function: test_man_fill_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -5064,9 +5070,9 @@ error:
static unsigned
test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5135,25 +5141,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_recursive_indirect_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_2nd_recursive_indirect
+ * Function: test_man_start_2nd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the first row of indirect
* blocks and start on first block in second row of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5161,9 +5167,9 @@ error:
static unsigned
test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5243,25 +5249,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_2nd_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_recursive_indirect_two_deep
+ * Function: test_man_recursive_indirect_two_deep
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5269,9 +5275,9 @@ error:
static unsigned
test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5344,26 +5350,26 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_recursive_indirect_two_deep() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_3rd_recursive_indirect
+ * Function: test_man_start_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and start first direct block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5371,9 +5377,9 @@ error:
static unsigned
test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5453,26 +5459,26 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_3rd_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_3rd_recursive_indirect
+ * Function: test_man_fill_first_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill first indirect block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5480,9 +5486,9 @@ error:
static unsigned
test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5563,26 +5569,26 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_first_3rd_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_recursive_indirect_row
+ * Function: test_man_fill_3rd_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* first row of 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5590,9 +5596,9 @@ error:
static unsigned
test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5669,26 +5675,26 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_recursive_indirect_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_3rd_recursive_indirect
+ * Function: test_man_fill_all_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* that are three levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5696,9 +5702,9 @@ error:
static unsigned
test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5775,27 +5781,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_all_3rd_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_4th_recursive_indirect
+ * Function: test_man_start_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and start first direct block that
* is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5803,9 +5809,9 @@ error:
static unsigned
test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -5889,27 +5895,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_4th_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_4th_recursive_indirect
+ * Function: test_man_fill_first_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first (3rd level)
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5917,9 +5923,9 @@ error:
static unsigned
test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -6008,27 +6014,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_first_4th_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_4th_recursive_indirect_row
+ * Function: test_man_fill_4th_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first row of
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6036,9 +6042,9 @@ error:
static unsigned
test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -6119,27 +6125,27 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_4th_recursive_indirect_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_4th_recursive_indirect
+ * Function: test_man_fill_all_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill all rows of
* indirect blocks that are four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6147,9 +6153,9 @@ error:
static unsigned
test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -6230,17 +6236,17 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_all_4th_recursive_indirect() */
#endif /* ALL_INSERT_TESTS */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_start_5th_recursive_indirect
+ * Function: test_man_start_5th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
@@ -6248,11 +6254,11 @@ error:
* that are four levels deep and start first direct block in
* indirect blocks five levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6260,9 +6266,9 @@ error:
static unsigned
test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -6363,22 +6369,22 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_start_5th_recursive_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_bogus
+ * Function: test_man_remove_bogus
*
- * Purpose: Test removing bogus heap IDs
+ * Purpose: Test removing bogus heap IDs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6386,9 +6392,9 @@ error:
static unsigned
test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */
@@ -6516,22 +6522,22 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_bogus() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one
+ * Function: test_man_remove_one
*
- * Purpose: Test removing single object from heap
+ * Purpose: Test removing single object from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6539,9 +6545,9 @@ error:
static unsigned
test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */
@@ -6679,22 +6685,22 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_one() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two
+ * Function: test_man_remove_two
*
- * Purpose: Test removing two objects from heap
+ * Purpose: Test removing two objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -6702,9 +6708,9 @@ error:
static unsigned
test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */
@@ -6871,23 +6877,23 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_two() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one_larger
+ * Function: test_man_remove_one_larger
*
- * Purpose: Test removing single larger (but < standalone size) object
+ * Purpose: Test removing single larger (but < standalone size) object
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -6895,9 +6901,9 @@ error:
static unsigned
test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id[HEAP_ID_LEN]; /* Heap ID for object */
@@ -7039,23 +7045,23 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_one_larger() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_larger
+ * Function: test_man_remove_two_larger
*
- * Purpose: Test removing two larger (but < standalone size) objects
+ * Purpose: Test removing two larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, June 10, 2006
*
*-------------------------------------------------------------------------
@@ -7063,9 +7069,9 @@ error:
static unsigned
test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */
@@ -7278,23 +7284,23 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_two_larger() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_three_larger
+ * Function: test_man_remove_three_larger
*
- * Purpose: Test removing three larger (but < standalone size) objects
+ * Purpose: Test removing three larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -7302,9 +7308,9 @@ error:
static unsigned
test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char heap_id1[HEAP_ID_LEN]; /* Heap ID for first object */
@@ -7577,21 +7583,21 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_three_larger() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_incr_insert_remove
+ * Function: test_man_incr_insert_remove
*
- * Purpose: Test incremental insert & removal of objects in heap
+ * Purpose: Test incremental insert & removal of objects in heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, April 1, 2012
*
*-------------------------------------------------------------------------
@@ -7599,9 +7605,9 @@ error:
static unsigned
test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
unsigned char **heap_id = NULL;
@@ -7700,7 +7706,7 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
HDfree(heap_id);
@@ -7709,18 +7715,18 @@ error:
return 1;
} /* test_man_incr_insert_remove() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_root_direct
+ * Function: test_man_remove_root_direct
*
- * Purpose: Test filling and removing all objects from root direct block in
+ * Purpose: Test filling and removing all objects from root direct block in
* heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7728,16 +7734,17 @@ error:
static unsigned
test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from root direct block of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from root direct block of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7777,23 +7784,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_root_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_direct
+ * Function: test_man_remove_two_direct
*
- * Purpose: Test filling and removing all objects from (first) two direct
+ * Purpose: Test filling and removing all objects from (first) two direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7801,16 +7808,17 @@ error:
static unsigned
test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from two direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from two direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7865,23 +7873,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_two_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_row
+ * Function: test_man_remove_first_row
*
- * Purpose: Test filling and removing all objects from first row of direct
+ * Purpose: Test filling and removing all objects from first row of direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 5, 2006
*
*-------------------------------------------------------------------------
@@ -7889,16 +7897,17 @@ error:
static unsigned
test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7935,23 +7944,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_first_row() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_two_rows
+ * Function: test_man_remove_first_two_rows
*
- * Purpose: Test filling and removing all objects from first two rows of
+ * Purpose: Test filling and removing all objects from first two rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -7959,16 +7968,17 @@ error:
static unsigned
test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8007,23 +8017,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_first_two_rows() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_four_rows
+ * Function: test_man_remove_first_four_rows
*
- * Purpose: Test filling and removing all objects from first four rows of
+ * Purpose: Test filling and removing all objects from first four rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8031,16 +8041,17 @@ error:
static unsigned
test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8083,23 +8094,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_first_four_rows() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_all_root_direct
+ * Function: test_man_remove_all_root_direct
*
- * Purpose: Test filling and removing all objects from all direct blocks
+ * Purpose: Test filling and removing all objects from all direct blocks
* in root indirect block of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8107,16 +8118,17 @@ error:
static unsigned
test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8153,23 +8165,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_all_root_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_2nd_indirect
+ * Function: test_man_remove_2nd_indirect
*
- * Purpose: Test filling and removing all objects up to 2nd level indirect
+ * Purpose: Test filling and removing all objects up to 2nd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8177,16 +8189,17 @@ error:
static unsigned
test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8227,23 +8240,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_2nd_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_remove_3rd_indirect
+ * Function: test_man_remove_3rd_indirect
*
- * Purpose: Test filling and removing all objects up to 3rd level indirect
+ * Purpose: Test filling and removing all objects up to 3rd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -8251,16 +8264,17 @@ error:
static unsigned
test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8305,26 +8319,26 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_remove_3rd_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block
+ * Function: test_man_skip_start_block
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -8332,16 +8346,17 @@ error:
static unsigned
test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "inserting object that is too large for starting block, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "inserting object that is too large for starting block, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8384,24 +8399,24 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_start_block() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_back
+ * Function: test_man_skip_start_block_add_back
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add object which fits in skipped direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8409,16 +8424,17 @@ error:
static unsigned
test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping starting block, then adding object back to first block, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "skipping starting block, then adding object back to first block, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8481,25 +8497,25 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_start_block_add_back() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_skipped
+ * Function: test_man_skip_start_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add objects to fill skipped direct blocks
* and add another object to start on next "normal" block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8507,9 +8523,9 @@ error:
static unsigned
test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -8517,7 +8533,8 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8590,25 +8607,25 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block
+ * Function: test_man_skip_2nd_block
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8616,16 +8633,17 @@ error:
static unsigned
test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8683,16 +8701,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_2nd_block() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block_add_skipped
+ * Function: test_man_skip_2nd_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks).
@@ -8700,11 +8718,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8712,9 +8730,9 @@ error:
static unsigned
test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -8722,8 +8740,9 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "insert object to initial block, then add object too large for starting direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8825,16 +8844,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_2nd_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
+ * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
*
- * Purpose: Test filling initial direct block, then add object small enough
+ * Purpose: Test filling initial direct block, then add object small enough
* for initial block size (to create root indirect block), then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
@@ -8844,11 +8863,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -8856,9 +8875,9 @@ error:
static unsigned
test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -8866,8 +8885,9 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8991,16 +9011,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_row_skip_add_skipped
+ * Function: test_man_fill_row_skip_add_skipped
*
- * Purpose: Test filling first row of direct blocks, then
+ * Purpose: Test filling first row of direct blocks, then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
* of skipped blocks).
@@ -9009,11 +9029,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -9021,9 +9041,9 @@ error:
static unsigned
test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9031,7 +9051,8 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9120,26 +9141,26 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_row_skip_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test adding object too large for all but the last row in the
+ * Purpose: Test adding object too large for all but the last row in the
* direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9147,9 +9168,9 @@ error:
static unsigned
test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9158,8 +9179,9 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -9247,25 +9269,25 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first row of direct
* blocks in indirect block, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9273,9 +9295,9 @@ error:
static unsigned
test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9283,7 +9305,8 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9369,26 +9392,26 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then backfill all direct blocks
* skipped and extend to next "normal" direct block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9396,9 +9419,9 @@ error:
static unsigned
test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9408,8 +9431,9 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9496,27 +9520,27 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, except the last
* one, then insert object insert object that is too large to
* hold in row of 2nd level indirect blocks (forcing the use of
* the next row of 2nd level blocks), then backfill all skipped
* direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -9524,9 +9548,9 @@ error:
static unsigned
test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9535,8 +9559,9 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9635,16 +9660,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then add object that is too
@@ -9654,11 +9679,11 @@ error:
* too large for initial block size in skipped indirect block
* row's direct blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -9666,9 +9691,9 @@ error:
static unsigned
test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9678,8 +9703,9 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9800,25 +9826,25 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9826,9 +9852,9 @@ error:
static unsigned
test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9838,8 +9864,9 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9951,27 +9978,27 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block, then add object too large for first row of
* indirect blocks, (and ranges of skipped blocks), then backfill
* and extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -9979,9 +10006,9 @@ error:
static unsigned
test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -9991,8 +10018,9 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10131,26 +10159,26 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, the insert object
* that is too large to hold in first row of direct blocks of
* 3rd level indirect block, then backfill & extend all skipped
* 3rd level indirect block's direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10158,9 +10186,9 @@ error:
static unsigned
test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10168,7 +10196,8 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10257,16 +10286,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of direct blocks of
@@ -10274,11 +10303,11 @@ error:
* backfill & extend all skipped 2nd level indirect block's direct
* blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10286,9 +10315,9 @@ error:
static unsigned
test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10296,7 +10325,8 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10395,27 +10425,27 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of 2nd level indirect
* blocks of 3rd level indirect block, then backfill & extend all
* skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10423,9 +10453,9 @@ error:
static unsigned
test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10434,8 +10464,9 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10542,28 +10573,28 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first & second rows of 2nd level
* indirect blocks (although this 3rd level indirect block only
* has one row of 2nd level indirect blocks) of 3rd level indirect
- * block, then backfill & extend all skipped direct blocks.
+ * block, then backfill & extend all skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10571,9 +10602,9 @@ error:
static unsigned
test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10582,8 +10613,9 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10694,16 +10726,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row except the last one, fill direct
* blocks in last 3rd level indirect block, then insert object
@@ -10712,11 +10744,11 @@ error:
* use of the next row of 3rd level blocks), then backfill all
* skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -10724,9 +10756,9 @@ error:
static unsigned
test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10735,8 +10767,9 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10852,16 +10885,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row, fill direct blocks in 2nd row 3rd
* level indirect block, fill all direct blocks in 1st row of
@@ -10871,11 +10904,11 @@ error:
* next row of 2nd level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -10883,9 +10916,9 @@ error:
static unsigned
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -10894,8 +10927,8 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variables */
+ unsigned u; /* Local index variables *//* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level indirect blocks, except last one, and insert object too large for 2nd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11017,16 +11050,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks in 4th level indirect block, then
@@ -11034,11 +11067,11 @@ error:
* level indirect blocks of 4th level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -11046,9 +11079,9 @@ error:
static unsigned
test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -11057,8 +11090,9 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11173,16 +11207,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks and 2nd level indirect blocks in 4th
@@ -11192,11 +11226,11 @@ error:
* 3rd level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11204,9 +11238,9 @@ error:
static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -11215,8 +11249,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill 4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11347,16 +11382,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11368,11 +11403,11 @@ error:
* 3rd level indirect block (in 4th level indirect block), then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11380,9 +11415,9 @@ error:
static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -11391,8 +11426,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11556,16 +11592,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in 4th level indirect
@@ -11579,11 +11615,11 @@ error:
* 4th level block), then backfill all skipped direct blocks &
* extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11591,9 +11627,9 @@ error:
static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -11602,8 +11638,9 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11749,16 +11786,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
+ * Function: test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11772,11 +11809,11 @@ error:
* next row of 4th level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11784,9 +11821,9 @@ error:
static unsigned
test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -11795,8 +11832,9 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11978,27 +12016,27 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_frag_simple
+ * Function: test_man_frag_simple
*
- * Purpose: Test inserting objects small enough to fit into first row of
+ * Purpose: Test inserting objects small enough to fit into first row of
* direct blocks, but not to share a block with another object,
* until start-block-size * 2 blocks are reached. Then, go back
* and fill in the space in the blocks skipped.
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -12006,17 +12044,18 @@ error:
static unsigned
test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12110,26 +12149,26 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_frag_simple() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_frag_direct
+ * Function: test_man_frag_direct
*
- * Purpose: Test inserting small object to fit into each direct block
+ * Purpose: Test inserting small object to fit into each direct block
* in root block, but not to share a block with another object,
* Then, go back and fill in the space in the blocks skipped.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12137,9 +12176,9 @@ error:
static unsigned
test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12147,8 +12186,9 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12279,16 +12319,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_frag_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_frag_2nd_direct
+ * Function: test_man_frag_2nd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* inserting small object to fit into each direct block
* in 2nd level indirect block, but not to share a block with
* another object.
@@ -12296,11 +12336,11 @@ error:
*
* Then, go back and remove all the objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12308,9 +12348,9 @@ error:
static unsigned
test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12319,8 +12359,9 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12388,16 +12429,16 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_frag_2nd_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_man_frag_3rd_direct
+ * Function: test_man_frag_3rd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block and
+ * Purpose: Test filling all direct blocks in root indirect block and
* all 2nd level indirect blocks, then
* inserting small object to fit into each direct block
* in 3rd level indirect block, but not to share a block with
@@ -12406,11 +12447,11 @@ error:
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12418,9 +12459,9 @@ error:
static unsigned
test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12429,8 +12470,9 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12506,23 +12548,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_man_frag_3rd_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_one
+ * Function: test_huge_insert_one
*
- * Purpose: Test inserting one huge object in the heap
+ * Purpose: Test inserting one huge object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 7, 2006
*
*-------------------------------------------------------------------------
@@ -12530,9 +12572,9 @@ error:
static unsigned
test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12544,7 +12586,8 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert one huge object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one huge object, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12655,23 +12698,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_huge_insert_one() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_two
+ * Function: test_huge_insert_two
*
- * Purpose: Test inserting two huge objects in the heap
+ * Purpose: Test inserting two huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -12679,9 +12722,9 @@ error:
static unsigned
test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12694,7 +12737,8 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert two huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two huge objects, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12884,23 +12928,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_huge_insert_two() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_three
+ * Function: test_huge_insert_three
*
- * Purpose: Test inserting three huge objects in the heap
+ * Purpose: Test inserting three huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -12908,9 +12952,9 @@ error:
static unsigned
test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -12924,7 +12968,8 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert three huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert three huge objects, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13188,23 +13233,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_huge_insert_three() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_mix
+ * Function: test_huge_insert_mix
*
- * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
+ * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -13212,9 +13257,9 @@ error:
static unsigned
test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -13230,7 +13275,8 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert mix of normal & huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal & huge objects, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13612,21 +13658,21 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_huge_insert_mix() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_filtered_huge
+ * Function: test_filtered_huge
*
- * Purpose: Test storing 'huge' object in a heap with I/O filters
+ * Purpose: Test storing 'huge' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 15, 2006
*
*-------------------------------------------------------------------------
@@ -13634,9 +13680,9 @@ error:
static unsigned
test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -13653,7 +13699,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
size_t old_actual_id_len = 0; /* Old actual ID length */
hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */
hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */
- const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -13829,18 +13876,18 @@ error:
return(1);
} /* test_filtered_huge() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_one
+ * Function: test_tiny_insert_one
*
- * Purpose: Test inserting one tiny object in the heap
+ * Purpose: Test inserting one tiny object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -13848,9 +13895,9 @@ error:
static unsigned
test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -13862,7 +13909,8 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert one tiny object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one tiny object, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13973,23 +14021,23 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_tiny_insert_one() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_two
+ * Function: test_tiny_insert_two
*
- * Purpose: Test inserting two tiny objects in the heap
+ * Purpose: Test inserting two tiny objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -13997,9 +14045,9 @@ error:
static unsigned
test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -14012,7 +14060,8 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert two tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two tiny objects, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14202,24 +14251,24 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_tiny_insert_two() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_mix
+ * Function: test_tiny_insert_mix
*
- * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
+ * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
* the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14227,9 +14276,9 @@ error:
static unsigned
test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
@@ -14247,7 +14296,8 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s";
/* Perform common test initialization operations */
if(begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14809,21 +14859,21 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_tiny_insert_mix() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_direct
+ * Function: test_filtered_man_root_direct
*
- * Purpose: Test storing one 'managed' object in a heap with I/O filters
+ * Purpose: Test storing one 'managed' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14831,9 +14881,9 @@ error:
static unsigned
test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -14848,7 +14898,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -14981,21 +15032,21 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_filtered_man_root_direct() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_indirect
+ * Function: test_filtered_man_root_indirect
*
- * Purpose: Test storing several objects in a 'managed heap with I/O filters
+ * Purpose: Test storing several objects in a 'managed heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 24, 2006
*
*-------------------------------------------------------------------------
@@ -15003,9 +15054,9 @@ error:
static unsigned
test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -15021,7 +15072,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -15306,25 +15358,25 @@ error:
H5E_BEGIN_TRY {
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_filtered_man_root_indirect() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_random
+ * Function: test_random
*
- * Purpose: Test inserting random sized objects into a heap, and read
+ * Purpose: Test inserting random sized objects into a heap, and read
* them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 9, 2006
*
*-------------------------------------------------------------------------
@@ -15332,9 +15384,9 @@ error:
static unsigned
test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -15510,21 +15562,21 @@ error:
return(1);
} /* test_random() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_random_pow2
+ * Function: test_random_pow2
*
- * Purpose: Test inserting random sized objects with a "power of 2
+ * Purpose: Test inserting random sized objects with a "power of 2
* distribution" (which favors small objects) into a heap,
* and read them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -15532,9 +15584,9 @@ error:
static unsigned
test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -15721,16 +15773,16 @@ error:
return(1);
} /* test_random_pow2() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_write
+ * Function: test_write
*
- * Purpose: Test inserting objects, then changing the value for them.
+ * Purpose: Test inserting objects, then changing the value for them.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, December 18, 2006
*
*-------------------------------------------------------------------------
@@ -15750,9 +15802,9 @@ static size_t test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATT
static unsigned
test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
H5HF_create_t tmp_cparam; /* Local heap creation parameters */
@@ -16000,23 +16052,23 @@ error:
H5MM_xfree(rewrite_obj);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_write() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_bug1
+ * Function: test_bug1
*
- * Purpose: Test inserting several objects, then deleting one and
+ * Purpose: Test inserting several objects, then deleting one and
* re-inserting an object, along with opening and closing
* the file.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, November 28, 2006
*
*-------------------------------------------------------------------------
@@ -16024,9 +16076,9 @@ error:
static unsigned
test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
- hid_t file = -1; /* File ID */
- char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
- H5F_t *f = NULL; /* Internal file object pointer */
+ hid_t file = -1; /* File ID */
+ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
+ H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
size_t id_len; /* Size of fractal heap IDs */
@@ -16175,22 +16227,22 @@ error:
H5MM_xfree(keep_ids.offs);
if(fh)
H5HF_close(fh);
- H5Fclose(file);
+ H5Fclose(file);
} H5E_END_TRY;
return(1);
} /* test_bug1() */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test the fractal heap code
+ * Purpose: Test the fractal heap code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -16201,14 +16253,14 @@ main(void)
fheap_test_param_t tparam; /* Testing parameters */
H5HF_create_t small_cparam; /* Creation parameters for "small" heap */
H5HF_create_t large_cparam; /* Creation parameters for "large" heap */
- hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */
- hid_t pb_fapl = -1; /* File access property list for data files */
- hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */
+ hid_t fapl = -1, def_fapl = -1; /* File access property list for data files */
+ hid_t pb_fapl = -1; /* File access property list for data files */
+ hid_t fcpl = -1, def_fcpl = -1; /* File creation property list for data files */
fheap_test_type_t curr_test; /* Current test being worked on */
unsigned u, v; /* Local index variable */
- unsigned nerrors = 0; /* Cumulative error count */
+ unsigned nerrors = 0; /* Cumulative error count */
unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */
- int ExpressMode; /* Express testing level */
+ int ExpressMode; /* Express testing level */
const char *envval; /* Environment variable */
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
diff --git a/test/file_image.c b/test/file_image.c
index 0d4873a..d784df2 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -67,7 +67,7 @@ typedef struct {
H5FD_file_image_op_t free_src;
} udata_t;
-
+
/******************************************************************************
* Function: test_properties
*
@@ -162,7 +162,7 @@ error:
return retval;
} /* end test_properties() */
-
+
/******************************************************************************
* Function: malloc_cb
*
@@ -185,7 +185,7 @@ malloc_cb(size_t size, H5FD_file_image_op_t op, void *udata)
return HDmalloc(size);
}
-
+
/******************************************************************************
* Function: memcpy_cb
*
@@ -208,7 +208,7 @@ memcpy_cb(void *dest, const void *src, size_t size, H5FD_file_image_op_t op, voi
return HDmemcpy(dest, src, size);
}
-
+
/******************************************************************************
* Function: realloc_cb
*
@@ -231,7 +231,7 @@ realloc_cb(void *ptr, size_t size, H5FD_file_image_op_t op, void *udata)
return HDrealloc(ptr,size);
}
-
+
/******************************************************************************
* Function: free_cb
*
@@ -253,7 +253,7 @@ free_cb(void *ptr, H5FD_file_image_op_t op, void *udata)
return(SUCCEED);
}
-
+
/******************************************************************************
* Function: udata_copy_cb
*
@@ -277,7 +277,7 @@ udata_copy_cb(void *udata)
return udata;
}
-
+
/******************************************************************************
* Function: udata_free_cb
*
@@ -301,7 +301,7 @@ udata_free_cb(void *udata)
return(SUCCEED);
}
-
+
/******************************************************************************
* Function: reset_udata
*
@@ -320,7 +320,7 @@ reset_udata(udata_t *u)
u->malloc_src = u->memcpy_src = u->realloc_src = u->free_src = H5FD_FILE_IMAGE_OP_NO_OP;
}
-
+
/******************************************************************************
* Function: test_callbacks
*
@@ -509,7 +509,7 @@ error:
return 1;
} /* test_callbacks() */
-
+
/******************************************************************************
* Function: test_core
*
@@ -657,7 +657,7 @@ error:
return 1;
} /* end test_core() */
-
+
/******************************************************************************
* Function: test_get_file_image
*
@@ -678,11 +678,11 @@ error:
* 'member_file_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static int
test_get_file_image(const char * test_banner,
const int file_name_num,
- hid_t fapl,
+ hid_t fapl,
hbool_t user)
{
char file_name[1024] = "\0";
@@ -783,7 +783,7 @@ test_get_file_image(const char * test_banner,
ssize_t member_size;
ssize_t size_remaining;
- /*
+ /*
* Modifications need to be made to accommodate userblock when
* H5Fget_file_image() works for family driver
*/
@@ -855,7 +855,7 @@ test_get_file_image(const char * test_banner,
* the remainder of the file is all '\0's.
*/
file_size = (ssize_t)stat_buf.st_size;
- if(user) {
+ if(user) {
VERIFY(file_size > USERBLOCK_SIZE, "file size !> userblock size.");
file_size -= USERBLOCK_SIZE;
}
@@ -873,7 +873,7 @@ test_get_file_image(const char * test_banner,
fd = HDopen(file_name, O_RDONLY);
VERIFY(fd >= 0, "HDopen() failed.");
- if(user) {
+ if(user) {
HDoff_t off;
/* Position at userblock */
@@ -945,9 +945,9 @@ test_get_file_image(const char * test_banner,
error:
return 1;
} /* end test_get_file_image() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
+
-
/******************************************************************************
* Function: test_get_file_image_error_rejection
*
@@ -1335,28 +1335,28 @@ main(void)
/* Perform tests with/without user block */
for(user = FALSE; user <= TRUE; user++) {
- /* test H5Fget_file_image() with sec2 driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_sec2(fapl) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with sec2 driver",
+ /* test H5Fget_file_image() with sec2 driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_sec2(fapl) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with sec2 driver",
0, fapl, user);
- /* test H5Fget_file_image() with stdio driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_stdio(fapl) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with stdio driver",
+ /* test H5Fget_file_image() with stdio driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_stdio(fapl) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with stdio driver",
1, fapl, user);
- /* test H5Fget_file_image() with core driver */
- fapl = H5Pcreate(H5P_FILE_ACCESS);
- if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0)
- errors++;
- else
- errors += test_get_file_image("H5Fget_file_image() with core driver",
+ /* test H5Fget_file_image() with core driver */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ if(H5Pset_fapl_core(fapl, (size_t)(64 *1024), TRUE) < 0)
+ errors++;
+ else
+ errors += test_get_file_image("H5Fget_file_image() with core driver",
2, fapl, user);
} /* end for */
diff --git a/test/h5test.c b/test/h5test.c
index d5a5261..2f5d7be 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, November 19, 1998
*
* Purpose: Provides support functions for most of the hdf5 tests cases.
@@ -202,7 +202,7 @@ h5_clean_files(const char *base_name[], hid_t fapl)
* sub_filename in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
void
h5_delete_test_file(const char *base_name, hid_t fapl)
{
@@ -252,7 +252,7 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
return;
} /* end h5_delete_test_file() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
@@ -1361,7 +1361,7 @@ h5_dump_info_object(MPI_Info info)
* temp in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
h5_stat_size_t
h5_get_file_size(const char *filename, hid_t fapl)
{
@@ -1463,7 +1463,7 @@ h5_get_file_size(const char *filename, hid_t fapl)
return(-1);
} /* end get_file_size() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*
* This routine is designed to provide equivalent functionality to 'printf'
diff --git a/test/ntypes.c b/test/ntypes.c
index f1d2449..34425c4 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* October 14, 2001
*
- * Purpose: Tests the H5Tget_native_type function.
+ * Purpose: Tests the H5Tget_native_type function.
*/
#include "h5test.h"
@@ -30,23 +30,23 @@ const char *FILENAME[] = {
#define DIM3 20
-int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
-short spoints2[DIM0][DIM1], scheck2[DIM0][DIM1];
-int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
+int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
+short spoints2[DIM0][DIM1], scheck2[DIM0][DIM1];
+int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
-#define DSET_ATOMIC_NAME_1 "atomic_type_1"
-#define DSET_ATOMIC_NAME_2 "atomic_type_2"
-#define DSET_ATOMIC_NAME_3 "atomic_type_3"
-#define DSET_ATOMIC_NAME_4 "atomic_type_4"
-#define DSET_ATOMIC_NAME_5 "atomic_type_5"
+#define DSET_ATOMIC_NAME_1 "atomic_type_1"
+#define DSET_ATOMIC_NAME_2 "atomic_type_2"
+#define DSET_ATOMIC_NAME_3 "atomic_type_3"
+#define DSET_ATOMIC_NAME_4 "atomic_type_4"
+#define DSET_ATOMIC_NAME_5 "atomic_type_5"
#define DSET_COMPOUND_NAME "compound_type"
#define DSET_COMPOUND_NAME_2 "compound_type_2"
#define DSET_COMPOUND_NAME_3 "compound_type_3"
#define DSET_COMPOUND_NAME_4 "compound_type_4"
-#define DSET_ENUM_NAME "enum_type"
-#define DSET_ARRAY_NAME "array_type"
-#define DSET_ARRAY2_NAME "array_type_2"
-#define DSET_VL_NAME "vl_type"
+#define DSET_ENUM_NAME "enum_type"
+#define DSET_ARRAY_NAME "array_type"
+#define DSET_ARRAY2_NAME "array_type_2"
+#define DSET_VL_NAME "vl_type"
#define DSET_VLSTR_NAME "vlstr_type"
#define DSET_STR_NAME "str_type"
#define DSET_OPAQUE_NAME "opaque_type"
@@ -55,23 +55,23 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
#define SPACE1_DIM1 4
#define SPACE1_RANK 1
-#define SPACE2_RANK 2
-#define SPACE2_DIM1 10
-#define SPACE2_DIM2 10
+#define SPACE2_RANK 2
+#define SPACE2_DIM1 10
+#define SPACE2_DIM2 10
#define BITFIELD_ENUMB 8
-
+
/*-------------------------------------------------------------------------
- * Function: test_atomic_dtype
+ * Function: test_atomic_dtype
*
- * Purpose: Test H5Tget_native_type for atomic datatype
+ * Purpose: Test H5Tget_native_type for atomic datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -80,10 +80,10 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
static herr_t
test_atomic_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1;
- int i, j, n;
- hsize_t dims[2];
+ int i, j, n;
+ hsize_t dims[2];
void *tmp = NULL;
TESTING("atomic datatype");
@@ -273,18 +273,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype2
+ * Function: test_compound_dtype2
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -304,13 +304,13 @@ test_compound_dtype2(hid_t file)
s2 st;
unsigned long long l;
} s1;
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1,
tid_m2 = -1, mem_id = -1, nest_mem_id = -1;
- int i, j, n;
- hsize_t dims[2];
+ int i, j, n;
+ hsize_t dims[2];
s1 *temp_point = NULL, *temp_check = NULL;
- s1 *points = NULL, *check = NULL;
+ s1 *points = NULL, *check = NULL;
void *tmp = NULL, *bkg = NULL;
TESTING("nested compound datatype");
@@ -572,18 +572,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype
+ * Function: test_compound_dtype
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -597,10 +597,10 @@ test_compound_dtype(hid_t file)
unsigned int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, mem_id = -1;
- int i, j, n;
- hsize_t dims[2];
+ int i, j, n;
+ hsize_t dims[2];
s1 *temp_point = NULL;
s1 *temp_check = NULL;
s1 *points = NULL;
@@ -772,18 +772,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype3
+ * Function: test_compound_dtype3
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -797,14 +797,14 @@ test_compound_dtype3(hid_t file)
int a[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1,
tid_m2 = -1, mem_id = -1, nest_mem_id = -1;
hsize_t array_dims[1] = {5};
- int i, j, k, n;
- hsize_t dims[2];
+ int i, j, k, n;
+ hsize_t dims[2];
s1 *temp_point = NULL, *temp_check = NULL;
- s1 *points = NULL, *check = NULL;
+ s1 *points = NULL, *check = NULL;
void *tmp = NULL, *bkg = NULL;
TESTING("compound datatype with array as field");
@@ -997,18 +997,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_compound_opaque
+ * Function: test_compound_opaque
*
- * Purpose: Test H5Tget_native_type for compound datatype with opaque field
+ * Purpose: Test H5Tget_native_type for compound datatype with opaque field
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Quincey Koziol
- * January 31, 2004
+ * Programmer: Quincey Koziol
+ * January 31, 2004
*
* Modifications:
*
@@ -1022,13 +1022,13 @@ test_compound_opaque(hid_t file)
unsigned char o[5];
long long l;
} s1;
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid_m = -1,
mem_id = -1;
- int i, j, k, n;
- hsize_t dims[2];
+ int i, j, k, n;
+ hsize_t dims[2];
s1 *temp_point = NULL, *temp_check = NULL;
- s1 *points = NULL, *check = NULL;
+ s1 *points = NULL, *check = NULL;
void *tmp = NULL, *bkg = NULL;
TESTING("compound datatype with opaque field");
@@ -1209,18 +1209,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_enum_dtype
+ * Function: test_enum_dtype
*
- * Purpose: Test H5Tget_native_type for enumerate datatype
+ * Purpose: Test H5Tget_native_type for enumerate datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1229,10 +1229,10 @@ error:
static herr_t
test_enum_dtype(hid_t file)
{
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t tid = -1, tid_m = -1, dtype = -1, native_type = -1;
- int i, j, n;
- hsize_t dims[2];
+ int i, j, n;
+ hsize_t dims[2];
void *tmp = NULL;
short colors[8];
unsigned char sub_colors[16];
@@ -1351,18 +1351,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_array_dtype
+ * Function: test_array_dtype
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1376,12 +1376,12 @@ test_array_dtype(hid_t file)
int i;
long long l;
} s1;
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid2 = -1, tid3 = -1, tid_m = -1;
- int i, j, k, n;
- hsize_t space_dims[2], array_dims[1]={5};
+ int i, j, k, n;
+ hsize_t space_dims[2], array_dims[1]={5};
s1 *temp_point = NULL, *temp_check = NULL;
- s1 *points = NULL, *check = NULL;
+ s1 *points = NULL, *check = NULL;
void *tmp = NULL;
TESTING("array of compound datatype");
@@ -1518,18 +1518,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_array_dtype2
+ * Function: test_array_dtype2
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1538,10 +1538,10 @@ error:
static herr_t
test_array_dtype2(hid_t file)
{
- hid_t dataset = -1, space = -1;
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, tid = -1, tid_m = -1;
- int i, j, k, n;
- hsize_t space_dims[2], array_dims[1] = {5};
+ int i, j, k, n;
+ hsize_t space_dims[2], array_dims[1] = {5};
void *tmp = NULL;
TESTING("array of atomic datatype");
@@ -1641,18 +1641,18 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_vl_dtype
+ * Function: test_vl_dtype
*
- * Purpose: Test H5Tget_native_type for variable length datatype
+ * Purpose: Test H5Tget_native_type for variable length datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1664,10 +1664,10 @@ test_vl_dtype(hid_t file)
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
- hsize_t dims1[] = {SPACE1_DIM1};
- hid_t dataset = -1, space = -1;
+ hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t dataset = -1, space = -1;
hid_t dtype = -1, native_type = -1, nat_super_type = -1, tid = -1, tid2 = -1, tid_m = -1, tid_m2 = -1;
- size_t i, j, k;
+ size_t i, j, k;
void **tmp = NULL;
TESTING("variable length datatype");
@@ -1825,18 +1825,18 @@ error:
return -1;
} /* end test_vl_type() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_vlstr_dtype
+ * Function: test_vlstr_dtype
*
- * Purpose: Test H5Tget_native_type for variable length string datatype
+ * Purpose: Test H5Tget_native_type for variable length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1845,18 +1845,19 @@ error:
static herr_t
test_vlstr_dtype(hid_t file)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1]= {
"Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
"testing whether that nation or any nation so conceived and so dedicated can long endure."
- }; /* Information to write */
+ };
char *rdata[SPACE1_DIM1]; /* Information read in */
hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
/* Output message about test being performed */
@@ -1951,18 +1952,18 @@ error:
return -1;
} /* end test_vlstr_dtype() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_str_dtype
+ * Function: test_str_dtype
*
- * Purpose: Test H5Tget_native_type for fixed-length string datatype
+ * Purpose: Test H5Tget_native_type for fixed-length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1978,10 +1979,10 @@ test_str_dtype(hid_t file)
"4th"
}; /* Information to write */
char rdata[SPACE1_DIM1][4]; /* Information read in */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
/* Output message about test being performed */
@@ -2063,18 +2064,18 @@ error:
return -1;
} /* end test_str_dtype() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype
+ * Function: test_refer_dtype
*
- * Purpose: Test H5Tget_native_type for reference datatype
+ * Purpose: Test H5Tget_native_type for reference datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2090,11 +2091,11 @@ test_refer_dtype(hid_t file)
float c;
} s1_t;
- hid_t dataset = -1; /* Dataset ID */
- hid_t group = -1; /* Group ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
- hsize_t dims1[] = {1};
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t group = -1; /* Group ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hsize_t dims1[] = {1};
H5O_type_t obj_type; /* Object type */
hobj_ref_t *wbuf = NULL, /* buffer to write to disk */
*rbuf = NULL; /* buffer read from disk */
@@ -2233,18 +2234,18 @@ error:
return -1;
} /* test_refer_dtype() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype2
+ * Function: test_refer_dtype2
*
- * Purpose: Test H5Tget_native_type for reference
+ * Purpose: Test H5Tget_native_type for reference
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2253,10 +2254,10 @@ error:
static herr_t
test_refer_dtype2(hid_t file)
{
- hid_t dset1 = -1, /* Dataset ID */
+ hid_t dset1 = -1, /* Dataset ID */
dset2 = -1; /* Dereferenced dataset ID */
- hid_t sid1 = -1, /* Dataspace ID #1 */
- sid2 = -1; /* Dataspace ID #2 */
+ hid_t sid1 = -1, /* Dataspace ID #1 */
+ sid2 = -1; /* Dataspace ID #2 */
hid_t dtype = -1, native_type = -1;
hsize_t dims1[] = { 1 }, dims2[] = { SPACE2_DIM1, SPACE2_DIM2 };
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
@@ -2447,18 +2448,18 @@ error:
return -1;
} /* test_refer_dtype2() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_opaque_dtype
+ * Function: test_opaque_dtype
*
- * Purpose: Test H5Tget_native_type for opaque datatype
+ * Purpose: Test H5Tget_native_type for opaque datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2467,11 +2468,11 @@ error:
static herr_t
test_opaque_dtype(hid_t file)
{
- hid_t type = -1, space = -1, dset = -1;
+ hid_t type = -1, space = -1, dset = -1;
hid_t dataset = -1, dtype = -1, native_type = -1;
size_t i;
unsigned char wbuf[32], rbuf[32];
- hsize_t nelmts;
+ hsize_t nelmts;
TESTING("opaque datatype");
@@ -2533,18 +2534,18 @@ error:
return -1;
} /* test_opaque_dtype */
-
+
/*-------------------------------------------------------------------------
- * Function: test_bitfield_dtype
+ * Function: test_bitfield_dtype
*
- * Purpose: Test H5Tget_native_type for bitfield datatype
+ * Purpose: Test H5Tget_native_type for bitfield datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
* Raymond Lu
@@ -2556,14 +2557,14 @@ error:
static herr_t
test_bitfield_dtype(hid_t file)
{
- hid_t type=-1, space=-1, dset1=-1, dset2=-1;
+ hid_t type=-1, space=-1, dset1=-1, dset2=-1;
hid_t dataset1=-1, dataset2=-1, dtype=-1, native_type=-1;
- size_t ntype_size, i;
- unsigned char wbuf[BITFIELD_ENUMB*sizeof(int)];
+ size_t ntype_size, i;
+ unsigned char wbuf[BITFIELD_ENUMB*sizeof(int)];
unsigned char *p=NULL;
void *rbuf = NULL;
unsigned int intw[BITFIELD_ENUMB], intr[BITFIELD_ENUMB];
- hsize_t nelmts;
+ hsize_t nelmts;
TESTING("bitfield datatype");
@@ -2665,7 +2666,7 @@ error:
return -1;
} /* test_bitfield_dtype */
-
+
/*-------------------------------------------------------------------------
* Function: test_ninteger
*
@@ -2675,7 +2676,7 @@ error:
* Return: Success: 0
* Failure: -1
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* September 3, 2004
*
* Modifications:
@@ -2845,14 +2846,14 @@ error:
return -1;
} /* end test_ninteger() */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test H5Tget_native_type for different datatype
+ * Purpose: Test H5Tget_native_type for different datatype
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2861,9 +2862,9 @@ error:
int
main(void)
{
- hid_t file, fapl;
- int nerrors = 0;
- char filename[1024];
+ hid_t file, fapl;
+ int nerrors = 0;
+ char filename[1024];
h5_reset();
fapl = h5_fileaccess();
@@ -2872,21 +2873,21 @@ main(void)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
- nerrors += test_atomic_dtype(file) < 0 ? 1 : 0;
- nerrors += test_compound_dtype(file) < 0 ? 1 : 0;
- nerrors += test_compound_dtype2(file) < 0 ? 1 : 0;
- nerrors += test_compound_dtype3(file) < 0 ? 1 : 0;
- nerrors += test_compound_opaque(file) < 0 ? 1 : 0;
- nerrors += test_enum_dtype(file) < 0 ? 1 : 0;
- nerrors += test_array_dtype(file) < 0 ? 1 : 0;
- nerrors += test_array_dtype2(file) < 0 ? 1 : 0;
- nerrors += test_vl_dtype(file) < 0 ? 1 : 0;
- nerrors += test_vlstr_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_atomic_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_compound_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_compound_dtype2(file) < 0 ? 1 : 0;
+ nerrors += test_compound_dtype3(file) < 0 ? 1 : 0;
+ nerrors += test_compound_opaque(file) < 0 ? 1 : 0;
+ nerrors += test_enum_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_array_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_array_dtype2(file) < 0 ? 1 : 0;
+ nerrors += test_vl_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_vlstr_dtype(file) < 0 ? 1 : 0;
nerrors += test_str_dtype(file) < 0 ? 1 : 0;
- nerrors += test_refer_dtype(file) < 0 ? 1 : 0;
- nerrors += test_refer_dtype2(file) < 0 ? 1 : 0;
- nerrors += test_opaque_dtype(file) < 0 ? 1 : 0;
- nerrors += test_bitfield_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_refer_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_refer_dtype2(file) < 0 ? 1 : 0;
+ nerrors += test_opaque_dtype(file) < 0 ? 1 : 0;
+ nerrors += test_bitfield_dtype(file) < 0 ? 1 : 0;
nerrors += test_ninteger() < 0 ? 1 : 0;
if(H5Fclose(file) < 0)
diff --git a/test/tvlstr.c b/test/tvlstr.c
index b93d646..bf37ad7 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -108,12 +108,14 @@ void test_vlstr_free_custom(void *_mem, void *info)
static void
test_vlstrings_basic(void)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1]= {
"Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
"testing whether that nation or any nation so conceived and so dedicated can long endure."
- }; /* Information to write */
+ };
+
char *rdata[SPACE1_DIM1]; /* Information read in */
char *wdata2;
hid_t dataspace, dataset2;
diff --git a/test/vfd.c b/test/vfd.c
index 038c967..fae7928 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
*
* Purpose: Tests the basic features of Virtual File Drivers
@@ -822,7 +822,7 @@ error:
* 'first_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_family_opens(char *fname, hid_t fa_pl)
{
@@ -879,7 +879,7 @@ test_family_opens(char *fname, hid_t fa_pl)
error:
return -1;
} /* end test_family_opens() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
@@ -1103,7 +1103,7 @@ error:
* 'newname_individual', etc. in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_family_compat(void)
{
@@ -1187,7 +1187,7 @@ error:
return -1;
} /* end test_family_compat() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
@@ -1326,7 +1326,7 @@ error:
* 'sf_name' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static herr_t
test_multi_opens(char *fname)
{
@@ -1344,7 +1344,7 @@ test_multi_opens(char *fname)
return(fid >= 0 ? FAIL : SUCCEED);
} /* end test_multi_opens() */
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index a9f45d5..46bfb37 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -39,7 +39,14 @@ else ()
endif ()
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
-MACRO (ADD_H5P_EXE file)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_PAR_testphdf5_FORMAT testphdf5)
+endif ()
+
+macro (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
target_include_directories (${file}
@@ -59,7 +66,14 @@ MACRO (ADD_H5P_EXE file)
)
endif ()
set_target_properties (${file} PROPERTIES FOLDER test/par)
-ENDMACRO (ADD_H5P_EXE file)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_PAR_${file}_FORMAT ${file})
+ endif ()
+endmacro (ADD_H5P_EXE file)
set (H5P_TESTS
t_mpi
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index cf611b7..b086366 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -93,8 +93,9 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD,
#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
#define MSPACE1_DIM 27000 /* Dataset size in memory */
#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
-#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */
-#define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
+#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */
+#define FSPACE_DIM2 3600
+/* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
#define MSPACE_RANK 2
#define MSPACE_DIM1 9
#define MSPACE_DIM2 3600
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index ff9ca43..edb5ada 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -26,10 +26,12 @@ set (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_dump.h
+ ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_error.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_utils.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_str.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_ref.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
+ ${HDF5_TOOLS_LIB_SOURCE_DIR}/io_timer.h
)
if (NOT ONLY_SHARED_LIBS)
@@ -75,6 +77,17 @@ if (BUILD_SHARED_LIBS)
set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET})
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_TOOLS_SRC_FORMAT ${HDF5_TOOLS_LIB_TARGET})
+ else ()
+ clang_format (HDF5_TOOLS_SRC_FORMAT ${HDF5_TOOLS_LIBSH_TARGET})
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/libtest/CMakeLists.txt b/tools/libtest/CMakeLists.txt
index 3e0f671..d094058 100644
--- a/tools/libtest/CMakeLists.txt
+++ b/tools/libtest/CMakeLists.txt
@@ -16,6 +16,13 @@ else ()
endif ()
set_target_properties (h5tools_test_utils PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_H5TOOLS_TEST_SRC_FORMAT h5tools_test_utils)
+endif ()
+
if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt
index 8f230a0..d73b622 100644
--- a/tools/src/h5copy/CMakeLists.txt
+++ b/tools/src/h5copy/CMakeLists.txt
@@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5copy-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5COPY_SRC_FORMAT h5copy)
+ else ()
+ clang_format (HDF5_H5COPY_SRC_FORMAT h5copy-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index 4087ab4..f18b358 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -8,6 +8,7 @@ if (NOT ONLY_SHARED_LIBS)
add_executable (h5diff
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
+ ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.h
)
target_include_directories (h5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(h5diff PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -23,6 +24,7 @@ if (BUILD_SHARED_LIBS)
add_executable (h5diff-shared
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
+ ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.h
)
target_include_directories (h5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(h5diff-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -35,6 +37,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5diff-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5DIFF_SRC_FORMAT h5diff)
+ else ()
+ clang_format (HDF5_H5DIFF_SRC_FORMAT h5diff-shared)
+ endif ()
+endif ()
+
if (H5_HAVE_PARALLEL)
if (NOT ONLY_SHARED_LIBS)
add_executable (ph5diff
diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt
index 0b6c968..1282dde 100644
--- a/tools/src/h5dump/CMakeLists.txt
+++ b/tools/src/h5dump/CMakeLists.txt
@@ -9,6 +9,11 @@ if (NOT ONLY_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_defines.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_extern.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.h
)
target_include_directories (h5dump PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(h5dump PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -25,6 +30,11 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_defines.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_extern.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.h
+ ${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.h
)
target_include_directories (h5dump-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
target_compile_options(h5dump-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
@@ -36,6 +46,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5dump-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5DUMP_SRC_FORMAT h5dump)
+ else ()
+ clang_format (HDF5_H5DUMP_SRC_FORMAT h5dump-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt
index 863ecbe..ffa7c3a 100644
--- a/tools/src/h5format_convert/CMakeLists.txt
+++ b/tools/src/h5format_convert/CMakeLists.txt
@@ -27,6 +27,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5format_convert-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5FORMAT_SRC_FORMAT h5format_convert)
+ else ()
+ clang_format (HDF5_H5FORMAT_SRC_FORMAT h5format_convert-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt
index a52467e..dedefd9 100644
--- a/tools/src/h5import/CMakeLists.txt
+++ b/tools/src/h5import/CMakeLists.txt
@@ -5,7 +5,7 @@ project (HDF5_TOOLS_SRC_H5IMPORT C)
# Add the h5import executables
# --------------------------------------------------------------------
if (NOT ONLY_SHARED_LIBS)
- add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c)
+ add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.h)
target_include_directories (h5import PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5import STATIC)
target_link_libraries (h5import PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
@@ -17,7 +17,7 @@ if (NOT ONLY_SHARED_LIBS)
endif ()
if (BUILD_SHARED_LIBS)
- add_executable (h5import-shared ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c)
+ add_executable (h5import-shared ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.h)
target_include_directories (h5import-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5import-shared SHARED)
target_link_libraries (h5import-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
@@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5import-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5IMPORT_SRC_FORMAT h5import)
+ else ()
+ clang_format (HDF5_H5IMPORT_SRC_FORMAT h5import-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt
index 69d4c4d..36ec10e 100644
--- a/tools/src/h5jam/CMakeLists.txt
+++ b/tools/src/h5jam/CMakeLists.txt
@@ -46,6 +46,19 @@ if (BUILD_SHARED_LIBS)
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5JAM_SRC_FORMAT h5jam)
+ clang_format (HDF5_H5UNJAM_SRC_FORMAT h5unjam)
+ else ()
+ clang_format (HDF5_H5JAM_SRC_FORMAT h5jam-shared)
+ clang_format (HDF5_H5UNJAM_SRC_FORMAT h5unjam-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt
index c1ce006..dfac225 100644
--- a/tools/src/h5ls/CMakeLists.txt
+++ b/tools/src/h5ls/CMakeLists.txt
@@ -30,6 +30,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5ls-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5LS_SRC_FORMAT h5ls)
+ else ()
+ clang_format (HDF5_H5LS_SRC_FORMAT h5ls-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt
index a4aa1ef..e776516 100644
--- a/tools/src/h5repack/CMakeLists.txt
+++ b/tools/src/h5repack/CMakeLists.txt
@@ -12,6 +12,7 @@ set (REPACK_COMMON_SOURCES
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_refs.c
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_verify.c
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c
+ ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.h
)
if (NOT ONLY_SHARED_LIBS)
@@ -38,6 +39,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5repack-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5REPACK_SRC_FORMAT h5repack)
+ else ()
+ clang_format (HDF5_H5REPACK_SRC_FORMAT h5repack-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt
index f0722fd..eb10400 100644
--- a/tools/src/h5stat/CMakeLists.txt
+++ b/tools/src/h5stat/CMakeLists.txt
@@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5stat-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5STAT_SRC_FORMAT h5stat)
+ else ()
+ clang_format (HDF5_H5STAT_SRC_FORMAT h5stat-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt
index 1e9cacc..80669af 100644
--- a/tools/src/misc/CMakeLists.txt
+++ b/tools/src/misc/CMakeLists.txt
@@ -86,6 +86,23 @@ if (BUILD_SHARED_LIBS)
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5DEBUG_SRC_FORMAT h5debug)
+ clang_format (HDF5_H5REPART_SRC_FORMAT h5repart)
+ clang_format (HDF5_H5MKGRP_SRC_FORMAT h5mkgrp)
+ clang_format (HDF5_H5CLEAR_SRC_FORMAT h5clear)
+ else ()
+ clang_format (HDF5_H5DEBUG_SRC_FORMAT h5debug-shared)
+ clang_format (HDF5_H5REPART_SRC_FORMAT h5repart-shared)
+ clang_format (HDF5_H5MKGRP_SRC_FORMAT h5mkgrp-shared)
+ clang_format (HDF5_H5CLEAR_SRC_FORMAT h5clear-shared)
+ endif ()
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index 034c8d3..eff12a2 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -11,6 +11,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5copygentest PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5COPY_FORMAT h5copygentest)
+ endif ()
+
#add_test (NAME h5copygentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copygentest>)
endif ()
@@ -28,8 +35,16 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5COPY_TOOL_PLUGIN_LIB_TARGET} ${H5COPY_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5COPY_PLUGIN_FORMAT ${H5COPY_TOOL_PLUGIN_LIB_TARGET})
+ endif ()
+
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt
index e4bfc99..31663e1 100644
--- a/tools/test/h5diff/CMakeLists.txt
+++ b/tools/test/h5diff/CMakeLists.txt
@@ -11,6 +11,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5diffgentest PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5DIFF_FORMAT h5diffgentest)
+ endif ()
+
#add_test (NAME h5diffgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diffgentest>)
endif ()
@@ -28,6 +35,13 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} ${H5DIFF_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5DIFF_PLUGIN_FORMAT ${H5DIFF_TOOL_PLUGIN_LIB_TARGET})
+ endif ()
+
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index 8a83699..a11d084 100644
--- a/tools/test/h5dump/CMakeLists.txt
+++ b/tools/test/h5dump/CMakeLists.txt
@@ -15,6 +15,13 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} ${H5DUMP_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5DUMP_PLUGIN_FORMAT ${H5DUMP_TOOL_PLUGIN_LIB_TARGET})
+ endif ()
+
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
@@ -40,6 +47,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5dumpgentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5DUMP_FORMAT h5dumpgentest)
+ endif ()
+
#add_test (NAME h5dumpgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dumpgentest>)
endif ()
diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt
index 99420d8..af4808a 100644
--- a/tools/test/h5format_convert/CMakeLists.txt
+++ b/tools/test/h5format_convert/CMakeLists.txt
@@ -15,6 +15,13 @@ else ()
endif ()
set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5FC_h5fc_chk_idx_FORMAT h5fc_chk_idx)
+endif ()
+
if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c)
target_include_directories (h5fc_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
@@ -22,6 +29,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5fc_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5FC_FORMAT h5fc_gentest)
+ endif ()
+
#add_test (NAME h5fc_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_gentest>)
endif ()
diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt
index f3991c5..d8af61f 100644
--- a/tools/test/h5import/CMakeLists.txt
+++ b/tools/test/h5import/CMakeLists.txt
@@ -15,6 +15,13 @@ else ()
endif ()
set_target_properties (h5importtest PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5IMPORT_FORMAT h5importtest)
+endif ()
+
if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt
index 78160d3..67c8c5f 100644
--- a/tools/test/h5jam/CMakeLists.txt
+++ b/tools/test/h5jam/CMakeLists.txt
@@ -11,6 +11,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5jamgentest PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5JAM_FORMAT h5jamgentest)
+ endif ()
+
#add_test (NAME h5jamgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5jamgentest>)
endif ()
@@ -36,6 +43,14 @@ else ()
endif ()
set_target_properties (tellub PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5JAM_getub_FORMAT getub)
+ clang_format (HDF5_TOOLS_TEST_H5JAM_tellub_FORMAT tellub)
+endif ()
+
if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()
diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt
index 3993277..792de9f 100644
--- a/tools/test/h5ls/CMakeLists.txt
+++ b/tools/test/h5ls/CMakeLists.txt
@@ -15,8 +15,16 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${H5LS_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5LS_TOOL_PLUGIN_LIB_TARGET} ${H5LS_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5LS_PLUGIN_FORMAT ${H5LS_TOOL_PLUGIN_LIB_TARGET})
+ endif ()
+
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt
index 54cff64..061ed3f 100644
--- a/tools/test/h5repack/CMakeLists.txt
+++ b/tools/test/h5repack/CMakeLists.txt
@@ -17,6 +17,7 @@ else ()
endif ()
set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools)
+# These are the same files used by the h5repack tool
set (REPACK_COMMON_SOURCES
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_copy.c
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_filters.c
@@ -62,6 +63,14 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${H5REPACK_TOOL_PLUGIN_LIB_VTARGET} ${H5REPACK_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB")
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5REPACK_PLUGIN_FORMAT ${H5REPACK_TOOL_PLUGIN_LIB_TARGET})
+ clang_format (HDF5_TOOLS_TEST_H5REPACK_VPLUGIN_FORMAT ${H5REPACK_TOOL_PLUGIN_LIB_VTARGET})
+ endif ()
+
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
@@ -95,6 +104,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5repackgentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repackgentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5REPACK_FORMAT h5repackgentest)
+ endif ()
+
#add_test (NAME h5repackgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repackgentest>)
endif ()
diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt
index f50a747..6fc9f00 100644
--- a/tools/test/h5stat/CMakeLists.txt
+++ b/tools/test/h5stat/CMakeLists.txt
@@ -11,6 +11,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
target_link_libraries (h5stat_gentest PRIVATE ${HDF5_LIB_TARGET})
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5STAT_FORMAT h5stat_gentest)
+ endif ()
+
#add_test (NAME h5stat_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5stat_gentest>)
endif ()
diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt
index 8f13d84..66ba655 100644
--- a/tools/test/misc/CMakeLists.txt
+++ b/tools/test/misc/CMakeLists.txt
@@ -17,6 +17,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5repart_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_gentest>)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_MISC_h5repart_gentest_FORMAT h5repart_gentest)
+ endif ()
+
add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c)
target_include_directories (h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_TEST_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT ONLY_SHARED_LIBS)
@@ -29,6 +36,13 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
set_target_properties (h5clear_gentest PROPERTIES FOLDER tools)
#add_test (NAME H5CLEAR-h5clear_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear_gentest>)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_MISC_h5clear_gentest_FORMAT h5clear_gentest)
+ endif ()
+
add_subdirectory (vds)
endif ()
@@ -44,6 +58,13 @@ else ()
endif ()
set_target_properties (h5repart_test PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_MISC_h5repart_test_FORMAT h5repart_test)
+endif ()
+
add_executable (clear_open_chk ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/clear_open_chk.c)
target_include_directories (clear_open_chk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT ONLY_SHARED_LIBS)
@@ -55,6 +76,13 @@ else ()
endif ()
set_target_properties (clear_open_chk PROPERTIES FOLDER tools)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_MISC_clear_open_chk_FORMAT clear_open_chk)
+endif ()
+
if (HDF5_TEST_SERIAL)
include (CMakeTestsRepart.cmake)
include (CMakeTestsClear.cmake)
diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt
index 71261c4..b0d8ab3 100644
--- a/tools/test/misc/vds/CMakeLists.txt
+++ b/tools/test/misc/vds/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 3.12)
project (HDF5_TOOLS_TEST_MISC_VDS C)
-MACRO (ADD_H5_GENERATOR genfile)
+macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TOOLS_TEST_MISC_VDS_SOURCE_DIR}/${genfile}.c)
target_include_directories (${genfile} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT ONLY_SHARED_LIBS)
@@ -12,7 +12,14 @@ MACRO (ADD_H5_GENERATOR genfile)
target_link_libraries (${genfile} PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (${genfile} PROPERTIES FOLDER generator/tools)
-ENDMACRO ()
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_MISC_VDS_${genfile}_FORMAT ${genfile})
+ endif ()
+endmacro ()
# generator executables
set (H5_GENERATORS
diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt
index 3c45e85..5beb019 100644
--- a/tools/test/perform/CMakeLists.txt
+++ b/tools/test/perform/CMakeLists.txt
@@ -20,6 +20,13 @@ else ()
endif ()
set_target_properties (h5perf_serial PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_serial_FORMAT h5perf_serial)
+endif ()
+
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf_serial_alone - io_timer.c includes
set (h5perf_serial_alone_SOURCES
@@ -38,9 +45,14 @@ if (HDF5_BUILD_PERFORM_STANDALONE)
target_link_libraries (h5perf_serial_alone PRIVATE ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>")
endif ()
set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform)
- set_property (TARGET h5perf_serial_alone
- APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
- )
+ set_property (TARGET h5perf_serial_alone APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_serial_alone_FORMAT h5perf_serial_alone)
+ endif ()
endif ()
#-- Adding test for chunk
@@ -58,6 +70,13 @@ else ()
endif ()
set_target_properties (chunk PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_chunk_FORMAT chunk)
+endif ()
+
#-- Adding test for iopipe
set (iopipe_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/iopipe.c
@@ -73,6 +92,13 @@ else ()
endif ()
set_target_properties (iopipe PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_iopipe_FORMAT iopipe)
+endif ()
+
#-- Adding test for chunk_cache
set (chunk_cache_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/chunk_cache.c
@@ -88,6 +114,13 @@ else ()
endif ()
set_target_properties (chunk_cache PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_chunk_cache_FORMAT chunk_cache)
+endif ()
+
#-- Adding test for overhead
set (overhead_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/overhead.c
@@ -103,6 +136,13 @@ else ()
endif ()
set_target_properties (overhead PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_overhead_FORMAT overhead)
+endif ()
+
#-- Adding test for perf_meta
set (perf_meta_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf_meta.c
@@ -118,6 +158,13 @@ else ()
endif ()
set_target_properties (perf_meta PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_perf_meta_FORMAT perf_meta)
+endif ()
+
#-- Adding test for zip_perf
set (zip_perf_SOURCES
${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/zip_perf.c
@@ -133,22 +180,36 @@ else ()
endif ()
set_target_properties (zip_perf PROPERTIES FOLDER perform)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_zip_perf_FORMAT zip_perf)
+endif ()
+
if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
if (UNIX)
- #-- Adding test for perf - only on unix systems
- set (perf_SOURCES
- ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf.c
- )
- add_executable (perf ${perf_SOURCES})
- target_include_directories (perf PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (perf STATIC)
- target_link_libraries (perf PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- else ()
- TARGET_C_PROPERTIES (perf SHARED)
- target_link_libraries (perf PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- endif ()
- set_target_properties (perf PROPERTIES FOLDER perform)
+ #-- Adding test for perf - only on unix systems
+ set (perf_SOURCES
+ ${HDF5_TOOLS_TEST_PERFORM_SOURCE_DIR}/perf.c
+ )
+ add_executable (perf ${perf_SOURCES})
+ target_include_directories (perf PRIVATE "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (perf STATIC)
+ target_link_libraries (perf PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (perf SHARED)
+ target_link_libraries (perf PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ endif ()
+ set_target_properties (perf PROPERTIES FOLDER perform)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_perf_FORMAT perf)
+ endif ()
endif ()
#-- Adding test for h5perf
@@ -167,6 +228,13 @@ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
endif ()
set_target_properties (h5perf PROPERTIES FOLDER perform)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_FORMAT h5perf)
+ endif ()
+
if (HDF5_BUILD_PERFORM_STANDALONE)
#-- Adding test for h5perf
set (h5perf_alone_SOURCES
@@ -188,6 +256,13 @@ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL)
set_property (TARGET h5perf_alone
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_PERFORM_h5perf_alone_FORMAT h5perf_alone)
+ endif ()
endif ()
endif ()
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index aa3a316..19b450f 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -1268,7 +1268,7 @@ done:
* 'temp' in the code below, but early (4.4.7, at least) gcc only
* allows diagnostic pragmas to be toggled outside of functions.
*/
-H5_GCC_DIAG_OFF(format-nonliteral)
+H5_GCC_DIAG_OFF("format-nonliteral")
static void
do_cleanupfile(iotype iot, char *filename)
{
@@ -1330,5 +1330,5 @@ do_cleanupfile(iotype iot, char *filename)
}
}
}
-H5_GCC_DIAG_ON(format-nonliteral)
+H5_GCC_DIAG_ON("format-nonliteral")
diff --git a/utils/mirror_vfd/CMakeLists.txt b/utils/mirror_vfd/CMakeLists.txt
index 6137e82..780300e 100644
--- a/utils/mirror_vfd/CMakeLists.txt
+++ b/utils/mirror_vfd/CMakeLists.txt
@@ -8,7 +8,9 @@ project (HDF5_UTILS_MIRRORVFD C)
set (mirror_server_SOURCES
${HDF5_UTILS_MIRRORVFD_SOURCE_DIR}/mirror_remote.c
${HDF5_UTILS_MIRRORVFD_SOURCE_DIR}/mirror_server.c
- ${HDF5_UTILS_MIRRORVFD_SOURCE_DIR}/mirror_writer.c)
+ ${HDF5_UTILS_MIRRORVFD_SOURCE_DIR}/mirror_writer.c
+ ${HDF5_UTILS_MIRRORVFD_SOURCE_DIR}/mirror_remote.h
+)
add_executable (mirror_server ${mirror_server_SOURCES})
target_include_directories (mirror_server PRIVATE "${HDF5_UITLS_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
@@ -23,6 +25,13 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};mirror_server
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} mirror_server)
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_UTILS_MIRRORVFD_SERVER_FORMAT mirror_server)
+endif ()
+
+#-----------------------------------------------------------------------------
# Add the mirror_server_stop executable
#-----------------------------------------------------------------------------
@@ -40,6 +49,13 @@ set_target_properties (mirror_server_stop PROPERTIES FOLDER utils)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};mirror_server_stop")
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} mirror_server_stop)
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_UTILS_MIRRORVFD_STOP_FORMAT mirror_server_stop)
+endif ()
+
##############################################################################
##############################################################################
### I N S T A L L A T I O N ###